mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-23 20:31:28 +00:00
Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead
This commit is contained in:
parent
9dc24735a4
commit
3f83bc7771
@ -9958,7 +9958,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((mypet->GetPetType() == petAnimation && GetAA(aaAnimationEmpathy) >= 2) || mypet->GetPetType() != petAnimation) {
|
if ((mypet->GetPetType() == petAnimation && GetAA(aaAnimationEmpathy) >= 2) || mypet->GetPetType() != petAnimation) {
|
||||||
if (GetTarget() != this && mypet->DistNoRootNoZ(*GetTarget()) <= (RuleR(Pets, AttackCommandRange)*RuleR(Pets, AttackCommandRange))) {
|
if (GetTarget() != this && ComparativeDistanceNoZ(mypet->GetPosition(), GetTarget()->GetPosition()) <= (RuleR(Pets, AttackCommandRange)*RuleR(Pets, AttackCommandRange))) {
|
||||||
zone->AddAggroMob();
|
zone->AddAggroMob();
|
||||||
mypet->AddToHateList(GetTarget(), 1);
|
mypet->AddToHateList(GetTarget(), 1);
|
||||||
Message_StringID(MT_PetResponse, PET_ATTACKING, mypet->GetCleanName(), GetTarget()->GetCleanName());
|
Message_StringID(MT_PetResponse, PET_ATTACKING, mypet->GetCleanName(), GetTarget()->GetCleanName());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user