Browse Source

Location serialization matches NPC

master
MagicBot 2 years ago
parent
commit
b5e2848091
  1. 15
      src/engine/objects/Mob.java

15
src/engine/objects/Mob.java

@ -391,12 +391,20 @@ public class Mob extends AbstractIntelligenceAgent { @@ -391,12 +391,20 @@ public class Mob extends AbstractIntelligenceAgent {
writer.putInt(2); //Unknown
writer.putInt(1); //Unknown - Headlights?
writer.putInt(0);
writer.putInt(0);
writer.putInt(0);
if (mob.building != null && mob.region != null) {
writer.putInt(mob.building.getObjectType().ordinal());
writer.putInt(mob.building.getObjectUUID());
} else {
writer.putInt(0); //<-Building Object Type
writer.putInt(0); //<-Building Object ID
}
writer.put((byte) 0);
writer.put((byte) 0);
writer.put((byte) 0);
writer.putInt(0);
writer.putInt(0); // NPC menu options
if (mob.contract != null && mob.npcOwner == null) {
writer.put((byte) 1);
@ -408,7 +416,6 @@ public class Mob extends AbstractIntelligenceAgent { @@ -408,7 +416,6 @@ public class Mob extends AbstractIntelligenceAgent {
} else writer.put((byte) 0);
if (mob.npcOwner != null) {
writer.put((byte) 1);
writer.putInt(GameObjectType.PlayerCharacter.ordinal());

Loading…
Cancel
Save