1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-10 09:22:49 +00:00

Fixed small bugs

Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
2011-07-31 23:18:38 -03:00
parent 7eca70e881
commit 6b79db00c2
18 changed files with 77 additions and 39 deletions

View File

@@ -57,7 +57,7 @@ public abstract class AbstractDesire implements Desire {
}
@Override
public int getDesirePower() {
public synchronized int getDesirePower() {
return desirePower;
}

View File

@@ -81,8 +81,9 @@ public class CM_ENTER_WORLD extends AbstractClientPacket {
try {
characterService.enterWorld(id.getObject());
} catch (SpawnPointNotFoundServiceException e) {
conn.sendActionFailed();
} catch (AlreadySpawnedServiceException e) {
//TODO send an error message here
}
}
}

View File

@@ -45,7 +45,7 @@ public class CM_REQUEST_CHAR_TEMPLATE extends AbstractClientPacket {
/**
* List of {@link CharacterClass} templates sent to the client
*/
public static final CharacterClass[] TEMPLATE_CLASSES = {
protected static final CharacterClass[] TEMPLATE_CLASSES = {
CharacterClass.HUMAN_FIGHTER, CharacterClass.HUMAN_MYSTIC,
CharacterClass.ELVEN_FIGHTER, CharacterClass.ELVEN_MYSTIC,
CharacterClass.DARK_FIGHTER, CharacterClass.DARK_MYSTIC,

View File

@@ -48,11 +48,11 @@ public class SM_NPC_INFO extends AbstractServerPacket {
buffer.writeInt(npc.getID().getID());
buffer.writeInt(template.getID().getID() + 1000000); // npctype id
if (npc instanceof NPC) {
//if (npc instanceof NPC) {
buffer.writeInt((template.isAttackable() ? 0x01 : 0x00));
} else {
buffer.writeInt(0x01);
}
//} else {
// buffer.writeInt(0x01);
//}
buffer.writeInt(npc.getPoint().getX());
buffer.writeInt(npc.getPoint().getY());
buffer.writeInt(npc.getPoint().getZ());