|
|
|
@ -12,6 +12,7 @@ package engine.objects;
@@ -12,6 +12,7 @@ package engine.objects;
|
|
|
|
|
import engine.Enum; |
|
|
|
|
import engine.Enum.*; |
|
|
|
|
import engine.InterestManagement.HeightMap; |
|
|
|
|
import engine.InterestManagement.InterestManager; |
|
|
|
|
import engine.InterestManagement.RealmMap; |
|
|
|
|
import engine.InterestManagement.WorldGrid; |
|
|
|
|
import engine.db.archive.CityRecord; |
|
|
|
@ -394,7 +395,7 @@ public class Building extends AbstractWorldObject {
@@ -394,7 +395,7 @@ public class Building extends AbstractWorldObject {
|
|
|
|
|
this.rank = newRank; |
|
|
|
|
|
|
|
|
|
// New rank means new mesh
|
|
|
|
|
|
|
|
|
|
int oldMeshID = this.meshUUID; |
|
|
|
|
newMeshUUID = this.getBlueprint().getMeshForRank(this.rank); |
|
|
|
|
this.meshUUID = newMeshUUID; |
|
|
|
|
|
|
|
|
@ -428,6 +429,15 @@ public class Building extends AbstractWorldObject {
@@ -428,6 +429,15 @@ public class Building extends AbstractWorldObject {
|
|
|
|
|
BuildingManager.cleanupHirelings(this); |
|
|
|
|
|
|
|
|
|
this.isDeranking.compareAndSet(true, false); |
|
|
|
|
|
|
|
|
|
if(oldMeshID != this.meshUUID) { |
|
|
|
|
//move NPCs to new slot locations if the mesh was changed and force reload them
|
|
|
|
|
int index = 0; |
|
|
|
|
for (AbstractCharacter hireling : this.hirelings.keySet()) { |
|
|
|
|
hireling.setLoc(BuildingManager._slotLocations.get(newMeshUUID).get(index).getLocation()); |
|
|
|
|
InterestManager.reloadCharacter(hireling); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public final int getOwnerUUID() { |
|
|
|
|