diff --git a/src/resources/objects/creature/CreatureObject.java b/src/resources/objects/creature/CreatureObject.java index 1e136aee4..f360350e0 100644 --- a/src/resources/objects/creature/CreatureObject.java +++ b/src/resources/objects/creature/CreatureObject.java @@ -52,9 +52,9 @@ public class CreatureObject extends TangibleObject { private SWGList baseAttributes = new SWGList(BaselineType.CREO, 1, 2); private SWGList skills = new SWGList(BaselineType.CREO, 1, 3, false, StringType.ASCII); - private SWGList hamEncumbList = new SWGList(BaselineType.CREO, 4, 2); - private SWGList attributes = new SWGList(BaselineType.CREO, 6, 13); - private SWGList maxAttributes = new SWGList(BaselineType.CREO, 6, 14); + private SWGList hamEncumbList = new SWGList(BaselineType.CREO, 4, 2, true); + private SWGList attributes = new SWGList(BaselineType.CREO, 6, 13, true); + private SWGList maxAttributes = new SWGList(BaselineType.CREO, 6, 14, true); private SWGList equipmentList = new SWGList(BaselineType.CREO, 6, 15); private SWGList appearanceList = new SWGList(BaselineType.CREO, 6, 25); @@ -65,16 +65,9 @@ public class CreatureObject extends TangibleObject { public CreatureObject(long objectId) { super(objectId); - - attributes.add(1000); // Health - attributes.add(0); - attributes.add(300); // Action - attributes.add(0); - attributes.add(300); // ?? - attributes.add(0); - - maxAttributes.addAll(attributes); - baseAttributes.addAll(attributes); + initMaxAttributes(); + initCurrentAttributes(); + initBaseAttributes(); } public void addEquipment(SWGObject obj) { @@ -370,7 +363,7 @@ public class CreatureObject extends TangibleObject { public void setMaxHealth(int maxHealth) { synchronized(maxAttributes) { maxAttributes.set(0, maxHealth); - //maxAttributes.sendDeltaMessage(this); + maxAttributes.sendDeltaMessage(this); } } @@ -388,6 +381,36 @@ public class CreatureObject extends TangibleObject { } } + private void initMaxAttributes() { + maxAttributes.add(0, 1000); // Health + maxAttributes.add(1, 0); + maxAttributes.add(2, 300); // Action + maxAttributes.add(3, 0); + maxAttributes.add(4, 300); // ?? + maxAttributes.add(5, 0); + maxAttributes.clearDeltaQueue(); + } + + private void initCurrentAttributes() { + attributes.add(0, 1000); // Health + attributes.add(1, 0); + attributes.add(2, 300); // Action + attributes.add(3, 0); + attributes.add(4, 300); // ?? + attributes.add(5, 0); + attributes.clearDeltaQueue(); + } + + private void initBaseAttributes() { + baseAttributes.add(0, 1000); // Health + baseAttributes.add(1, 0); + baseAttributes.add(2, 300); // Action + baseAttributes.add(3, 0); + baseAttributes.add(4, 300); // ?? + baseAttributes.add(5, 0); + baseAttributes.clearDeltaQueue(); + } + public void createObject(Player target) { sendSceneCreateObject(target); diff --git a/src/services/player/ZoneService.java b/src/services/player/ZoneService.java index cb8a5385f..a455fc4a2 100644 --- a/src/services/player/ZoneService.java +++ b/src/services/player/ZoneService.java @@ -106,6 +106,7 @@ public class ZoneService extends Service { private void handleCmdSceneReady(Player player, CmdSceneReady p) { player.setPlayerState(PlayerState.ZONED_IN); player.sendPacket(p); + System.out.println("[" + player.getUsername() +"] " + player.getCharacterName() + " zoned in"); } private void handleClientIdMsg(Player player, ClientIdMsg clientId) {