diff --git a/common/ruletypes.h b/common/ruletypes.h index 409769bea..c0e740493 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -526,6 +526,7 @@ RULE_INT(Aggro, ClientAggroCheckMovingInterval, 1000, "Interval in which clients RULE_INT(Aggro, ClientAggroCheckIdleInterval, 6000, "Interval in which clients actually check for aggro while idle - in milliseconds - this should be higher than ClientAggroCheckMovingInterval") RULE_REAL(Aggro, PetAttackRange, 40000.0, "Maximum squared range /pet attack works at default is 200") RULE_BOOL(Aggro, NPCAggroMaxDistanceEnabled, true, "If enabled, NPC's will drop aggro beyond 600 units or what is defined at the zone level") +RULE_BOOL(Aggro, AggroPlayerPets, false, "If enabled, NPCs will aggro player pets") RULE_CATEGORY_END() RULE_CATEGORY(TaskSystem) diff --git a/zone/aggro.cpp b/zone/aggro.cpp index 33221b63a..5829bc3a3 100644 --- a/zone/aggro.cpp +++ b/zone/aggro.cpp @@ -252,7 +252,7 @@ bool Mob::CheckWillAggro(Mob *mob) { } Mob *pet_owner = mob->GetOwner(); - if (pet_owner && pet_owner->IsClient()) { + if (pet_owner && pet_owner->IsClient() && (!RuleB(Aggro, AggroPlayerPets) || pet_owner->CastToClient()->GetGM())) { return false; }