Browse Source

loc set to bindloc after npc returned.

master
MagicBot 1 year ago
parent
commit
8ba4ed20c8
  1. 2
      src/engine/gameManager/BuildingManager.java
  2. 2
      src/engine/objects/NPC.java

2
src/engine/gameManager/BuildingManager.java

@ -502,7 +502,7 @@ public enum BuildingManager {
return false; return false;
npc.setBuilding(building); npc.setBuilding(building);
WorldGrid.addObject(npc, contractOwner); npc.setLoc(npc.bindLoc);
return true; return true;

2
src/engine/objects/NPC.java

@ -518,7 +518,9 @@ public class NPC extends AbstractCharacter {
if (id == 0) if (id == 0)
return null; return null;
NPC npc = (NPC) DbManager.getFromCache(GameObjectType.NPC, id); NPC npc = (NPC) DbManager.getFromCache(GameObjectType.NPC, id);
if (npc != null) if (npc != null)
return npc; return npc;

Loading…
Cancel
Save