Browse Source

fate peddler work

master
FatBoy-DOTC 1 year ago
parent
commit
5702810108
  1. 7
      src/engine/gameManager/LootManager.java

7
src/engine/gameManager/LootManager.java

@ -362,7 +362,12 @@ public enum LootManager {
mob.getCharItemManager().addItemToInventory(lootItem); mob.getCharItemManager().addItemToInventory(lootItem);
} }
public static void peddleFate(AbstractCharacter character, int giftID){ 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); MobLoot gamblingResult= getGenTableItem(tableID,character,false);
if(gamblingResult != null){ if(gamblingResult != null){
gamblingResult.promoteToItem((PlayerCharacter)character); gamblingResult.promoteToItem((PlayerCharacter)character);

Loading…
Cancel
Save