Browse Source

fixed bug with vorg rates being WAY too low because of equip drop limits

mixbane
FatBoy-DOTC 1 month ago
parent
commit
ec736f03be
  1. 9
      src/engine/gameManager/LootManager.java

9
src/engine/gameManager/LootManager.java

@ -319,8 +319,10 @@ public enum LootManager {
MobLoot toAdd = getGenTableItem(tableID, mob, inHotzone); MobLoot toAdd = getGenTableItem(tableID, mob, inHotzone);
if (toAdd != null) if (toAdd != null) {
toAdd.setIsID(true);
mob.getCharItemManager().addItemToInventory(toAdd); mob.getCharItemManager().addItemToInventory(toAdd);
}
} 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
@ -331,7 +333,6 @@ public enum LootManager {
public static void GenerateEquipmentDrop(Mob mob) { public static void GenerateEquipmentDrop(Mob mob) {
//do equipment here //do equipment here
int dropCount = 0;
if (mob.getEquip() != null) if (mob.getEquip() != null)
for (MobEquipment me : mob.getEquip().values()) { for (MobEquipment me : mob.getEquip().values()) {
@ -346,12 +347,10 @@ public enum LootManager {
MobLoot ml = new MobLoot(mob, me.getItemBase(), false); MobLoot ml = new MobLoot(mob, me.getItemBase(), false);
if (ml != null && dropCount < 1) { if (ml != null){
ml.setIsID(true); ml.setIsID(true);
ml.setDurabilityCurrent((short) (ml.getDurabilityCurrent() - ThreadLocalRandom.current().nextInt(5) + 1)); ml.setDurabilityCurrent((short) (ml.getDurabilityCurrent() - ThreadLocalRandom.current().nextInt(5) + 1));
mob.getCharItemManager().addItemToInventory(ml); mob.getCharItemManager().addItemToInventory(ml);
dropCount = 1;
//break; // Exit on first successful roll.
} }
} }
} }

Loading…
Cancel
Save