Replaced disabled skills CopyOnWriteArrayList, also minor loc and PlayerInstance cleanups.
This commit is contained in:
parent
12bc3abb9f
commit
5a26950843
@ -32,10 +32,8 @@ public class Loc implements IUserCommandHandler
|
|||||||
@Override
|
@Override
|
||||||
public boolean useUserCommand(int id, PlayerInstance player)
|
public boolean useUserCommand(int id, PlayerInstance player)
|
||||||
{
|
{
|
||||||
final int _nearestTown = MapRegionData.getInstance().getClosestTownNumber(player);
|
final SystemMessageId msg;
|
||||||
SystemMessageId msg;
|
switch (MapRegionData.getInstance().getClosestTownNumber(player))
|
||||||
|
|
||||||
switch (_nearestTown)
|
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
|
@ -23,8 +23,8 @@ import java.util.Collection;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@ -4337,7 +4337,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
public int geoPathGty;
|
public int geoPathGty;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected List<Skill> _disabledSkills = new CopyOnWriteArrayList<>();
|
protected Set<Skill> _disabledSkills = ConcurrentHashMap.newKeySet();
|
||||||
private boolean _allSkillsDisabled;
|
private boolean _allSkillsDisabled;
|
||||||
protected MoveData _move;
|
protected MoveData _move;
|
||||||
private boolean _cursorKeyMovement = false;
|
private boolean _cursorKeyMovement = false;
|
||||||
|
@ -700,7 +700,6 @@ public class PlayerInstance extends Playable
|
|||||||
{
|
{
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// during teleport phase, players cant do any attack
|
// during teleport phase, players cant do any attack
|
||||||
|
@ -32,10 +32,8 @@ public class Loc implements IUserCommandHandler
|
|||||||
@Override
|
@Override
|
||||||
public boolean useUserCommand(int id, PlayerInstance player)
|
public boolean useUserCommand(int id, PlayerInstance player)
|
||||||
{
|
{
|
||||||
final int _nearestTown = MapRegionData.getInstance().getClosestTownNumber(player);
|
final SystemMessageId msg;
|
||||||
SystemMessageId msg;
|
switch (MapRegionData.getInstance().getClosestTownNumber(player))
|
||||||
|
|
||||||
switch (_nearestTown)
|
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
|
@ -23,8 +23,8 @@ import java.util.Collection;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@ -4385,7 +4385,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
public int geoPathGty;
|
public int geoPathGty;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected List<Skill> _disabledSkills = new CopyOnWriteArrayList<>();
|
protected Set<Skill> _disabledSkills = ConcurrentHashMap.newKeySet();
|
||||||
private boolean _allSkillsDisabled;
|
private boolean _allSkillsDisabled;
|
||||||
protected MoveData _move;
|
protected MoveData _move;
|
||||||
private boolean _cursorKeyMovement = false;
|
private boolean _cursorKeyMovement = false;
|
||||||
|
@ -714,7 +714,6 @@ public class PlayerInstance extends Playable
|
|||||||
{
|
{
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// during teleport phase, players cant do any attack
|
// during teleport phase, players cant do any attack
|
||||||
|
Loading…
Reference in New Issue
Block a user