v0.2.3e: tonnes of fixes relating to WIP multi-quickslot implementation
This commit is contained in:
@@ -19,6 +19,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlot;
|
||||
@@ -48,8 +49,12 @@ public class KindOfWeapon extends EquipableItem {
|
||||
|
||||
@Override
|
||||
public boolean doEquip( Hero hero ) {
|
||||
|
||||
|
||||
int slot = Dungeon.quickslot.getSlot( this );
|
||||
|
||||
detachAll( hero.belongings.backpack );
|
||||
|
||||
if (slot != -1) Dungeon.quickslot.setSlot( slot, this );
|
||||
|
||||
if (hero.belongings.weapon == null || hero.belongings.weapon.doUnequip( hero, true )) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user