forked from MagicBane/Server
attempted warehouse delay issue resolution
This commit is contained in:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user