| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -73,36 +73,6 @@ public class Warehouse extends AbstractWorldObject { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        warehouseByBuildingUUID.put(this.buildingUID, this); | 
					 | 
					 | 
					 | 
					        warehouseByBuildingUUID.put(this.buildingUID, this); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public static ConcurrentHashMap<Integer, Integer> getMaxResources() { | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (maxResources.size() != 23) { | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(7, 100000000); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580000, 10000); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580001, 2000); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580002, 2000); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580003, 1000); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580004, 10000); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580005, 3000); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580006, 3000); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580007, 1000); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580008, 3000); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580009, 2000); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580010, 2000); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580011, 1000); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580012, 2000); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580013, 3000); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580014, 1000); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580015, 1000); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580016, 1000); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580017, 500); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580018, 500); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580019, 500); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580020, 500); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            maxResources.put(1580021, 500); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        return maxResources; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public static void warehouseDeposit(MerchantMsg msg, PlayerCharacter player, NPC npc) { | 
					 | 
					 | 
					 | 
					    public static void warehouseDeposit(MerchantMsg msg, PlayerCharacter player, NPC npc) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        Building warehouseBuilding; | 
					 | 
					 | 
					 | 
					        Building warehouseBuilding; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -282,7 +252,6 @@ public class Warehouse extends AbstractWorldObject { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return false; | 
					 | 
					 | 
					 | 
					            return false; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (!itemMan.doesCharOwnThisItem(resource.getObjectUUID())) | 
					 | 
					 | 
					 | 
					        if (!itemMan.doesCharOwnThisItem(resource.getObjectUUID())) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return false; | 
					 | 
					 | 
					 | 
					            return false; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -296,7 +265,7 @@ public class Warehouse extends AbstractWorldObject { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        int newAmount = oldAmount + amount; | 
					 | 
					 | 
					 | 
					        int newAmount = oldAmount + amount; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (newAmount > getMaxResources().get(ib.getUUID())) { | 
					 | 
					 | 
					 | 
					        if (newAmount > Enum.ResourceType.resourceLookup.get(resource.templsteID).deposit_limit) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //ChatManager.chatSystemInfo(pc, "The Warehouse is at it's maximum for this type of resource.");
 | 
					 | 
					 | 
					 | 
					            //ChatManager.chatSystemInfo(pc, "The Warehouse is at it's maximum for this type of resource.");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return false; | 
					 | 
					 | 
					 | 
					            return false; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -353,7 +322,7 @@ public class Warehouse extends AbstractWorldObject { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        int oldAmount = warehouse.resources.get(resource); | 
					 | 
					 | 
					 | 
					        int oldAmount = warehouse.resources.get(resource); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        int newAmount = oldAmount + amount; | 
					 | 
					 | 
					 | 
					        int newAmount = oldAmount + amount; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (newAmount > getMaxResources().get(resource.getUUID())) | 
					 | 
					 | 
					 | 
					        if (newAmount > Enum.ResourceType.resourceLookup.get(resource.getUUID()).deposit_limit) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return false; | 
					 | 
					 | 
					 | 
					            return false; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (!DepositApproved(resource, amount, warehouse)) | 
					 | 
					 | 
					 | 
					        if (!DepositApproved(resource, amount, warehouse)) | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -385,7 +354,7 @@ public class Warehouse extends AbstractWorldObject { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        int oldAmount = warehouse.resources.get(ib); | 
					 | 
					 | 
					 | 
					        int oldAmount = warehouse.resources.get(ib); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        int newAmount = oldAmount + amount; | 
					 | 
					 | 
					 | 
					        int newAmount = oldAmount + amount; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (newAmount > getMaxResources().get(ib.getUUID())) | 
					 | 
					 | 
					 | 
					        if (newAmount > Enum.ResourceType.resourceLookup.get(ib.getUUID()).deposit_limit) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return false; | 
					 | 
					 | 
					 | 
					            return false; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        int itemID = ib.getUUID(); | 
					 | 
					 | 
					 | 
					        int itemID = ib.getUUID(); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -499,7 +468,7 @@ public class Warehouse extends AbstractWorldObject { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        int oldAmount = warehouse.resources.get(ib); | 
					 | 
					 | 
					 | 
					        int oldAmount = warehouse.resources.get(ib); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        int newAmount = oldAmount + amount; | 
					 | 
					 | 
					 | 
					        int newAmount = oldAmount + amount; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (newAmount > getMaxResources().get(ib.getUUID())) | 
					 | 
					 | 
					 | 
					        if (newAmount > Enum.ResourceType.resourceLookup.get(ib.getUUID()).deposit_limit) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return; | 
					 | 
					 | 
					 | 
					            return; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (!DepositApproved(ib,amount,warehouse)) | 
					 | 
					 | 
					 | 
					        if (!DepositApproved(ib,amount,warehouse)) | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -880,7 +849,7 @@ public class Warehouse extends AbstractWorldObject { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public static boolean isAboveCap(Warehouse warehouse, ItemBase ib, int deposit) { | 
					 | 
					 | 
					 | 
					    public static boolean isAboveCap(Warehouse warehouse, ItemBase ib, int deposit) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        int newAmount = warehouse.resources.get(ib) + deposit; | 
					 | 
					 | 
					 | 
					        int newAmount = warehouse.resources.get(ib) + deposit; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        return newAmount > getMaxResources().get(ib.getUUID()); | 
					 | 
					 | 
					 | 
					        return newAmount > Enum.ResourceType.resourceLookup.get(ib.getUUID()).deposit_limit; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |