Better handling of null guilds.

This commit is contained in:
2024-01-28 10:15:55 -05:00
parent 165752f6d6
commit f845c0ad80
+6 -2
View File
@@ -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,8 +471,10 @@ public class NPC extends AbstractCharacter {
else else
newNPC.bindLoc = Vector3fImmutable.ZERO; newNPC.bindLoc = Vector3fImmutable.ZERO;
newNPC.parentZoneUUID = parent.getObjectUUID(); if (guild == null)
newNPC.guildUUID = guild.getObjectUUID(); newNPC.guildUUID = 0;
else
newNPC.guildUUID = guild.getObjectUUID();
if (building == null) if (building == null)
newNPC.buildingUUID = 0; newNPC.buildingUUID = 0;