Browse Source

Building set on load

combat-2
MagicBot 8 months ago
parent
commit
b2f3e7a635
  1. 2
      src/engine/net/client/handlers/TaxCityMsgHandler.java
  2. 6
      src/engine/net/client/msg/ArcViewAssetTransactionsMsg.java
  3. 2
      src/engine/objects/City.java

2
src/engine/net/client/handlers/TaxCityMsgHandler.java

@ -111,7 +111,7 @@ public class TaxCityMsgHandler extends AbstractClientMsgHandler {
ViewResourcesMessage vrm = new ViewResourcesMessage(player); ViewResourcesMessage vrm = new ViewResourcesMessage(player);
vrm.setGuild(building.getGuild()); vrm.setGuild(building.getGuild());
vrm.setWarehouseBuilding(BuildingManager.getBuildingFromCache(building.getCity().warehouse.buildingUID)); vrm.setWarehouseBuilding(BuildingManager.getBuildingFromCache(building.getCity().warehouse.building.getObjectUUID()));
vrm.configure(); vrm.configure();
Dispatch dispatch = Dispatch.borrow(player, msg); Dispatch dispatch = Dispatch.borrow(player, msg);
DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY);

6
src/engine/net/client/msg/ArcViewAssetTransactionsMsg.java

@ -61,7 +61,7 @@ public class ArcViewAssetTransactionsMsg extends ClientNetMsg {
public void configure() { public void configure() {
warehouseBuilding = BuildingManager.getBuilding(this.warehouse.buildingUID); warehouseBuilding = BuildingManager.getBuilding(this.warehouse.building.getObjectUUID());
transactions = new ArrayList<>(50); transactions = new ArrayList<>(50);
if (this.warehouse.transactions.size() > 150) { if (this.warehouse.transactions.size() > 150) {
@ -78,7 +78,7 @@ public class ArcViewAssetTransactionsMsg extends ClientNetMsg {
protected void _serialize(ByteBufferWriter writer) throws SerializationException { protected void _serialize(ByteBufferWriter writer) throws SerializationException {
writer.putInt(this.transactionID); writer.putInt(this.transactionID);
writer.putInt(this.warehouse.buildingUID); writer.putInt(this.warehouse.building.getObjectUUID());
writer.putInt(transactions.size()); //list Size writer.putInt(transactions.size()); //list Size
for (Transaction transaction : transactions) { for (Transaction transaction : transactions) {
@ -124,7 +124,7 @@ public class ArcViewAssetTransactionsMsg extends ClientNetMsg {
writer.putInt(transaction.getTargetUUID()); //ID writer.putInt(transaction.getTargetUUID()); //ID
writer.putString(name); //Name of depositer/withdrawler or mine name writer.putString(name); //Name of depositer/withdrawler or mine name
writer.putInt(GameObjectType.Building.ordinal()); //Type writer.putInt(GameObjectType.Building.ordinal()); //Type
writer.putInt(warehouse.buildingUID); //ID writer.putInt(warehouse.building.getObjectUUID()); //ID
writer.putString(warehouseBuilding.getName()); //warehouse writer.putString(warehouseBuilding.getName()); //warehouse
writer.putInt(transaction.getTransactionType().getID()); //79,80 withdrew, 81 mine produced, 82 deposit writer.putInt(transaction.getTransactionType().getID()); //79,80 withdrew, 81 mine produced, 82 deposit
writer.putInt(transaction.getAmount()); //amount writer.putInt(transaction.getAmount()); //amount

2
src/engine/objects/City.java

@ -1389,7 +1389,7 @@ public class City extends AbstractWorldObject {
ViewResourcesMessage vrm = new ViewResourcesMessage(player); ViewResourcesMessage vrm = new ViewResourcesMessage(player);
vrm.setGuild(building.getGuild()); vrm.setGuild(building.getGuild());
vrm.setWarehouseBuilding(BuildingManager.getBuildingFromCache(building.getCity().warehouse.buildingUID)); vrm.setWarehouseBuilding(BuildingManager.getBuildingFromCache(building.getCity().warehouse.building.getObjectUUID()));
vrm.configure(); vrm.configure();
Dispatch dispatch = Dispatch.borrow(player, vrm); Dispatch dispatch = Dispatch.borrow(player, vrm);
DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY);

Loading…
Cancel
Save