v2.1.0: fixed a rare crash if slimes drop loot when T2 wep deck is empty
This commit is contained in:
@@ -78,8 +78,7 @@ public class Slime extends Mob {
|
|||||||
public Item createLoot() {
|
public Item createLoot() {
|
||||||
Dungeon.LimitedDrops.SLIME_WEP.count++;
|
Dungeon.LimitedDrops.SLIME_WEP.count++;
|
||||||
Generator.Category c = Generator.Category.WEP_T2;
|
Generator.Category c = Generator.Category.WEP_T2;
|
||||||
MeleeWeapon w = (MeleeWeapon) Reflection.newInstance(c.classes[Random.chances(c.probs)]);
|
MeleeWeapon w = (MeleeWeapon)Generator.randomUsingDefaults(Generator.Category.WEP_T2);
|
||||||
w.random();
|
|
||||||
w.level(0);
|
w.level(0);
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user