| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -116,10 +116,18 @@ public enum LootManager { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    private static void RunBootySet(ArrayList<BootySetEntry> entries, Mob mob) { | 
					 | 
					 | 
					 | 
					    private static void RunBootySet(ArrayList<BootySetEntry> entries, Mob mob) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        float dropRate = NORMAL_DROP_RATE; | 
					 | 
					 | 
					 | 
					        float dropRate = NORMAL_DROP_RATE; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					        //roll the geenric world drop table
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        GenerateLootDrop(mob, 1300); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        if(ThreadLocalRandom.current().nextInt(1, 10000) == 5000) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            MobLoot extraLoot = rollForGlass(mob); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            if (extraLoot != null) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                mob.getCharItemManager().addItemToInventory(extraLoot); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        // Iterate all entries in this bootySet and process accordingly
 | 
					 | 
					 | 
					 | 
					        // Iterate all entries in this bootySet and process accordingly
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					        boolean hasExtraRolled = false; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        for (BootySetEntry bse : entries) { | 
					 | 
					 | 
					 | 
					        for (BootySetEntry bse : entries) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            switch (bse.bootyType) { | 
					 | 
					 | 
					 | 
					            switch (bse.bootyType) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                case "GOLD": | 
					 | 
					 | 
					 | 
					                case "GOLD": | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    GenerateGoldDrop(mob, bse); | 
					 | 
					 | 
					 | 
					                    GenerateGoldDrop(mob, bse); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -127,9 +135,8 @@ public enum LootManager { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                case "LOOT": | 
					 | 
					 | 
					 | 
					                case "LOOT": | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    if (ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate)) | 
					 | 
					 | 
					 | 
					                    if (ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate)) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        GenerateLootDrop(mob, bse.genTable);  //generate normal loot drop
 | 
					 | 
					 | 
					 | 
					                        GenerateLootDrop(mob, bse.genTable);  //generate normal loot drop
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    if(ThreadLocalRandom.current().nextInt(1,101) < mob.level && mob.parentZone.getSafeZone() == 0) { | 
					 | 
					 | 
					 | 
					                    if(mob.parentZone.getSafeZone() == 0) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        if (ThreadLocalRandom.current().nextInt(1, 10000) < mob.level) { | 
					 | 
					 | 
					 | 
					                        if (hasExtraRolled == false && ThreadLocalRandom.current().nextInt(1, 10000) < 5 * dropRate) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            if (_genTables.containsKey(bse.genTable + 1)) { | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                int roll = ThreadLocalRandom.current().nextInt(1, 101); | 
					 | 
					 | 
					 | 
					                                int roll = ThreadLocalRandom.current().nextInt(1, 101); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                MobLoot extraLoot = null; | 
					 | 
					 | 
					 | 
					                                MobLoot extraLoot = null; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                if (roll >= 1 && roll <= 50) { | 
					 | 
					 | 
					 | 
					                                if (roll >= 1 && roll <= 50) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -138,13 +145,13 @@ public enum LootManager { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                if (roll >= 51 && roll <= 94) { | 
					 | 
					 | 
					 | 
					                                if (roll >= 51 && roll <= 94) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    extraLoot = rollForRune(bse.genTable, mob); | 
					 | 
					 | 
					 | 
					                                    extraLoot = rollForRune(bse.genTable, mob); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                } | 
					 | 
					 | 
					 | 
					                                } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                if (roll >= 95) { | 
					 | 
					 | 
					 | 
					                                //if (roll >= 95) {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    extraLoot = rollForGlass(mob); | 
					 | 
					 | 
					 | 
					                                //    extraLoot = rollForGlass(mob);
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                } | 
					 | 
					 | 
					 | 
					                                //}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                if (extraLoot != null) { | 
					 | 
					 | 
					 | 
					                                if (extraLoot != null) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    mob.getCharItemManager().addItemToInventory(extraLoot); | 
					 | 
					 | 
					 | 
					                                    mob.getCharItemManager().addItemToInventory(extraLoot); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                } | 
					 | 
					 | 
					 | 
					                                } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            } | 
					 | 
					 | 
					 | 
					                            hasExtraRolled = true; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        } | 
					 | 
					 | 
					 | 
					                        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    } | 
					 | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    break; | 
					 | 
					 | 
					 | 
					                    break; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -193,9 +200,9 @@ public enum LootManager { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (ItemBase.getItemBase(itemUUID).getType().ordinal() == Enum.ItemType.RESOURCE.ordinal()) { | 
					 | 
					 | 
					 | 
					        if (ItemBase.getItemBase(itemUUID).getType().ordinal() == Enum.ItemType.RESOURCE.ordinal()) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            int chance = ThreadLocalRandom.current().nextInt(1,101); | 
					 | 
					 | 
					 | 
					            int chance = ThreadLocalRandom.current().nextInt(1,101); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if(chance > 5) | 
					 | 
					 | 
					 | 
					            if(chance > 10) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                return null; | 
					 | 
					 | 
					 | 
					                return null; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            int amount = ThreadLocalRandom.current().nextInt(tableRow.minSpawn, tableRow.maxSpawn + 1); | 
					 | 
					 | 
					 | 
					            int amount = ThreadLocalRandom.current().nextInt((int)(tableRow.minSpawn * 0.5f), (int)((tableRow.maxSpawn + 1) * 0.5f)); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return new MobLoot(mob, ItemBase.getItemBase(itemUUID), amount, false); | 
					 | 
					 | 
					 | 
					            return new MobLoot(mob, ItemBase.getItemBase(itemUUID), amount, false); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -333,6 +340,8 @@ public enum LootManager { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        try { | 
					 | 
					 | 
					 | 
					        try { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            MobLoot toAdd = getGenTableItem(tableID, mob); | 
					 | 
					 | 
					 | 
					            MobLoot toAdd = getGenTableItem(tableID, mob); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            if(toAdd.getItemBase().getType().equals(Enum.ItemType.CONTRACT) || toAdd.getItemBase().getType().equals(Enum.ItemType.RUNE)) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                return;//block all contracts and runes that drop outside the confines of the new system
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (toAdd != null) { | 
					 | 
					 | 
					 | 
					            if (toAdd != null) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                toAdd.setIsID(true); | 
					 | 
					 | 
					 | 
					                toAdd.setIsID(true); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -340,7 +349,6 @@ public enum LootManager { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } catch (Exception e) { | 
					 | 
					 | 
					 | 
					        } catch (Exception e) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //TODO chase down loot generation error, affects roughly 2% of drops
 | 
					 | 
					 | 
					 | 
					            //TODO chase down loot generation error, affects roughly 2% of drops
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            int i = 0; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -385,7 +393,7 @@ public enum LootManager { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    dropCount = 1; | 
					 | 
					 | 
					 | 
					                    dropCount = 1; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    //break; // Exit on first successful roll.
 | 
					 | 
					 | 
					 | 
					                    //break; // Exit on first successful roll.
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                } | 
					 | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if(ml != null && genericIB.isVorg()){ | 
					 | 
					 | 
					 | 
					                if(ml != null && genericIB.isVorg() && mob.getMobBaseID() != 14062){ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    ml.setIsID(true); | 
					 | 
					 | 
					 | 
					                    ml.setIsID(true); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    ml.setDurabilityCurrent(ml.getDurabilityMax()); | 
					 | 
					 | 
					 | 
					                    ml.setDurabilityCurrent(ml.getDurabilityMax()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    mob.getCharItemManager().addItemToInventory(ml); | 
					 | 
					 | 
					 | 
					                    mob.getCharItemManager().addItemToInventory(ml); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -493,7 +501,10 @@ public enum LootManager { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public static MobLoot rollForContract(int table, Mob mob){ | 
					 | 
					 | 
					 | 
					    public static MobLoot rollForContract(int table, Mob mob){ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        GenTableEntry selectedRow = GenTableEntry.rollTable(table, 99, 1.0f); | 
					 | 
					 | 
					 | 
					        int roll = 99; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (table == 1900 || table == 1500) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            roll = 73; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        GenTableEntry selectedRow = GenTableEntry.rollTable(table, roll, 1.0f); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (selectedRow == null) | 
					 | 
					 | 
					 | 
					        if (selectedRow == null) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return null; | 
					 | 
					 | 
					 | 
					            return null; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -516,7 +527,11 @@ public enum LootManager { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        return null; | 
					 | 
					 | 
					 | 
					        return null; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public static MobLoot rollForRune(int table, Mob mob){ | 
					 | 
					 | 
					 | 
					    public static MobLoot rollForRune(int table, Mob mob){ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        GenTableEntry selectedRow = GenTableEntry.rollTable(table, 97, 1.0f); | 
					 | 
					 | 
					 | 
					        int roll = 97; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        if(table == 1900 || table == 1500){ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            roll = 77; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        GenTableEntry selectedRow = GenTableEntry.rollTable(table, roll, 1.0f); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (selectedRow == null) | 
					 | 
					 | 
					 | 
					        if (selectedRow == null) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return null; | 
					 | 
					 | 
					 | 
					            return null; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |