v0.3.5: fixed the mage's staff still charging after being thrown
This commit is contained in:
@@ -20,13 +20,13 @@
|
|||||||
*/
|
*/
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items;
|
package com.shatteredpixel.shatteredpixeldungeon.items;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@@ -107,11 +107,11 @@ public abstract class EquipableItem extends Item {
|
|||||||
hero.spend( time2equip( hero ) );
|
hero.spend( time2equip( hero ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (collect && !collect( hero.belongings.backpack )) {
|
if (!collect || !collect( hero.belongings.backpack )) {
|
||||||
onDetach();
|
onDetach();
|
||||||
Dungeon.quickslot.clearItem(this);
|
Dungeon.quickslot.clearItem(this);
|
||||||
updateQuickslot();
|
updateQuickslot();
|
||||||
Dungeon.level.drop( this, hero.pos );
|
if (collect) Dungeon.level.drop( this, hero.pos );
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user