add npc command
This commit is contained in:
@@ -86,13 +86,15 @@ public class AddNPCCmd extends AbstractDevCmd {
|
|||||||
loc = pc.loc;
|
loc = pc.loc;
|
||||||
}
|
}
|
||||||
created = NPC.createNPC(name, contractID, loc, guild, zone, (short)level, building);
|
created = NPC.createNPC(name, contractID, loc, guild, zone, (short)level, building);
|
||||||
|
created.bindLoc = loc;
|
||||||
if(building != null) {
|
if(building != null) {
|
||||||
created.buildingUUID = building.getObjectUUID();
|
created.buildingUUID = building.getObjectUUID();
|
||||||
created.building = building;
|
created.building = building;
|
||||||
|
|
||||||
NPCManager.slotCharacterInBuilding(created);
|
NPCManager.slotCharacterInBuilding(created);
|
||||||
}
|
}
|
||||||
created.setLoc(created.bindLoc);
|
created.setLoc(created.bindLoc);
|
||||||
|
created.updateDatabase();
|
||||||
|
throwbackInfo(pc, "Created NPC with UUID: " + created.getObjectUUID());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -470,8 +470,11 @@ public class NPC extends AbstractCharacter {
|
|||||||
newNPC.bindLoc = Vector3fImmutable.ZERO;
|
newNPC.bindLoc = Vector3fImmutable.ZERO;
|
||||||
|
|
||||||
newNPC.parentZoneUUID = parent.getObjectUUID();
|
newNPC.parentZoneUUID = parent.getObjectUUID();
|
||||||
newNPC.guildUUID = guild.getObjectUUID();
|
if(guild == null){
|
||||||
|
newNPC.guildUUID = Guild.getErrantGuild().getObjectUUID();
|
||||||
|
}else {
|
||||||
|
newNPC.guildUUID = guild.getObjectUUID();
|
||||||
|
}
|
||||||
if (building == null)
|
if (building == null)
|
||||||
newNPC.buildingUUID = 0;
|
newNPC.buildingUUID = 0;
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user