Browse Source

Better handling of null guilds.

magicbox-1.5.2^2
MagicBot 10 months ago
parent
commit
f845c0ad80
  1. 6
      src/engine/objects/NPC.java

6
src/engine/objects/NPC.java

@ -461,6 +461,8 @@ public class NPC extends AbstractCharacter {
NPC newNPC = new NPC(); NPC newNPC = new NPC();
newNPC.parentZoneUUID = parent.getObjectUUID();
newNPC.name = name; newNPC.name = name;
newNPC.contractUUID = contractID; newNPC.contractUUID = contractID;
@ -469,7 +471,9 @@ public class NPC extends AbstractCharacter {
else else
newNPC.bindLoc = Vector3fImmutable.ZERO; newNPC.bindLoc = Vector3fImmutable.ZERO;
newNPC.parentZoneUUID = parent.getObjectUUID(); if (guild == null)
newNPC.guildUUID = 0;
else
newNPC.guildUUID = guild.getObjectUUID(); newNPC.guildUUID = guild.getObjectUUID();
if (building == null) if (building == null)

Loading…
Cancel
Save