Addition of Creature isDisabled method.
This commit is contained in:
@@ -951,7 +951,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1928,11 +1928,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2881,7 +2881,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
@@ -548,8 +548,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -951,7 +951,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1928,11 +1928,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2887,7 +2887,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+2
-2
@@ -548,8 +548,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -951,7 +951,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1928,11 +1928,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2889,7 +2889,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
@@ -548,8 +548,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+12
-4
@@ -951,7 +951,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1928,11 +1928,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2885,7 +2885,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+2
-2
@@ -548,8 +548,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -951,7 +951,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1928,11 +1928,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2881,7 +2881,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+2
-2
@@ -548,8 +548,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -951,7 +951,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1928,11 +1928,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2881,7 +2881,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+2
-2
@@ -548,8 +548,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -951,7 +951,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1928,11 +1928,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2882,7 +2882,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
@@ -548,8 +548,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+12
-4
@@ -951,7 +951,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1928,11 +1928,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2816,7 +2816,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+2
-2
@@ -548,8 +548,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -951,7 +951,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1928,11 +1928,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2847,7 +2847,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+2
-2
@@ -548,8 +548,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+12
-4
@@ -951,7 +951,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1928,11 +1928,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2864,7 +2864,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+2
-2
@@ -548,8 +548,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+12
-4
@@ -951,7 +951,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1928,11 +1928,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2864,7 +2864,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+2
-2
@@ -548,8 +548,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+2
-2
@@ -153,7 +153,7 @@ public class QueenAnt extends Quest
|
||||
_larva = (MonsterInstance) addSpawn(LARVA, -21600, 179482, -5846, Rnd.get(360), false, 0);
|
||||
_larva.setUnkillable(true);
|
||||
_larva.setImmobilized(true);
|
||||
_larva.setAttackDisabled(true);
|
||||
_larva.setPhysicalAttackMuted(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -188,7 +188,7 @@ public class QueenAnt extends Quest
|
||||
final int x = (int) (radius * Math.cos(i * 1.407)); // 1.407~2pi/6
|
||||
final int y = (int) (radius * Math.sin(i * 1.407));
|
||||
_nurses.add((MonsterInstance) addSpawn(NURSE, npc.getX() + x, npc.getY() + y, npc.getZ(), 0, false, 0));
|
||||
_nurses.get(i).setAttackDisabled(true);
|
||||
_nurses.get(i).setPhysicalAttackMuted(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -750,7 +750,7 @@ public class AttackableAI extends CreatureAI
|
||||
}
|
||||
}
|
||||
|
||||
if (_actor.isAttackingDisabled())
|
||||
if (_actor.isAttackDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+2
-2
@@ -493,7 +493,7 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
if (/* _selfAnalysis.hasHealOrResurrect && */(creature instanceof PlayerInstance) && ((NpcInstance) _actor).getFort().getSiege().checkIsDefender(((PlayerInstance) creature).getClan()))
|
||||
{
|
||||
// heal friends
|
||||
if (!_actor.isAttackingDisabled() && (creature.getCurrentHp() < (creature.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && creature.isInCombat())
|
||||
if (!_actor.isAttackDisabled() && (creature.getCurrentHp() < (creature.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && creature.isInCombat())
|
||||
{
|
||||
for (Skill sk : /* _selfAnalysis.healSkills */healSkills)
|
||||
{
|
||||
@@ -554,7 +554,7 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
}
|
||||
}
|
||||
// heal friends
|
||||
if (/* _selfAnalysis.hasHealOrResurrect && */ !_actor.isAttackingDisabled() && (npc.getCurrentHp() < (npc.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && npc.isInCombat())
|
||||
if (/* _selfAnalysis.hasHealOrResurrect && */ !_actor.isAttackDisabled() && (npc.getCurrentHp() < (npc.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && npc.isInCombat())
|
||||
{
|
||||
for (Skill sk : /* _selfAnalysis.healSkills */ healSkills)
|
||||
{
|
||||
|
||||
+17
-16
@@ -180,7 +180,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
protected boolean _isTeleporting = false;
|
||||
protected boolean _isInvul = false;
|
||||
protected boolean _isUnkillable = false;
|
||||
protected boolean _isAttackDisabled = false;
|
||||
protected boolean _isPhysicalAttackMuted = false;
|
||||
private int _lastHealAmount = 0;
|
||||
private CreatureStat _stat;
|
||||
private CreatureStatus _status;
|
||||
@@ -752,7 +752,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
return;
|
||||
}
|
||||
|
||||
if (isAttackingDisabled())
|
||||
if (isAttackDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -2129,12 +2129,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyse).
|
||||
* @return true, if is attacking disabled
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return _isImmobileUntilAttacked || _isStunned || _isSleeping || _isFallsdown || (_attackEndTime > GameTimeTaskManager.getGameTicks()) || _isFakeDeath || _isParalyzed || _isAttackDisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _isFakeDeath || _isPhysicalAttackMuted || _isImmobileUntilAttacked || _isStunned || _isSleeping || _isFallsdown || _isParalyzed;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -9363,20 +9370,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
_isUnkillable = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the _isAttackDisabled
|
||||
*/
|
||||
public boolean isAttackDisabled()
|
||||
public boolean isPhysicalAttackMuted()
|
||||
{
|
||||
return _isAttackDisabled;
|
||||
return _isPhysicalAttackMuted;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param value the _isAttackDisabled to set
|
||||
*/
|
||||
public void setAttackDisabled(boolean value)
|
||||
public void setPhysicalAttackMuted(boolean value)
|
||||
{
|
||||
_isAttackDisabled = value;
|
||||
_isPhysicalAttackMuted = value;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -3081,7 +3081,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isOutOfControl() && !isImmobilized())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isOutOfControl() && !isImmobilized())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+1
-1
@@ -166,7 +166,7 @@ public class RequestActionUse implements IClientIncomingPacket
|
||||
{
|
||||
if ((target != null) && (pet != null) && (pet != target) && !player.isBetrayed())
|
||||
{
|
||||
if (pet.isAttackingDisabled())
|
||||
if (pet.isAttackDisabled())
|
||||
{
|
||||
if (pet.getAttackEndTime() > GameTimeTaskManager.getGameTicks())
|
||||
{
|
||||
|
||||
@@ -153,7 +153,7 @@ public class QueenAnt extends Quest
|
||||
_larva = (MonsterInstance) addSpawn(LARVA, -21600, 179482, -5846, Rnd.get(360), false, 0);
|
||||
_larva.setUnkillable(true);
|
||||
_larva.setImmobilized(true);
|
||||
_larva.setAttackDisabled(true);
|
||||
_larva.setPhysicalAttackMuted(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -188,7 +188,7 @@ public class QueenAnt extends Quest
|
||||
final int x = (int) (radius * Math.cos(i * 1.407)); // 1.407~2pi/6
|
||||
final int y = (int) (radius * Math.sin(i * 1.407));
|
||||
_nurses.add((MonsterInstance) addSpawn(NURSE, npc.getX() + x, npc.getY() + y, npc.getZ(), 0, false, 0));
|
||||
_nurses.get(i).setAttackDisabled(true);
|
||||
_nurses.get(i).setPhysicalAttackMuted(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -750,7 +750,7 @@ public class AttackableAI extends CreatureAI
|
||||
}
|
||||
}
|
||||
|
||||
if (_actor.isAttackingDisabled())
|
||||
if (_actor.isAttackDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -493,7 +493,7 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
if (/* _selfAnalysis.hasHealOrResurrect && */(creature instanceof PlayerInstance) && ((NpcInstance) _actor).getFort().getSiege().checkIsDefender(((PlayerInstance) creature).getClan()))
|
||||
{
|
||||
// heal friends
|
||||
if (!_actor.isAttackingDisabled() && (creature.getCurrentHp() < (creature.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && creature.isInCombat())
|
||||
if (!_actor.isAttackDisabled() && (creature.getCurrentHp() < (creature.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && creature.isInCombat())
|
||||
{
|
||||
for (Skill sk : /* _selfAnalysis.healSkills */healSkills)
|
||||
{
|
||||
@@ -554,7 +554,7 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
}
|
||||
}
|
||||
// heal friends
|
||||
if (/* _selfAnalysis.hasHealOrResurrect && */ !_actor.isAttackingDisabled() && (npc.getCurrentHp() < (npc.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && npc.isInCombat())
|
||||
if (/* _selfAnalysis.hasHealOrResurrect && */ !_actor.isAttackDisabled() && (npc.getCurrentHp() < (npc.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && npc.isInCombat())
|
||||
{
|
||||
for (Skill sk : /* _selfAnalysis.healSkills */ healSkills)
|
||||
{
|
||||
|
||||
@@ -182,7 +182,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
protected boolean _isTeleporting = false;
|
||||
protected boolean _isInvul = false;
|
||||
protected boolean _isUnkillable = false;
|
||||
protected boolean _isAttackDisabled = false;
|
||||
protected boolean _isPhysicalAttackMuted = false;
|
||||
private int _lastHealAmount = 0;
|
||||
private CreatureStat _stat;
|
||||
private CreatureStatus _status;
|
||||
@@ -762,7 +762,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
return;
|
||||
}
|
||||
|
||||
if (isAttackingDisabled())
|
||||
if (isAttackDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -2172,12 +2172,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyse).
|
||||
* @return true, if is attacking disabled
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return _isImmobileUntilAttacked || _isStunned || _isSleeping || _isFallsdown || (_attackEndTime > GameTimeTaskManager.getGameTicks()) || _isFakeDeath || _isParalyzed || _isAttackDisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _isFakeDeath || _isPhysicalAttackMuted || _isImmobileUntilAttacked || _isStunned || _isSleeping || _isFallsdown || _isParalyzed;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -9410,20 +9417,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
||||
_isUnkillable = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the _isAttackDisabled
|
||||
*/
|
||||
public boolean isAttackDisabled()
|
||||
public boolean isPhysicalAttackMuted()
|
||||
{
|
||||
return _isAttackDisabled;
|
||||
return _isPhysicalAttackMuted;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param value the _isAttackDisabled to set
|
||||
*/
|
||||
public void setAttackDisabled(boolean value)
|
||||
public void setPhysicalAttackMuted(boolean value)
|
||||
{
|
||||
_isAttackDisabled = value;
|
||||
_isPhysicalAttackMuted = value;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -3149,7 +3149,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isOutOfControl() && !isImmobilized())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isOutOfControl() && !isImmobilized())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+1
-1
@@ -166,7 +166,7 @@ public class RequestActionUse implements IClientIncomingPacket
|
||||
{
|
||||
if ((target != null) && (pet != null) && (pet != target) && !player.isBetrayed())
|
||||
{
|
||||
if (pet.isAttackingDisabled())
|
||||
if (pet.isAttackDisabled())
|
||||
{
|
||||
if (pet.getAttackEndTime() > GameTimeTaskManager.getGameTicks())
|
||||
{
|
||||
|
||||
@@ -367,7 +367,7 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
if (!(creature instanceof Npc))
|
||||
{
|
||||
if (_selfAnalysis.hasHealOrResurrect && creature.isPlayer() && ((Npc) _actor).getFort().getSiege().checkIsDefender(((PlayerInstance) creature).getClan())//
|
||||
&& !_actor.isAttackingDisabled() && (creature.getCurrentHp() < (creature.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && creature.isInCombat())
|
||||
&& !_actor.isAttackDisabled() && (creature.getCurrentHp() < (creature.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && creature.isInCombat())
|
||||
{
|
||||
for (Skill sk : _selfAnalysis.healSkills)
|
||||
{
|
||||
@@ -410,7 +410,7 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
return;
|
||||
}
|
||||
// heal friends
|
||||
if (_selfAnalysis.hasHealOrResurrect && !_actor.isAttackingDisabled() && (npc.getCurrentHp() < (npc.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && npc.isInCombat())
|
||||
if (_selfAnalysis.hasHealOrResurrect && !_actor.isAttackDisabled() && (npc.getCurrentHp() < (npc.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && npc.isInCombat())
|
||||
{
|
||||
for (Skill sk : _selfAnalysis.healSkills)
|
||||
{
|
||||
|
||||
@@ -358,7 +358,7 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
if (!(creature instanceof Npc))
|
||||
{
|
||||
if (_selfAnalysis.hasHealOrResurrect && creature.isPlayer() && (((Npc) _actor).getCastle().getSiege().checkIsDefender(((PlayerInstance) creature).getClan()))//
|
||||
&& !_actor.isAttackingDisabled() && (creature.getCurrentHp() < (creature.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && creature.isInCombat())
|
||||
&& !_actor.isAttackDisabled() && (creature.getCurrentHp() < (creature.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && creature.isInCombat())
|
||||
{
|
||||
for (Skill sk : _selfAnalysis.healSkills)
|
||||
{
|
||||
@@ -401,7 +401,7 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
return;
|
||||
}
|
||||
// heal friends
|
||||
if (_selfAnalysis.hasHealOrResurrect && !_actor.isAttackingDisabled() && (npc.getCurrentHp() < (npc.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && npc.isInCombat())
|
||||
if (_selfAnalysis.hasHealOrResurrect && !_actor.isAttackDisabled() && (npc.getCurrentHp() < (npc.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && npc.isInCombat())
|
||||
{
|
||||
for (Skill sk : _selfAnalysis.healSkills)
|
||||
{
|
||||
|
||||
@@ -909,7 +909,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || isAttackingDisabled() || !target.isTargetable())
|
||||
if ((target == null) || isAttackDisabled() || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -2670,11 +2670,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return isStunned() || isSleeping() || isAttackingNow() || isAlikeDead() || isParalyzed() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || isStunned() || isSleeping() || isParalyzed();
|
||||
}
|
||||
|
||||
public Calculator[] getCalculators()
|
||||
|
||||
+1
-1
@@ -2918,7 +2918,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (_waitTypeSitting || isAttackingDisabled() || isOutOfControl() || isImmobilized())
|
||||
if (_waitTypeSitting || isAttackDisabled() || isOutOfControl() || isImmobilized())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -367,7 +367,7 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
if (!(creature instanceof Npc))
|
||||
{
|
||||
if (_selfAnalysis.hasHealOrResurrect && creature.isPlayer() && ((Npc) _actor).getFort().getSiege().checkIsDefender(((PlayerInstance) creature).getClan())//
|
||||
&& !_actor.isAttackingDisabled() && (creature.getCurrentHp() < (creature.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && creature.isInCombat())
|
||||
&& !_actor.isAttackDisabled() && (creature.getCurrentHp() < (creature.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && creature.isInCombat())
|
||||
{
|
||||
for (Skill sk : _selfAnalysis.healSkills)
|
||||
{
|
||||
@@ -410,7 +410,7 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
return;
|
||||
}
|
||||
// heal friends
|
||||
if (_selfAnalysis.hasHealOrResurrect && !_actor.isAttackingDisabled() && (npc.getCurrentHp() < (npc.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && npc.isInCombat())
|
||||
if (_selfAnalysis.hasHealOrResurrect && !_actor.isAttackDisabled() && (npc.getCurrentHp() < (npc.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && npc.isInCombat())
|
||||
{
|
||||
for (Skill sk : _selfAnalysis.healSkills)
|
||||
{
|
||||
|
||||
@@ -358,7 +358,7 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
if (!(creature instanceof Npc))
|
||||
{
|
||||
if (_selfAnalysis.hasHealOrResurrect && creature.isPlayer() && (((Npc) _actor).getCastle().getSiege().checkIsDefender(((PlayerInstance) creature).getClan()))//
|
||||
&& !_actor.isAttackingDisabled() && (creature.getCurrentHp() < (creature.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && creature.isInCombat())
|
||||
&& !_actor.isAttackDisabled() && (creature.getCurrentHp() < (creature.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && creature.isInCombat())
|
||||
{
|
||||
for (Skill sk : _selfAnalysis.healSkills)
|
||||
{
|
||||
@@ -401,7 +401,7 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
return;
|
||||
}
|
||||
// heal friends
|
||||
if (_selfAnalysis.hasHealOrResurrect && !_actor.isAttackingDisabled() && (npc.getCurrentHp() < (npc.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && npc.isInCombat())
|
||||
if (_selfAnalysis.hasHealOrResurrect && !_actor.isAttackDisabled() && (npc.getCurrentHp() < (npc.getMaxHp() * 0.6)) && (_actor.getCurrentHp() > (_actor.getMaxHp() / 2)) && (_actor.getCurrentMp() > (_actor.getMaxMp() / 2)) && npc.isInCombat())
|
||||
{
|
||||
for (Skill sk : _selfAnalysis.healSkills)
|
||||
{
|
||||
|
||||
@@ -910,7 +910,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || isAttackingDisabled() || !target.isTargetable())
|
||||
if ((target == null) || isAttackDisabled() || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -2672,11 +2672,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return isStunned() || isSleeping() || isAttackingNow() || isAlikeDead() || isParalyzed() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || isStunned() || isSleeping() || isParalyzed();
|
||||
}
|
||||
|
||||
public Calculator[] getCalculators()
|
||||
|
||||
+1
-1
@@ -2829,7 +2829,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (_waitTypeSitting || isAttackingDisabled() || isOutOfControl() || isImmobilized())
|
||||
if (_waitTypeSitting || isAttackDisabled() || isOutOfControl() || isImmobilized())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+12
-4
@@ -951,7 +951,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1928,11 +1928,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2847,7 +2847,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+2
-2
@@ -548,8 +548,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+12
-4
@@ -951,7 +951,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1928,11 +1928,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2847,7 +2847,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+2
-2
@@ -548,8 +548,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+12
-4
@@ -951,7 +951,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1928,11 +1928,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2845,7 +2845,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+2
-2
@@ -548,8 +548,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+12
-4
@@ -952,7 +952,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1929,11 +1929,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2857,7 +2857,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+2
-2
@@ -548,8 +548,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+12
-4
@@ -952,7 +952,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1929,11 +1929,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2857,7 +2857,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+2
-2
@@ -548,8 +548,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+12
-4
@@ -952,7 +952,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1929,11 +1929,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2781,7 +2781,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+2
-2
@@ -553,8 +553,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+12
-4
@@ -951,7 +951,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1928,11 +1928,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2844,7 +2844,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+2
-2
@@ -548,8 +548,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+12
-4
@@ -955,7 +955,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1932,11 +1932,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2851,7 +2851,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+2
-2
@@ -553,8 +553,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+12
-4
@@ -955,7 +955,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1939,11 +1939,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2892,7 +2892,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+2
-2
@@ -553,8 +553,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
+12
-4
@@ -955,7 +955,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
try
|
||||
{
|
||||
if ((target == null) || (isAttackingDisabled() && !isSummon()) || !target.isTargetable())
|
||||
if ((target == null) || (isAttackDisabled() && !isSummon()) || !target.isTargetable())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1939,11 +1939,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature can't attack (stun, sleep, attackEndTime, fakeDeath, paralyze, attackMute).
|
||||
* @return True if the Creature can't attack (attackEndTime, attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isAttackingDisabled()
|
||||
public boolean isAttackDisabled()
|
||||
{
|
||||
return hasBlockActions() || isAttackingNow() || isAlikeDead() || isPhysicalAttackMuted() || _AIdisabled;
|
||||
return isAttackingNow() || isDisabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return True if the Creature is disabled (attackMute, fake death, stun, sleep, paralyze).
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return _AIdisabled || isAlikeDead() || isPhysicalAttackMuted() || hasBlockActions();
|
||||
}
|
||||
|
||||
public boolean isConfused()
|
||||
|
||||
+1
-1
@@ -2892,7 +2892,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_waitTypeSitting && !isAttackingDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
if (!_waitTypeSitting && !isAttackDisabled() && !isControlBlocked() && !isImmobilized() && !isFishing())
|
||||
{
|
||||
breakAttack();
|
||||
setSitting(true);
|
||||
|
||||
+2
-2
@@ -553,8 +553,8 @@ public class SkillCaster implements Runnable
|
||||
// Launch the magic skill in order to calculate its effects
|
||||
try
|
||||
{
|
||||
// Mobius: Disabled characters should not be able to finish bad skills.
|
||||
if (caster.isAttackingDisabled() && skill.isBad())
|
||||
// Disabled characters should not be able to finish bad skills.
|
||||
if (skill.isBad() && caster.isDisabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user