fate peddler work

This commit is contained in:
2023-08-08 19:37:42 -05:00
parent 47eb4cd536
commit 5702810108
+6 -1
View File
@@ -362,7 +362,12 @@ public enum LootManager {
mob.getCharItemManager().addItemToInventory(lootItem);
}
public static void peddleFate(AbstractCharacter character, int giftID){
int tableID = LootManager._bootySetMap.get(giftID).get(ThreadLocalRandom.current().nextInt(1,LootManager._bootySetMap.get(giftID).size() - 1)).genTable;
int tableID = 0;
if(LootManager._bootySetMap.get(giftID) != null) {
tableID = LootManager._bootySetMap.get(giftID).get(ThreadLocalRandom.current().nextInt(1, LootManager._bootySetMap.get(giftID).size() - 1)).genTable;
} else{
return;
}
MobLoot gamblingResult= getGenTableItem(tableID,character,false);
if(gamblingResult != null){
gamblingResult.promoteToItem((PlayerCharacter)character);