[Bug Fix] Force NPCs to respect special ability 24 and 50 when set on player pets (#2059)

* Force NPCs to respect special ability 24 and 50 when set on player pets

* Fix error in logic

* Remove this
This commit is contained in:
Natedog2012 2022-03-15 19:28:36 -05:00 committed by GitHub
parent 326dba6aeb
commit 25c0416f1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -436,11 +436,16 @@ bool Mob::CheckWillAggro(Mob *mob) {
pet_owner->IsClient() &&
(
!RuleB(Aggro, AggroPlayerPets) ||
pet_owner->CastToClient()->GetGM()
pet_owner->CastToClient()->GetGM() ||
mob->GetSpecialAbility(IMMUNE_AGGRO)
)
) {
return false;
}
if (IsNPC() && mob->IsNPC() && mob->GetSpecialAbility(IMMUNE_AGGRO_NPC)) {
return false;
}
// Check If it's invisible and if we can see invis
// Check if it's a client, and that the client is connected and not linkdead,