|
|
@ -678,17 +678,25 @@ public enum LootManager { |
|
|
|
case 971012: //wrapped glass
|
|
|
|
case 971012: //wrapped glass
|
|
|
|
int chance = ThreadLocalRandom.current().nextInt(100); |
|
|
|
int chance = ThreadLocalRandom.current().nextInt(100); |
|
|
|
if(chance == 50){ |
|
|
|
if(chance == 50){ |
|
|
|
ItemBase glassBase =ItemBase.getItemBase(rollRandomItem(126)); |
|
|
|
int ID = 7000000; |
|
|
|
if(glassBase != null) |
|
|
|
int additional = ThreadLocalRandom.current().nextInt(0,28); |
|
|
|
winnings = new MobLoot(playerCharacter, ib, 1, false); |
|
|
|
ID += (additional * 10); |
|
|
|
|
|
|
|
ItemBase glassBase = ItemBase.getItemBase(ID); |
|
|
|
|
|
|
|
if(glassBase != null) { |
|
|
|
|
|
|
|
winnings = new MobLoot(playerCharacter, glassBase, 1, false); |
|
|
|
|
|
|
|
ChatManager.chatSystemInfo(playerCharacter, "You've Won A " + glassBase.getName()); |
|
|
|
|
|
|
|
} |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
ChatManager.chatSystemInfo(playerCharacter, "Please Try Again!"); |
|
|
|
ChatManager.chatSystemInfo(playerCharacter, "Please Try Again!"); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (winnings == null) |
|
|
|
if (winnings == null) { |
|
|
|
|
|
|
|
itemMan.consume(gift); |
|
|
|
|
|
|
|
itemMan.updateInventory(); |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//early exit if the inventory of the player will not hold the item
|
|
|
|
//early exit if the inventory of the player will not hold the item
|
|
|
|
|
|
|
|
|
|
|
|