Fix for bot loss of aggro to client regardless of hate

This commit is contained in:
Uleat 2017-03-29 17:45:56 -04:00
parent f1bfd129af
commit f5f2cbc674

View File

@ -364,11 +364,19 @@ Mob *HateList::GetEntWithMostHateOnList(Mob *center, Mob *skip)
int64 current_hate = cur->stored_hate_amount; int64 current_hate = cur->stored_hate_amount;
#ifdef BOTS
if (cur->entity_on_hatelist->IsClient() || cur->entity_on_hatelist->IsBot()){
if (cur->entity_on_hatelist->IsClient() && cur->entity_on_hatelist->CastToClient()->IsSitting()){
aggro_mod += RuleI(Aggro, SittingAggroMod);
}
#else
if (cur->entity_on_hatelist->IsClient()){ if (cur->entity_on_hatelist->IsClient()){
if (cur->entity_on_hatelist->CastToClient()->IsSitting()){ if (cur->entity_on_hatelist->CastToClient()->IsSitting()){
aggro_mod += RuleI(Aggro, SittingAggroMod); aggro_mod += RuleI(Aggro, SittingAggroMod);
} }
#endif
if (center){ if (center){
if (center->GetTarget() == cur->entity_on_hatelist) if (center->GetTarget() == cur->entity_on_hatelist)