diff --git a/changelog.txt b/changelog.txt index 70693e6aa..804beec1d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 01/07/2014 == +demonstar55: Moved pet can attack check to before it tries to attack, which is more live like. + == 01/03/2014 == demonstar55: Crash prevention for emote. diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index c0580cf59..2bbac403e 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -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))) {