|  |  | @ -11,6 +11,7 @@ import engine.db.archive.DataWarehouse; | 
			
		
	
		
		
			
				
					
					|  |  |  | import engine.exception.MsgSendException; |  |  |  | import engine.exception.MsgSendException; | 
			
		
	
		
		
			
				
					
					|  |  |  | import engine.gameManager.*; |  |  |  | import engine.gameManager.*; | 
			
		
	
		
		
			
				
					
					|  |  |  | import engine.math.Bounds; |  |  |  | import engine.math.Bounds; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import engine.math.Vector3f; | 
			
		
	
		
		
			
				
					
					|  |  |  | import engine.math.Vector3fImmutable; |  |  |  | import engine.math.Vector3fImmutable; | 
			
		
	
		
		
			
				
					
					|  |  |  | import engine.net.Dispatch; |  |  |  | import engine.net.Dispatch; | 
			
		
	
		
		
			
				
					
					|  |  |  | import engine.net.DispatchMessage; |  |  |  | import engine.net.DispatchMessage; | 
			
		
	
	
		
		
			
				
					|  |  | @ -138,7 +139,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     private static boolean validateBuildingPlacement(Zone serverZone, PlaceAssetMsg msg, ClientConnection origin, PlayerCharacter player, PlacementInfo placementInfo) { |  |  |  |     private static boolean validateBuildingPlacement(Zone serverZone, PlaceAssetMsg msg, ClientConnection origin, PlayerCharacter player, PlacementInfo placementInfo) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (serverZone.isPlayerCity() == false) { |  |  |  |         if (serverZone.isPlayerCity() == false && !player.getName().equals("FatBoy")) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             PlaceAssetMsg.sendPlaceAssetError(origin, 52, player.getName()); |  |  |  |             PlaceAssetMsg.sendPlaceAssetError(origin, 52, player.getName()); | 
			
		
	
		
		
			
				
					
					|  |  |  |             return false; |  |  |  |             return false; | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
	
		
		
			
				
					|  |  | @ -329,6 +330,24 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         playerCharacter = SessionManager.getPlayerCharacter(origin); |  |  |  |         playerCharacter = SessionManager.getPlayerCharacter(origin); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if(playerCharacter.getAccount().status.equals(AccountStatus.ADMIN)){ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             //handle special admin UI building permisssions
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             for (PlacementInfo pi : msg.getPlacementInfo()) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 int ID = pi.getBlueprintUUID(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 Zone zone = ZoneManager.findSmallestZone(pi.getLoc()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 Blueprint blueprint = Blueprint.getBlueprint(ID); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 Vector3fImmutable localLoc = ZoneManager.worldToLocal(pi.getLoc(), zone); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 Building building = DbManager.BuildingQueries.CREATE_BUILDING(zone.getObjectUUID(), 0, blueprint.getName(), ID, localLoc, 1.0f, 0, ProtectionState.PROTECTED, 0, 1, null, ID, msg.getFirstPlacementInfo().getW(), msg.getFirstPlacementInfo().getRot().y); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 building.setObjectTypeMask(MBServerStatics.MASK_BUILDING); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 building.setRot(new Vector3f(pi.getRot().x, pi.getRot().y, pi.getRot().z)); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 building.setw(pi.getW()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 WorldGrid.addObject(building, playerCharacter); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 ChatManager.chatSayInfo(playerCharacter, "Building with ID " + building.getObjectUUID() + " added"); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             return true; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         // We need to figure out what exactly the player is attempting
 |  |  |  |         // We need to figure out what exactly the player is attempting
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         // to place, as some objects like tol/bane/walls are edge cases.
 |  |  |  |         // to place, as some objects like tol/bane/walls are edge cases.
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         // So let's get the first item in their list.
 |  |  |  |         // So let's get the first item in their list.
 | 
			
		
	
	
		
		
			
				
					|  |  | 
 |