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

View File

@ -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)
{

View File

@ -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;
}
@ -106,14 +106,7 @@ 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.setXYZ(_x, _y, _z);
}
player.setClientX(_x);

View File

@ -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)