attempted warehouse delay issue resolution

This commit is contained in:
2024-05-20 13:34:03 -05:00
parent a11b590573
commit 023057668a
4 changed files with 53 additions and 30 deletions
+17
View File
@@ -178,6 +178,9 @@ public class PlayerCharacter extends AbstractCharacter {
public float ZergMultiplier = 1.0f;
public int mineAppliedID = 0;
public boolean depositingWarehouse = false;
public Building warehouseBuilding;
/**
* No Id Constructor
*/
@@ -4885,6 +4888,20 @@ public class PlayerCharacter extends AbstractCharacter {
this.updateLock.writeLock().unlock();
}
}
if(this.depositingWarehouse){
long sinceLast = System.currentTimeMillis() - this.getTimestamps().get("lastDepositWarehouse");
if(sinceLast > 1000) {
this.depositingWarehouse = false;
ViewResourcesMessage vrm = new ViewResourcesMessage(this);
vrm.setGuild(this.getGuild());
vrm.setWarehouseBuilding(this.warehouseBuilding);
vrm.configure();
Dispatch dispatch = Dispatch.borrow(this, vrm);
DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY);
this.charItemManager.updateLock = false;
this.charItemManager.updateInventory();
}
}
}
public static boolean checkIfBoxed(PlayerCharacter player){