|  |  | @ -123,6 +123,11 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (resourceValue < 15) |  |  |  |         if (resourceValue < 15) | 
			
		
	
		
		
			
				
					
					|  |  |  |             hasResources = false; |  |  |  |             hasResources = false; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         resourceValue = warehouse.getResources().get(Warehouse.mithrilIB); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (resourceValue < 1) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             hasResources = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (hasResources == false) { |  |  |  |         if (hasResources == false) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             ErrorPopupMsg.sendErrorPopup(player, 184);  // Insufficient gold or resources to upgrade to capital
 |  |  |  |             ErrorPopupMsg.sendErrorPopup(player, 184);  // Insufficient gold or resources to upgrade to capital
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             return false; |  |  |  |             return false; | 
			
		
	
	
		
		
			
				
					|  |  | @ -180,6 +185,16 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler { | 
			
		
	
		
		
			
				
					
					|  |  |  |             return false; |  |  |  |             return false; | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         resourceValue = warehouse.getResources().get(Warehouse.mithrilIB); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (DbManager.WarehouseQueries.updateWormwood(warehouse, resourceValue - 1) == true) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             warehouse.getResources().put(Warehouse.mithrilIB, resourceValue - 1); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             warehouse.AddTransactionToWarehouse(engine.Enum.GameObjectType.Building, tol.getObjectUUID(), Enum.TransactionType.WITHDRAWL, Resource.MITHRIL, 1); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             Logger.error("wormwood update failed for warehouse of UUID:" + warehouse.getObjectUUID()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             return false; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         realm.claimRealmForCity(city, charterUUID); |  |  |  |         realm.claimRealmForCity(city, charterUUID); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         tol.setRank(8); |  |  |  |         tol.setRank(8); | 
			
		
	
	
		
		
			
				
					|  |  | 
 |