Dropped blinkActive related methods.

Thanks to Sahar.
This commit is contained in:
MobiusDevelopment
2021-08-22 21:03:02 +00:00
parent 2e3dd3d853
commit 7d4c880e4f
71 changed files with 48 additions and 728 deletions
@@ -39,7 +39,6 @@ import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -543,8 +542,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10471,16 +10468,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -39,7 +39,6 @@ import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -545,8 +544,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10478,16 +10475,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -39,7 +39,6 @@ import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -547,8 +546,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10480,16 +10477,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -38,7 +38,6 @@ import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -551,8 +550,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10471,16 +10468,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -38,7 +38,6 @@ import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -549,8 +548,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10461,16 +10458,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -38,7 +38,6 @@ import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -549,8 +548,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10464,16 +10461,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -38,7 +38,6 @@ import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -549,8 +548,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10470,16 +10467,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -39,7 +39,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -562,8 +561,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10480,16 +10477,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -39,7 +39,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -565,8 +564,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10591,16 +10588,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -39,7 +39,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -578,8 +577,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10617,16 +10614,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -39,7 +39,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -578,8 +577,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10617,16 +10614,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -45,7 +45,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -45,7 +45,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -38,7 +38,6 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Level;
@@ -529,8 +528,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10887,16 +10884,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -53,11 +53,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -39,7 +39,6 @@ import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
@@ -548,8 +547,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10770,16 +10767,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -53,11 +53,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -41,7 +41,6 @@ import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -546,8 +545,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10382,16 +10379,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -41,7 +41,6 @@ import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -546,8 +545,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10382,16 +10379,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -41,7 +41,6 @@ import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -544,8 +543,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10368,16 +10365,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -41,7 +41,6 @@ import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -550,8 +549,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10395,16 +10392,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -41,7 +41,6 @@ import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -550,8 +549,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10395,16 +10392,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -42,7 +42,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -565,8 +564,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10340,16 +10337,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -39,7 +39,6 @@ import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -541,8 +540,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10378,16 +10375,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -42,7 +42,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -584,8 +583,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10506,16 +10503,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -42,7 +42,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -608,8 +607,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10572,16 +10569,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)
@@ -42,7 +42,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -608,8 +607,6 @@ public class PlayerInstance extends Playable
/** Stored from last ValidatePosition **/
private final Location _lastServerPosition = new Location(0, 0, 0);
private final AtomicBoolean _blinkActive = new AtomicBoolean();
/** The number of recommendation obtained by the PlayerInstance */
private int _recomHave; // how much I was recommended by others
/** The number of recommendation that the PlayerInstance can give */
@@ -10572,16 +10569,6 @@ public class PlayerInstance extends Playable
return _lastServerPosition;
}
public void setBlinkActive(boolean value)
{
_blinkActive.set(value);
}
public boolean isBlinkActive()
{
return _blinkActive.get();
}
@Override
public void addExpAndSp(double addToExp, double addToSp)
{
@@ -46,7 +46,7 @@ public class ValidatePosition implements IClientIncomingPacket
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if ((player == null) || player.isTeleporting() || player.inObserverMode())
if ((player == null) || player.isTeleporting() || player.inObserverMode() || player.isCastingNow())
{
return;
}
@@ -105,16 +105,9 @@ public class ValidatePosition implements IClientIncomingPacket
// Check out of sync.
if (player.calculateDistance3D(_x, _y, _z) > player.getStat().getMoveSpeed())
{
if (player.isBlinkActive())
{
player.setBlinkActive(false);
}
else
{
player.setXYZ(_x, _y, _z);
}
}
player.setClientX(_x);
player.setClientY(_y);
@@ -62,11 +62,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_destY = destY;
_destZ = destZ;
_type = type;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, int destX, int destY, int destZ, FlyType type, int flySpeed, int flyDelay, int animationSpeed)
@@ -82,11 +77,6 @@ public class FlyToLocation implements IClientOutgoingPacket
_flySpeed = flySpeed;
_flyDelay = flyDelay;
_animationSpeed = animationSpeed;
if (creature.isPlayer())
{
creature.getActingPlayer().setBlinkActive(true);
}
}
public FlyToLocation(Creature creature, ILocational dest, FlyType type)