mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Bug Fix] Limit Pet Taunt Distance (#4018)
* [Bug Fix] Limit pet taunt distance Previously this was not regulated and allowed players to exploit unlimited taunt distance. Rule Name: PetTauntRange Rule Default: 150 Calculation is Rule Squared. * Remove `this`
This commit is contained in:
@@ -1819,14 +1819,16 @@ void NPC::DoClassAttacks(Mob *target) {
|
||||
target->GetBodyType() != BT_Undead &&
|
||||
taunt_time &&
|
||||
type_of_pet &&
|
||||
type_of_pet != petTargetLock
|
||||
type_of_pet != petTargetLock &&
|
||||
DistanceSquared(GetPosition(), target->GetPosition()) <= (RuleI(Pets, PetTauntRange) * RuleI(Pets, PetTauntRange))
|
||||
) {
|
||||
GetOwner()->MessageString(Chat::PetResponse, PET_TAUNTING);
|
||||
Taunt(target->CastToNPC(), false);
|
||||
}
|
||||
|
||||
if(!ca_time)
|
||||
if(!ca_time) {
|
||||
return;
|
||||
}
|
||||
|
||||
float HasteModifier = GetHaste() * 0.01f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user