Browse Source

One serialization not 3.

master
MagicBot 2 years ago
parent
commit
21241aa5df
  1. 8
      src/engine/net/client/msg/LoadCharacterMsg.java

8
src/engine/net/client/msg/LoadCharacterMsg.java

@ -17,7 +17,6 @@ import engine.net.ByteBufferWriter;
import engine.net.client.Protocol; import engine.net.client.Protocol;
import engine.objects.AbstractCharacter; import engine.objects.AbstractCharacter;
import engine.objects.Corpse; import engine.objects.Corpse;
import engine.objects.NPC;
public class LoadCharacterMsg extends ClientNetMsg { public class LoadCharacterMsg extends ClientNetMsg {
@ -71,11 +70,10 @@ public class LoadCharacterMsg extends ClientNetMsg {
protected void _serialize(ByteBufferWriter writer) throws SerializationException { protected void _serialize(ByteBufferWriter writer) throws SerializationException {
if (absChar != null) { if (absChar != null) {
NPC npc = (NPC) absChar;
if (npc.region != null) { if (absChar.region != null) {
writer.putInt(npc.region.getLevel()); writer.putInt(absChar.region.getLevel());
writer.putInt(npc.region.getRoom()); writer.putInt(absChar.region.getRoom());
} else { } else {
writer.putInt(-1); writer.putInt(-1);
writer.putInt(-1); writer.putInt(-1);

Loading…
Cancel
Save