Added isDead validation before pet casts skill.
Contributed by Lito.
This commit is contained in:
parent
940090fc16
commit
8593597d36
@ -140,7 +140,7 @@ public class BabyPet extends Pet
|
||||
|
||||
// if the owner is dead, merely wait for the owner to be resurrected
|
||||
// if the pet is still casting from the previous iteration, allow the cast to complete...
|
||||
if (!owner.isDead() && !_baby.isCastingNow() && !_baby.isBetrayed())
|
||||
if (!owner.isDead() && !_baby.isDead() && !_baby.isCastingNow() && !_baby.isBetrayed())
|
||||
{
|
||||
// casting automatically stops any other action (such as autofollow or a move-to).
|
||||
// We need to gather the necessary info to restore the previous state.
|
||||
|
@ -140,7 +140,7 @@ public class BabyPet extends Pet
|
||||
|
||||
// if the owner is dead, merely wait for the owner to be resurrected
|
||||
// if the pet is still casting from the previous iteration, allow the cast to complete...
|
||||
if (!owner.isDead() && !_baby.isCastingNow() && !_baby.isBetrayed())
|
||||
if (!owner.isDead() && !_baby.isDead() && !_baby.isCastingNow() && !_baby.isBetrayed())
|
||||
{
|
||||
// casting automatically stops any other action (such as autofollow or a move-to).
|
||||
// We need to gather the necessary info to restore the previous state.
|
||||
|
@ -270,7 +270,7 @@ public class BabyPet extends Pet
|
||||
}
|
||||
|
||||
// If the pet doesn't meet the conditions avoid casting.
|
||||
if (_baby.isCastingNow() || _baby.isBetrayed() || _baby.isMuted() || _baby.isOutOfControl() || !_bufferMode || (_baby.getAI().getIntention() == CtrlIntention.AI_INTENTION_CAST))
|
||||
if (_baby.isDead() || _baby.isCastingNow() || _baby.isBetrayed() || _baby.isMuted() || _baby.isOutOfControl() || !_bufferMode || (_baby.getAI().getIntention() == CtrlIntention.AI_INTENTION_CAST))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -270,7 +270,7 @@ public class BabyPet extends Pet
|
||||
}
|
||||
|
||||
// If the pet doesn't meet the conditions avoid casting.
|
||||
if (_baby.isCastingNow() || _baby.isBetrayed() || _baby.isMuted() || _baby.isOutOfControl() || !_bufferMode || (_baby.getAI().getIntention() == CtrlIntention.AI_INTENTION_CAST))
|
||||
if (_baby.isDead() || _baby.isCastingNow() || _baby.isBetrayed() || _baby.isMuted() || _baby.isOutOfControl() || !_bufferMode || (_baby.getAI().getIntention() == CtrlIntention.AI_INTENTION_CAST))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user