should never pull directly form cache

This commit is contained in:
2023-10-20 09:48:24 -04:00
parent a487a7bd2f
commit 7ce94a5166
3 changed files with 7 additions and 13 deletions
+4 -3
View File
@@ -807,10 +807,11 @@ public class Building extends AbstractWorldObject {
if (this.ownerUUID == 0)
return null;
if (this.ownerIsNPC)
return NPC.getFromCache(this.ownerUUID);
return PlayerCharacter.getFromCache(this.ownerUUID);
if (this.ownerIsNPC)
return NPC.getNPC(this.ownerUUID);
return PlayerCharacter.getPlayerCharacter(this.ownerUUID);
}
-7
View File
@@ -868,7 +868,6 @@ public class City extends AbstractWorldObject {
player.addCityEffect(Integer.toString(effectBase.getUUID()), effectBase, rank, MBServerStatics.FOURTYFIVE_SECONDS, false, this);
}
}
public Warehouse getWarehouse() {
@@ -894,12 +893,6 @@ public class City extends AbstractWorldObject {
return collided;
}
public boolean isLocationOnCityGrid(Bounds newBounds) {
boolean collided = Bounds.collide(this.getBounds(), newBounds, 0);
return collided;
}
public boolean isLocationWithinSiegeBounds(Vector3fImmutable insideLoc) {
return insideLoc.isInsideCircle(this.getLoc(), CityBoundsType.ZONE.halfExtents);