v2.1.0: fixed a rare crash if slimes drop loot when T2 wep deck is empty

This commit is contained in:
Evan Debenham
2023-05-24 16:42:35 -04:00
parent ca12db6fa1
commit 6ca8f32c82

View File

@@ -78,8 +78,7 @@ public class Slime extends Mob {
public Item createLoot() {
Dungeon.LimitedDrops.SLIME_WEP.count++;
Generator.Category c = Generator.Category.WEP_T2;
MeleeWeapon w = (MeleeWeapon) Reflection.newInstance(c.classes[Random.chances(c.probs)]);
w.random();
MeleeWeapon w = (MeleeWeapon)Generator.randomUsingDefaults(Generator.Category.WEP_T2);
w.level(0);
return w;
}