Moved pet target checking to the attack command, which is more live like

Also, probably a little better than attacking then backing off :P
This commit is contained in:
Michael Cook
2014-01-07 17:02:35 -05:00
parent e7032bc2c2
commit 8a04d8e2b7
2 changed files with 10 additions and 1 deletions
+7 -1
View File
@@ -7019,7 +7019,13 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
Message_StringID(10, CANNOT_WAKE, mypet->GetCleanName(), GetTarget()->GetCleanName());
break;
}
if (mypet->IsFeared()) break; //prevent pet from attacking stuff while feared
if (mypet->IsFeared())
break; //prevent pet from attacking stuff while feared
if (!mypet->IsAttackAllowed(GetTarget())) {
mypet->Say_StringID(NOT_LEGAL_TARGET);
break;
}
if((mypet->GetPetType() == petAnimation && GetAA(aaAnimationEmpathy) >= 2) || mypet->GetPetType() != petAnimation) {
if (GetTarget() != this && mypet->DistNoRootNoZ(*GetTarget()) <= (RuleR(Pets, AttackCommandRange)*RuleR(Pets, AttackCommandRange))) {