//look around a client for things which might aggro the client. void EntityList::CheckClientAggro(Client *around) { for (auto it = mob_list.begin(); it != mob_list.end(); ++it) { Mob *mob = it->second; if (mob->IsClient()) //also ensures that mob != around continue; if (mob->CheckWillAggro(around)) { if (mob->IsEngaged()) mob->AddToHateList(around); else mob->AddToHateList(around, mob->GetLevel()); } } }
//look around a client for things which might aggro the client. void EntityList::CheckClientAggro(Client *around) { LinkedListIterator<Mob*> iterator(mob_list); for(iterator.Reset(); iterator.MoreElements(); iterator.Advance()) { Mob* mob = iterator.GetData(); if(mob->IsClient()) //also ensures that mob != around continue; if(mob->CheckWillAggro(around)) { if(mob->IsEngaged()) { mob->AddToHateList(around); } else { mob->AddToHateList(around, mob->GetLevel()); } } } }