Adding AutoXTarget for bot owner when hate is added to bot's owner.

Bots did not add XTargets, but add hate to client(). This ensures when bots generate hate for client() they also add the mob to the XTarget of the owning Client().
This commit is contained in:
Unknown 2017-04-13 16:05:10 -07:00
parent 478a9d115b
commit 21d3e5afac

View File

@ -2541,8 +2541,10 @@ void Mob::AddToHateList(Mob* other, uint32 hate /*= 0*/, int32 damage /*= 0*/, b
AddFeignMemory(other->CastToBot()->GetBotOwner()->CastToClient());
}
else {
if(!hate_list.IsEntOnHateList(other->CastToBot()->GetBotOwner()))
if (!hate_list.IsEntOnHateList(other->CastToBot()->GetBotOwner())) {
hate_list.AddEntToHateList(other->CastToBot()->GetBotOwner(), 0, 0, false, true);
other->CastToBot()->GetBotOwner()->CastToClient()->AddAutoXTarget(this);
}
}
}
#endif //BOTS