diff --git a/common/ruletypes.h b/common/ruletypes.h index f9c3b3c99..9846273bf 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -547,6 +547,7 @@ RULE_INT(Aggro, IntAggroThreshold, 75) // Int <= this will aggro regardless of l RULE_BOOL(Aggro, AllowTickPulling, false) // tick pulling is an exploit in an NPC's call for help fixed sometime in 2006 on live RULE_BOOL(Aggro, UseLevelAggro, true) // Level 18+ and Undead will aggro regardless of level difference. (this will disabled Rule:IntAggroThreshold if set to true) RULE_INT(Aggro, ClientAggroCheckInterval, 6) // Interval in which clients actually check for aggro - in seconds +RULE_REAL(Aggro, PetAttackRange, 40000.0) // max squared range /pet attack works at default is 200 RULE_CATEGORY_END() RULE_CATEGORY(TaskSystem) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 6483c0cb2..d8a514797 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -10046,6 +10046,14 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) break; } + // default range is 200, takes Z into account + // really they do something weird where they're added to the aggro list then remove them + // and will attack if they come in range -- too lazy, lets remove exploits for now + if (DistanceSquared(mypet->GetPosition(), target->GetPosition()) >= RuleR(Aggro, PetAttackRange)) { + // they say they're attacking then remove on live ... so they don't really say anything in this case ... + break; + } + if ((mypet->GetPetType() == petAnimation && aabonuses.PetCommands[PetCommand]) || mypet->GetPetType() != petAnimation) { if (target != this && DistanceSquaredNoZ(mypet->GetPosition(), target->GetPosition()) <= (RuleR(Pets, AttackCommandRange)*RuleR(Pets, AttackCommandRange))) { if (mypet->IsPetStop()) {