mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-07 19:42:26 +00:00
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:
parent
e7032bc2c2
commit
8a04d8e2b7
@ -1,5 +1,8 @@
|
|||||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
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 ==
|
== 01/03/2014 ==
|
||||||
demonstar55: Crash prevention for emote.
|
demonstar55: Crash prevention for emote.
|
||||||
|
|
||||||
|
|||||||
@ -7019,7 +7019,13 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
|||||||
Message_StringID(10, CANNOT_WAKE, mypet->GetCleanName(), GetTarget()->GetCleanName());
|
Message_StringID(10, CANNOT_WAKE, mypet->GetCleanName(), GetTarget()->GetCleanName());
|
||||||
break;
|
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((mypet->GetPetType() == petAnimation && GetAA(aaAnimationEmpathy) >= 2) || mypet->GetPetType() != petAnimation) {
|
||||||
if (GetTarget() != this && mypet->DistNoRootNoZ(*GetTarget()) <= (RuleR(Pets, AttackCommandRange)*RuleR(Pets, AttackCommandRange))) {
|
if (GetTarget() != this && mypet->DistNoRootNoZ(*GetTarget()) <= (RuleR(Pets, AttackCommandRange)*RuleR(Pets, AttackCommandRange))) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user