Fixed setImobilized exploit.
This commit is contained in:
@@ -156,7 +156,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
private boolean _isMuted = false; // Cannot use magic
|
private boolean _isMuted = false; // Cannot use magic
|
||||||
private boolean _isPhysicalMuted = false; // Cannot use psychical skills
|
private boolean _isPhysicalMuted = false; // Cannot use psychical skills
|
||||||
private boolean _isKilledAlready = false;
|
private boolean _isKilledAlready = false;
|
||||||
private int _isImmobilized = 0;
|
private boolean _isImmobilized = false;
|
||||||
private boolean _isOverloaded = false; // the char is carrying too much
|
private boolean _isOverloaded = false; // the char is carrying too much
|
||||||
private boolean _isParalyzed = false;
|
private boolean _isParalyzed = false;
|
||||||
private boolean _isRiding = false; // Is Riding strider?
|
private boolean _isRiding = false; // Is Riding strider?
|
||||||
@@ -2159,7 +2159,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
*/
|
*/
|
||||||
public boolean isImmobilized()
|
public boolean isImmobilized()
|
||||||
{
|
{
|
||||||
return _isImmobilized > 0;
|
return _isImmobilized;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2171,13 +2171,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
// Stop this if he is moving
|
// Stop this if he is moving
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||||
|
|
||||||
if (value)
|
if (_isImmobilized != value)
|
||||||
{
|
{
|
||||||
_isImmobilized++;
|
_isImmobilized = value;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_isImmobilized--;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8541,7 +8537,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_nextReducingHPByOverTime = Chronos.currentTimeMillis() + (period * 1000);
|
_nextReducingHPByOverTime = Chronos.currentTimeMillis() + (period * 880);
|
||||||
reduceCurrentHp(amount, attacker, awake);
|
reduceCurrentHp(amount, attacker, awake);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8554,7 +8550,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_nextReducingMPByOverTime = Chronos.currentTimeMillis() + (period * 1000);
|
_nextReducingMPByOverTime = Chronos.currentTimeMillis() + (period * 880);
|
||||||
reduceCurrentMp(amount);
|
reduceCurrentMp(amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -39,19 +39,20 @@ final class EffectImobileBuff extends Effect
|
|||||||
@Override
|
@Override
|
||||||
public void onStart()
|
public void onStart()
|
||||||
{
|
{
|
||||||
|
super.onStart();
|
||||||
getEffector().setImmobilized(true);
|
getEffector().setImmobilized(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onExit()
|
public void onExit()
|
||||||
{
|
{
|
||||||
|
super.onExit();
|
||||||
getEffector().setImmobilized(false);
|
getEffector().setImmobilized(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onActionTime()
|
public boolean onActionTime()
|
||||||
{
|
{
|
||||||
// just stop this effect
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -158,7 +158,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
private boolean _isMuted = false; // Cannot use magic
|
private boolean _isMuted = false; // Cannot use magic
|
||||||
private boolean _isPhysicalMuted = false; // Cannot use psychical skills
|
private boolean _isPhysicalMuted = false; // Cannot use psychical skills
|
||||||
private boolean _isKilledAlready = false;
|
private boolean _isKilledAlready = false;
|
||||||
private int _isImmobilized = 0;
|
private boolean _isImmobilized = false;
|
||||||
private boolean _isOverloaded = false; // the char is carrying too much
|
private boolean _isOverloaded = false; // the char is carrying too much
|
||||||
private boolean _isParalyzed = false;
|
private boolean _isParalyzed = false;
|
||||||
private boolean _isRiding = false; // Is Riding strider?
|
private boolean _isRiding = false; // Is Riding strider?
|
||||||
@@ -2202,7 +2202,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
*/
|
*/
|
||||||
public boolean isImmobilized()
|
public boolean isImmobilized()
|
||||||
{
|
{
|
||||||
return _isImmobilized > 0;
|
return _isImmobilized;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2214,13 +2214,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
// Stop this if he is moving
|
// Stop this if he is moving
|
||||||
getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||||
|
|
||||||
if (value)
|
if (_isImmobilized != value)
|
||||||
{
|
{
|
||||||
_isImmobilized++;
|
_isImmobilized = value;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_isImmobilized--;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8588,7 +8584,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_nextReducingHPByOverTime = Chronos.currentTimeMillis() + (period * 1000);
|
_nextReducingHPByOverTime = Chronos.currentTimeMillis() + (period * 880);
|
||||||
reduceCurrentHp(amount, attacker, awake);
|
reduceCurrentHp(amount, attacker, awake);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8601,7 +8597,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_nextReducingMPByOverTime = Chronos.currentTimeMillis() + (period * 1000);
|
_nextReducingMPByOverTime = Chronos.currentTimeMillis() + (period * 880);
|
||||||
reduceCurrentMp(amount);
|
reduceCurrentMp(amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -39,19 +39,20 @@ final class EffectImobileBuff extends Effect
|
|||||||
@Override
|
@Override
|
||||||
public void onStart()
|
public void onStart()
|
||||||
{
|
{
|
||||||
|
super.onStart();
|
||||||
getEffector().setImmobilized(true);
|
getEffector().setImmobilized(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onExit()
|
public void onExit()
|
||||||
{
|
{
|
||||||
|
super.onExit();
|
||||||
getEffector().setImmobilized(false);
|
getEffector().setImmobilized(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onActionTime()
|
public boolean onActionTime()
|
||||||
{
|
{
|
||||||
// just stop this effect
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user