Moved auto buff isAlikeDead check with other buff checks.
This commit is contained in:
parent
9501a97a6a
commit
72de447144
@ -227,7 +227,7 @@ public class AutoUseTaskManager implements Runnable
|
||||
|
||||
// Playable target cast.
|
||||
final Playable caster = pet != null ? pet : player;
|
||||
if ((target != null) && target.isPlayable() && !((Playable) target).isAlikeDead() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
if ((target != null) && target.isPlayable() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
{
|
||||
caster.doCast(skill);
|
||||
}
|
||||
@ -381,6 +381,11 @@ public class AutoUseTaskManager implements Runnable
|
||||
}
|
||||
}
|
||||
|
||||
if ((target != null) && target.isCreature() && ((Creature) target).isAlikeDead() && (skill.getTargetType() != TargetType.SELF) && (skill.getTargetType() != TargetType.NPC_BODY) && (skill.getTargetType() != TargetType.PC_BODY))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
final Playable playableTarget = (target == null) || !target.isPlayable() || (skill.getTargetType() == TargetType.SELF) ? player : (Playable) target;
|
||||
if (!canUseMagic(player, playableTarget, skill))
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ public class AutoUseTaskManager implements Runnable
|
||||
|
||||
// Playable target cast.
|
||||
final Playable caster = pet != null ? pet : player;
|
||||
if ((target != null) && target.isPlayable() && !((Playable) target).isAlikeDead() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
if ((target != null) && target.isPlayable() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
{
|
||||
caster.doCast(skill);
|
||||
}
|
||||
@ -381,6 +381,11 @@ public class AutoUseTaskManager implements Runnable
|
||||
}
|
||||
}
|
||||
|
||||
if ((target != null) && target.isCreature() && ((Creature) target).isAlikeDead() && (skill.getTargetType() != TargetType.SELF) && (skill.getTargetType() != TargetType.NPC_BODY) && (skill.getTargetType() != TargetType.PC_BODY))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
final Playable playableTarget = (target == null) || !target.isPlayable() || (skill.getTargetType() == TargetType.SELF) ? player : (Playable) target;
|
||||
if (!canUseMagic(player, playableTarget, skill))
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ public class AutoUseTaskManager implements Runnable
|
||||
|
||||
// Playable target cast.
|
||||
final Playable caster = pet != null ? pet : player;
|
||||
if ((target != null) && target.isPlayable() && !((Playable) target).isAlikeDead() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
if ((target != null) && target.isPlayable() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
{
|
||||
caster.doCast(skill);
|
||||
}
|
||||
@ -381,6 +381,11 @@ public class AutoUseTaskManager implements Runnable
|
||||
}
|
||||
}
|
||||
|
||||
if ((target != null) && target.isCreature() && ((Creature) target).isAlikeDead() && (skill.getTargetType() != TargetType.SELF) && (skill.getTargetType() != TargetType.NPC_BODY) && (skill.getTargetType() != TargetType.PC_BODY))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
final Playable playableTarget = (target == null) || !target.isPlayable() || (skill.getTargetType() == TargetType.SELF) ? player : (Playable) target;
|
||||
if (!canUseMagic(player, playableTarget, skill))
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ public class AutoUseTaskManager implements Runnable
|
||||
|
||||
// Playable target cast.
|
||||
final Playable caster = pet != null ? pet : player;
|
||||
if ((target != null) && target.isPlayable() && !((Playable) target).isAlikeDead() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
if ((target != null) && target.isPlayable() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
{
|
||||
caster.doCast(skill);
|
||||
}
|
||||
@ -381,6 +381,11 @@ public class AutoUseTaskManager implements Runnable
|
||||
}
|
||||
}
|
||||
|
||||
if ((target != null) && target.isCreature() && ((Creature) target).isAlikeDead() && (skill.getTargetType() != TargetType.SELF) && (skill.getTargetType() != TargetType.NPC_BODY) && (skill.getTargetType() != TargetType.PC_BODY))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
final Playable playableTarget = (target == null) || !target.isPlayable() || (skill.getTargetType() == TargetType.SELF) ? player : (Playable) target;
|
||||
if (!canUseMagic(player, playableTarget, skill))
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ public class AutoUseTaskManager implements Runnable
|
||||
|
||||
// Playable target cast.
|
||||
final Playable caster = pet != null ? pet : player;
|
||||
if ((target != null) && target.isPlayable() && !((Playable) target).isAlikeDead() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
if ((target != null) && target.isPlayable() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
{
|
||||
caster.doCast(skill);
|
||||
}
|
||||
@ -381,6 +381,11 @@ public class AutoUseTaskManager implements Runnable
|
||||
}
|
||||
}
|
||||
|
||||
if ((target != null) && target.isCreature() && ((Creature) target).isAlikeDead() && (skill.getTargetType() != TargetType.SELF) && (skill.getTargetType() != TargetType.NPC_BODY) && (skill.getTargetType() != TargetType.PC_BODY))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
final Playable playableTarget = (target == null) || !target.isPlayable() || (skill.getTargetType() == TargetType.SELF) ? player : (Playable) target;
|
||||
if (!canUseMagic(player, playableTarget, skill))
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ public class AutoUseTaskManager implements Runnable
|
||||
|
||||
// Playable target cast.
|
||||
final Playable caster = pet != null ? pet : player;
|
||||
if ((target != null) && target.isPlayable() && !((Playable) target).isAlikeDead() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
if ((target != null) && target.isPlayable() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
{
|
||||
caster.doCast(skill);
|
||||
}
|
||||
@ -381,6 +381,11 @@ public class AutoUseTaskManager implements Runnable
|
||||
}
|
||||
}
|
||||
|
||||
if ((target != null) && target.isCreature() && ((Creature) target).isAlikeDead() && (skill.getTargetType() != TargetType.SELF) && (skill.getTargetType() != TargetType.NPC_BODY) && (skill.getTargetType() != TargetType.PC_BODY))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
final Playable playableTarget = (target == null) || !target.isPlayable() || (skill.getTargetType() == TargetType.SELF) ? player : (Playable) target;
|
||||
if (!canUseMagic(player, playableTarget, skill))
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ public class AutoUseTaskManager implements Runnable
|
||||
|
||||
// Playable target cast.
|
||||
final Playable caster = pet != null ? pet : player;
|
||||
if ((target != null) && target.isPlayable() && !((Playable) target).isAlikeDead() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
if ((target != null) && target.isPlayable() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
{
|
||||
caster.doCast(skill);
|
||||
}
|
||||
@ -381,6 +381,11 @@ public class AutoUseTaskManager implements Runnable
|
||||
}
|
||||
}
|
||||
|
||||
if ((target != null) && target.isCreature() && ((Creature) target).isAlikeDead() && (skill.getTargetType() != TargetType.SELF) && (skill.getTargetType() != TargetType.NPC_BODY) && (skill.getTargetType() != TargetType.PC_BODY))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
final Playable playableTarget = (target == null) || !target.isPlayable() || (skill.getTargetType() == TargetType.SELF) ? player : (Playable) target;
|
||||
if (!canUseMagic(player, playableTarget, skill))
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ public class AutoUseTaskManager implements Runnable
|
||||
|
||||
// Playable target cast.
|
||||
final Playable caster = pet != null ? pet : player;
|
||||
if ((target != null) && target.isPlayable() && !((Playable) target).isAlikeDead() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
if ((target != null) && target.isPlayable() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
{
|
||||
caster.doCast(skill);
|
||||
}
|
||||
@ -381,6 +381,11 @@ public class AutoUseTaskManager implements Runnable
|
||||
}
|
||||
}
|
||||
|
||||
if ((target != null) && target.isCreature() && ((Creature) target).isAlikeDead() && (skill.getTargetType() != TargetType.SELF) && (skill.getTargetType() != TargetType.NPC_BODY) && (skill.getTargetType() != TargetType.PC_BODY))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
final Playable playableTarget = (target == null) || !target.isPlayable() || (skill.getTargetType() == TargetType.SELF) ? player : (Playable) target;
|
||||
if (!canUseMagic(player, playableTarget, skill))
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ public class AutoUseTaskManager implements Runnable
|
||||
|
||||
// Playable target cast.
|
||||
final Playable caster = pet != null ? pet : player;
|
||||
if ((target != null) && target.isPlayable() && !((Playable) target).isAlikeDead() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
if ((target != null) && target.isPlayable() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
{
|
||||
caster.doCast(skill);
|
||||
}
|
||||
@ -381,6 +381,11 @@ public class AutoUseTaskManager implements Runnable
|
||||
}
|
||||
}
|
||||
|
||||
if ((target != null) && target.isCreature() && ((Creature) target).isAlikeDead() && (skill.getTargetType() != TargetType.SELF) && (skill.getTargetType() != TargetType.NPC_BODY) && (skill.getTargetType() != TargetType.PC_BODY))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
final Playable playableTarget = (target == null) || !target.isPlayable() || (skill.getTargetType() == TargetType.SELF) ? player : (Playable) target;
|
||||
if (!canUseMagic(player, playableTarget, skill))
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ public class AutoUseTaskManager implements Runnable
|
||||
|
||||
// Playable target cast.
|
||||
final Playable caster = pet != null ? pet : player;
|
||||
if ((target != null) && target.isPlayable() && !((Playable) target).isAlikeDead() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
if ((target != null) && target.isPlayable() && (target.getActingPlayer().getPvpFlag() == 0) && (target.getActingPlayer().getReputation() >= 0))
|
||||
{
|
||||
caster.doCast(skill);
|
||||
}
|
||||
@ -381,6 +381,11 @@ public class AutoUseTaskManager implements Runnable
|
||||
}
|
||||
}
|
||||
|
||||
if ((target != null) && target.isCreature() && ((Creature) target).isAlikeDead() && (skill.getTargetType() != TargetType.SELF) && (skill.getTargetType() != TargetType.NPC_BODY) && (skill.getTargetType() != TargetType.PC_BODY))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
final Playable playableTarget = (target == null) || !target.isPlayable() || (skill.getTargetType() == TargetType.SELF) ? player : (Playable) target;
|
||||
if (!canUseMagic(player, playableTarget, skill))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user