Browse Source

Better handling of null guilds.

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

8
src/engine/objects/NPC.java

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

Loading…
Cancel
Save