forked from MagicBane/Server
NPC derives position from slot.
This commit is contained in:
@@ -523,6 +523,12 @@ public enum BuildingManager {
|
||||
mob.setParentZone(zone);
|
||||
return true;
|
||||
}
|
||||
|
||||
// NPC in a Building derives position from slot
|
||||
|
||||
if (building != null)
|
||||
NpcLoc = Vector3fImmutable.ZERO;
|
||||
|
||||
npc = NPC.createNPC(pirateName, contract.getObjectUUID(), NpcLoc, contractOwner.getGuild(), false, zone, (short) rank, false, building);
|
||||
|
||||
if (npc == null)
|
||||
|
||||
@@ -387,7 +387,7 @@ public class NPC extends AbstractCharacter {
|
||||
|
||||
// Configure region and floor/level for this NPC
|
||||
|
||||
this.region = BuildingManager.GetRegion(this.building, slotLocation.x, slotLocation.y, slotLocation.z);
|
||||
this.region = BuildingManager.GetRegion(this.building, bindLoc.x, bindLoc.y, bindLoc.z);
|
||||
|
||||
if (this.region != null) {
|
||||
this.buildingFloor = region.getRoom();
|
||||
|
||||
Reference in New Issue
Block a user