|  |  | @ -43,7 +43,7 @@ public class LootManager { | 
			
		
	
		
		
			
				
					
					|  |  |  |         DbManager.LootQueries.LOAD_ALL_MODGROUPS(); |  |  |  |         DbManager.LootQueries.LOAD_ALL_MODGROUPS(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         DbManager.LootQueries.LOAD_ALL_MODTABLES(); |  |  |  |         DbManager.LootQueries.LOAD_ALL_MODTABLES(); | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |     public static void GenerateMobLoot(Mob mob){ |  |  |  |     public static void GenerateMobLoot(Mob mob, boolean fromDeath){ | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         //determine if mob is in hotzone
 |  |  |  |         //determine if mob is in hotzone
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         boolean inHotzone = ZoneManager.inHotZone(mob.getLoc()); |  |  |  |         boolean inHotzone = ZoneManager.inHotZone(mob.getLoc()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         //get multiplier form config manager
 |  |  |  |         //get multiplier form config manager
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -54,10 +54,10 @@ public class LootManager { | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         //iterate the booty sets
 |  |  |  |         //iterate the booty sets
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         if(mob.getMobBase().bootySet != 0 && NPCManager._bootySetMap.containsKey(mob.getMobBase().bootySet)) { |  |  |  |         if(mob.getMobBase().bootySet != 0 && NPCManager._bootySetMap.containsKey(mob.getMobBase().bootySet)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             RunBootySet(NPCManager._bootySetMap.get(mob.getMobBase().bootySet), mob, multiplier, inHotzone); |  |  |  |             RunBootySet(NPCManager._bootySetMap.get(mob.getMobBase().bootySet), mob, multiplier, inHotzone, fromDeath); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         if(mob.bootySet != 0) { |  |  |  |         if(mob.bootySet != 0) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             RunBootySet(NPCManager._bootySetMap.get(mob.bootySet), mob, multiplier, inHotzone); |  |  |  |             RunBootySet(NPCManager._bootySetMap.get(mob.bootySet), mob, multiplier, inHotzone, fromDeath); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         //lastly, check mobs inventory for godly or disc runes to send a server announcement
 |  |  |  |         //lastly, check mobs inventory for godly or disc runes to send a server announcement
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         for (Item it : mob.getInventory()) { |  |  |  |         for (Item it : mob.getInventory()) { | 
			
		
	
	
		
		
			
				
					|  |  | @ -70,14 +70,13 @@ public class LootManager { | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |     private static void RunBootySet(ArrayList<BootySetEntry> entries, Mob mob, float multiplier, boolean inHotzone) { |  |  |  |     private static void RunBootySet(ArrayList<BootySetEntry> entries, Mob mob, float multiplier, boolean inHotzone, boolean fromDeath) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         for (BootySetEntry bse : entries) { |  |  |  |         for (BootySetEntry bse : entries) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             //check if chance roll is good
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             switch (bse.bootyType) { |  |  |  |             switch (bse.bootyType) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 case "GOLD": |  |  |  |                 case "GOLD": | 
			
		
	
		
		
			
				
					
					|  |  |  |                     if (ThreadLocalRandom.current().nextInt(100) <= (bse.dropChance * multiplier)) { |  |  |  |                     if (ThreadLocalRandom.current().nextInt(100) <= (bse.dropChance * multiplier) || fromDeath) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         //early exit, failed to hit minimum chance roll
 |  |  |  |                         //early exit, failed to hit minimum chance roll OR booty was generated from mob's death
 | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                         break; |  |  |  |                         break; | 
			
		
	
		
		
			
				
					
					|  |  |  |                     } |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  |                     //determine and add gold to mob inventory
 |  |  |  |                     //determine and add gold to mob inventory
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -88,8 +87,8 @@ public class LootManager { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     } |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  |                     break; |  |  |  |                     break; | 
			
		
	
		
		
			
				
					
					|  |  |  |                 case "LOOT": |  |  |  |                 case "LOOT": | 
			
		
	
		
		
			
				
					
					|  |  |  |                     if (ThreadLocalRandom.current().nextInt(100) <= (bse.dropChance * multiplier)) { |  |  |  |                     if (ThreadLocalRandom.current().nextInt(100) <= (bse.dropChance * multiplier) || fromDeath) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         //early exit, failed to hit minimum chance roll
 |  |  |  |                         //early exit, failed to hit minimum chance roll OR booty was generated from mob's death
 | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                         break; |  |  |  |                         break; | 
			
		
	
		
		
			
				
					
					|  |  |  |                     } |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  |                     //iterate the booty tables and add items to mob inventory
 |  |  |  |                     //iterate the booty tables and add items to mob inventory
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -107,10 +106,20 @@ public class LootManager { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     break; |  |  |  |                     break; | 
			
		
	
		
		
			
				
					
					|  |  |  |                 case "ITEM": |  |  |  |                 case "ITEM": | 
			
		
	
		
		
			
				
					
					|  |  |  |                     MobLoot disc = new MobLoot(mob, ItemBase.getItemBase(bse.itemBase), true); |  |  |  |                     MobLoot disc = new MobLoot(mob, ItemBase.getItemBase(bse.itemBase), true); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     if (disc != null) |  |  |  |                     if (disc != null || fromDeath) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                         mob.getCharItemManager().addItemToInventory(disc); |  |  |  |                         mob.getCharItemManager().addItemToInventory(disc); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                     break; |  |  |  |                     break; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 case "EQUIP": | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     if (ThreadLocalRandom.current().nextInt(100) <= (bse.dropChance * multiplier) || !fromDeath) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         //early exit, failed to hit minimum chance roll OR booty wasn't generated form mob's death
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         break; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     MobLoot equipToAdd = new MobLoot(mob, ItemBase.getItemBase(bse.itemBase), true); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     if (equipToAdd != null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         mob.getCharItemManager().addItemToInventory(equipToAdd); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     break; | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
	
		
		
			
				
					|  |  | 
 |