From 25c0416f1ef7b398a5c5d48d01458fadde803fbb Mon Sep 17 00:00:00 2001 From: Natedog2012 Date: Tue, 15 Mar 2022 19:28:36 -0500 Subject: [PATCH] [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 --- zone/aggro.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zone/aggro.cpp b/zone/aggro.cpp index 7d3b81554..8d091140b 100644 --- a/zone/aggro.cpp +++ b/zone/aggro.cpp @@ -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,