1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-08 08:23:11 +00:00

Template classes for all NPC instances

Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
2011-05-23 01:23:41 -03:00
parent ebc7947473
commit 66d5fee187
9119 changed files with 664622 additions and 410 deletions

View File

@@ -32,6 +32,7 @@ import com.l2jserver.model.world.character.CharacterClass;
import com.l2jserver.model.world.character.CharacterFriendList;
import com.l2jserver.model.world.character.CharacterInventory;
import com.l2jserver.model.world.character.CharacterShortcutContainer;
import com.l2jserver.util.dimensional.Point;
/**
* This class represents a playable character in Lineage II world.
@@ -129,10 +130,20 @@ public class L2Character extends Player {
*/
private CharacterState state;
/**
* The valid states for an character
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public enum CharacterState {
TELEPORTING, CASTING, ATTACKING, MOVING;
}
/**
* The point the player is moving, teleporting etc...
*/
private Point targetLocation;
/**
* Creates a new instance
*
@@ -330,6 +341,28 @@ public class L2Character extends Player {
return state == CharacterState.TELEPORTING;
}
/**
* @return true if character is moving
*/
public boolean isMoving() {
return state == CharacterState.MOVING;
}
/**
* @return the targetLocation
*/
public Point getTargetLocation() {
return targetLocation;
}
/**
* @param targetLocation
* the targetLocation to set
*/
public void setTargetLocation(Point targetLocation) {
this.targetLocation = targetLocation;
}
/**
* @return the inventory
*/