diff --git a/src/engine/gameManager/BuildingManager.java b/src/engine/gameManager/BuildingManager.java index b194b93e..8baa980f 100644 --- a/src/engine/gameManager/BuildingManager.java +++ b/src/engine/gameManager/BuildingManager.java @@ -502,7 +502,7 @@ public enum BuildingManager { return false; npc.setBuilding(building); - WorldGrid.addObject(npc, contractOwner); + npc.setLoc(npc.bindLoc); return true; diff --git a/src/engine/objects/NPC.java b/src/engine/objects/NPC.java index b382d77a..d5705f4e 100644 --- a/src/engine/objects/NPC.java +++ b/src/engine/objects/NPC.java @@ -518,7 +518,9 @@ public class NPC extends AbstractCharacter { if (id == 0) return null; + NPC npc = (NPC) DbManager.getFromCache(GameObjectType.NPC, id); + if (npc != null) return npc;