v2.0.0: added a safety check to champion weapon swapping
This commit is contained in:
+4
@@ -516,6 +516,10 @@ public class MeleeWeapon extends Weapon {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAction() {
|
public void doAction() {
|
||||||
|
if (Dungeon.hero.subClass != HeroSubClass.CHAMPION){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (Dungeon.hero.belongings.secondWep == null && Dungeon.hero.belongings.backpack.items.size() >= Dungeon.hero.belongings.backpack.capacity()){
|
if (Dungeon.hero.belongings.secondWep == null && Dungeon.hero.belongings.backpack.items.size() >= Dungeon.hero.belongings.backpack.capacity()){
|
||||||
GLog.w(Messages.get(MeleeWeapon.class, "swap_full"));
|
GLog.w(Messages.get(MeleeWeapon.class, "swap_full"));
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user