Variable removed from city
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
package engine.net.client.handlers;
|
package engine.net.client.handlers;
|
||||||
|
|
||||||
import engine.mbEnums;
|
|
||||||
import engine.mbEnums.BuildingGroup;
|
|
||||||
import engine.InterestManagement.WorldGrid;
|
import engine.InterestManagement.WorldGrid;
|
||||||
import engine.exception.MsgSendException;
|
import engine.exception.MsgSendException;
|
||||||
import engine.gameManager.BuildingManager;
|
import engine.gameManager.BuildingManager;
|
||||||
|
import engine.mbEnums;
|
||||||
|
import engine.mbEnums.BuildingGroup;
|
||||||
import engine.net.client.ClientConnection;
|
import engine.net.client.ClientConnection;
|
||||||
import engine.net.client.msg.ClientNetMsg;
|
import engine.net.client.msg.ClientNetMsg;
|
||||||
import engine.net.client.msg.DestroyBuildingMsg;
|
import engine.net.client.msg.DestroyBuildingMsg;
|
||||||
@@ -91,8 +91,9 @@ public class DestroyBuildingHandler extends AbstractClientMsgHandler {
|
|||||||
building.disableSpire(true);
|
building.disableSpire(true);
|
||||||
|
|
||||||
if (blueprint.getBuildingGroup() == BuildingGroup.WAREHOUSE) {
|
if (blueprint.getBuildingGroup() == BuildingGroup.WAREHOUSE) {
|
||||||
|
|
||||||
if (city != null)
|
if (city != null)
|
||||||
city.setWarehouseBuildingID(0);
|
city.warehouse = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildingManager.setRank(building, -1);
|
BuildingManager.setRank(building, -1);
|
||||||
|
|||||||
@@ -1358,8 +1358,6 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
|
|||||||
if (city == null)
|
if (city == null)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
city.setWarehouseBuildingID(newMesh.getObjectUUID());
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,9 +8,8 @@
|
|||||||
|
|
||||||
package engine.net.client.handlers;
|
package engine.net.client.handlers;
|
||||||
|
|
||||||
import engine.mbEnums.DispatchChannel;
|
|
||||||
import engine.exception.MsgSendException;
|
import engine.exception.MsgSendException;
|
||||||
import engine.gameManager.BuildingManager;
|
import engine.mbEnums.DispatchChannel;
|
||||||
import engine.net.Dispatch;
|
import engine.net.Dispatch;
|
||||||
import engine.net.DispatchMessage;
|
import engine.net.DispatchMessage;
|
||||||
import engine.net.client.ClientConnection;
|
import engine.net.client.ClientConnection;
|
||||||
@@ -46,13 +45,16 @@ public class ViewResourcesMsgHandler extends AbstractClientMsgHandler {
|
|||||||
if (city == null)
|
if (city == null)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
Building warehouse = BuildingManager.getBuilding(city.getWarehouseBuildingID());
|
if (city.warehouse == null)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (warehouse == null)
|
Building warehouseBuilding = city.warehouse.building;
|
||||||
|
|
||||||
|
if (warehouseBuilding == null)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
ViewResourcesMsg vrm = new ViewResourcesMsg(playerCharacter);
|
ViewResourcesMsg vrm = new ViewResourcesMsg(playerCharacter);
|
||||||
vrm.setWarehouseBuilding(warehouse);
|
vrm.setWarehouseBuilding(warehouseBuilding);
|
||||||
vrm.setGuild(playerCharacter.getGuild());
|
vrm.setGuild(playerCharacter.getGuild());
|
||||||
vrm.configure();
|
vrm.configure();
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ public class City extends AbstractWorldObject {
|
|||||||
private Vector3fImmutable location = Vector3fImmutable.ZERO;
|
private Vector3fImmutable location = Vector3fImmutable.ZERO;
|
||||||
// Players who have entered the city (used for adding and removing affects)
|
// Players who have entered the city (used for adding and removing affects)
|
||||||
private Vector3fImmutable bindLoc;
|
private Vector3fImmutable bindLoc;
|
||||||
private int warehouseBuildingID = 0;
|
|
||||||
private boolean open = false;
|
private boolean open = false;
|
||||||
private String hash;
|
private String hash;
|
||||||
public Warehouse warehouse;
|
public Warehouse warehouse;
|
||||||
@@ -1060,14 +1059,6 @@ public class City extends AbstractWorldObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getWarehouseBuildingID() {
|
|
||||||
return warehouseBuildingID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWarehouseBuildingID(int warehouseBuildingID) {
|
|
||||||
this.warehouseBuildingID = warehouseBuildingID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public final void destroy() {
|
public final void destroy() {
|
||||||
|
|
||||||
Thread destroyCityThread = new Thread(new DestroyCityThread(this));
|
Thread destroyCityThread = new Thread(new DestroyCityThread(this));
|
||||||
|
|||||||
Reference in New Issue
Block a user