View Single Post
  #8  
Old 02-22-2017, 04:42 PM
ZombieSoul's Avatar
ZombieSoul
Sarnak
 
Join Date: Jan 2017
Posts: 31
Default

I was looking over this today while at work on my breaks, the grouping issue seems to start with this:
Code:
// Handles all client zone change event
void Bot::ProcessClientZoneChange(Client* botOwner) {
	if(botOwner) {
		std::list<Bot*> BotList = entity_list.GetBotsByBotOwnerCharacterID(botOwner->CharacterID());

		for(std::list<Bot*>::iterator itr = BotList.begin(); itr != BotList.end(); ++itr) {
			Bot* tempBot = *itr;

			if(tempBot) {
				if(tempBot->HasGroup()) {
					Group* g = tempBot->GetGroup();
					if(g && g->GetLeader()) {
						Mob* tempGroupLeader = tempBot->GetGroup()->GetLeader();
						if(tempGroupLeader && tempGroupLeader->IsClient()) {
							if(tempBot->GetBotOwnerCharacterID() == tempGroupLeader->CastToClient()->CharacterID())
								tempBot->Zone();
							else
								tempBot->Camp();
						}
					}
					else
						tempBot->Camp();
				}
				else
					tempBot->Camp();
			}
		}
	}
}
Which camps out bots on zone if they don't belong to the group leader.
I'm going to try just looking for clients that are in the group instead of just group leader and see where that leads

Edit: forgot to mention, mercs handle this way differently. So unlikely to have similar issues.
Reply With Quote