Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bots

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-25-2015, 01:05 PM
Nibiuno
Hill Giant
 
Join Date: Mar 2010
Posts: 101
Default

It wasnt bot camp - I just updated to the newest code to test. Its when you spawn 2 bots, and group with them - then you #bot camp one bot, and then hit disband.

The zone crashes everytime I hit disband after camping one bot. That last change I posted fixes it for some reason.
Reply With Quote
  #2  
Old 02-25-2015, 06:08 PM
rencro
Hill Giant
 
Join Date: Sep 2008
Location: So. California
Posts: 219
Default

Sorry, I cannot replicate this issue at all, by chance when you pulled new code or have been updating, did you not re-apply(or merge) Client::Handle_OP_GroupDisband ?

Here is my diff to the latest code, this has some forum related fixes as well from http://www.eqemulator.org/forums/showthread.php?t=39013 and http://www.eqemulator.org/forums/showthread.php?t=38996

Code:
diff --git a/zone/bot.cpp b/zone/bot.cpp
index 1b1da0b..d29c4ff 100644
--- a/zone/bot.cpp
+++ b/zone/bot.cpp
@@ -1379,6 +1379,26 @@ int32 Bot::GenerateBaseHitPoints()
 	int new_base_hp = 0;
 	uint32 lm = GetClassLevelFactor();
 	uint32 Post255;
+
+	if ((GetSTA() - 255) / 2 > 0)
+		Post255 = (GetSTA() - 255) / 2;
+	else
+		Post255 = 0;
+
+	new_base_hp = (5) + (GetLevel()*lm / 10) + (((GetSTA() - Post255)*GetLevel()*lm / 3000)) + ((Post255*GetLevel())*lm / 6000);
+
+	this->base_hp = new_base_hp;
+
+	return new_base_hp;
+}
+
+/*
+int32 Bot::GenerateBaseHitPoints()
+{
+	// Calc Base Hit Points
+	int new_base_hp = 0;
+	uint32 lm = GetClassLevelFactor();
+	uint32 Post255;
 	uint32 NormalSTA = GetSTA();
 
 	if(GetOwner() && GetOwner()->CastToClient() && GetOwner()->CastToClient()->GetClientVersion() >= ClientVersion::SoD && RuleB(Character, SoDClientUseSoDHPManaEnd))
@@ -1422,7 +1442,7 @@ int32 Bot::GenerateBaseHitPoints()
 
 	return new_base_hp;
 }
-
+*/
 void Bot::GenerateAABonuses(StatBonuses* newbon) {
 	// General AA bonus
 	uint8 botClass = GetClass();
@@ -4662,6 +4682,7 @@ void Bot::SaveBotGroup(Group* botGroup, std::string botGroupName, std::string* e
         return;
     }
 
+	botGroupId = GetBotGroupIdByBotGroupName(botGroupName.c_str(), errorMessage);
     if(botGroupId == 0)
         return;
 
@@ -5911,9 +5932,17 @@ bool Bot::Death(Mob *killerMob, int32 damage, uint16 spell_id, SkillUseTypes att
 
 					// if group members exist below this one, move
 					// them all up one slot in the group list
+					if(g->GroupCount() == 6) {
+						for(int x=0; x<MAX_GROUP_MEMBERS; x++) {
+							g->membername[x][0] = '\0';
+							memset(g->membername[x], 0, 64);
+							g->members[x] = nullptr;
+						}
+					}
 					int j = i+1;
 					for(; j<MAX_GROUP_MEMBERS; j++) {
 						if(g->members[j]) {
+//							Log.Out(Logs::General, Logs::Status, "group count is: %d", g->GroupCount());
 							g->members[j-1] = g->members[j];
 							strcpy(g->membername[j-1], g->members[j]->GetCleanName());
 							g->membername[j][0] = '\0';
@@ -5921,7 +5950,6 @@ bool Bot::Death(Mob *killerMob, int32 damage, uint16 spell_id, SkillUseTypes att
 							g->members[j] = nullptr;
 						}
 					}
-
 					// update the client group
 					EQApplicationPacket* outapp = new EQApplicationPacket(OP_GroupUpdate, sizeof(GroupJoin_Struct));
 					GroupJoin_Struct* gu = (GroupJoin_Struct*)outapp->pBuffer;
diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp
index 5ff2052..00d2cc3 100644
--- a/zone/client_packet.cpp
+++ b/zone/client_packet.cpp
@@ -6343,16 +6343,11 @@ void Client::Handle_OP_GroupDisband(const EQApplicationPacket *app)
 	// this block is necessary to allow more control over controlling how bots are zoned or camped.
 	if (Bot::GroupHasBot(group)) {
 		if (group->IsLeader(this)) {
-			if ((GetTarget() == 0 || GetTarget() == this) || (group->GroupCount() < 3)) {
-				Bot::ProcessBotGroupDisband(this, std::string());
-			}
-			else {
-				Mob* tempMember = entity_list.GetMob(gd->name2);
-				if (tempMember) {
-					if (tempMember->IsBot())
-						Bot::ProcessBotGroupDisband(this, std::string(tempMember->GetCleanName()));
+				Mob* tempMember = GetTarget();
+				if (tempMember->IsBot()) {
+					Bot::ProcessBotGroupDisband(this, std::string(tempMember->GetCleanName()));
+					return;
 				}
-			}
 		}
 	}
 #endif
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:07 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3