v3.0.0: fixed action indicator persisting on revive for holy tome
This commit is contained in:
+14
-3
@@ -22,6 +22,7 @@
|
|||||||
package com.shatteredpixel.shatteredpixeldungeon.items.artifacts;
|
package com.shatteredpixel.shatteredpixeldungeon.items.artifacts;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Regeneration;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Regeneration;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
@@ -245,9 +246,19 @@ public class HolyTome extends Artifact {
|
|||||||
public class TomeRecharge extends ArtifactBuff implements ActionIndicator.Action {
|
public class TomeRecharge extends ArtifactBuff implements ActionIndicator.Action {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fx(boolean on) {
|
public boolean attachTo(Char target) {
|
||||||
if (on && quickSpell != null) ActionIndicator.setAction(this);
|
if (super.attachTo(target)) {
|
||||||
else ActionIndicator.clearAction(this);
|
if (quickSpell != null) ActionIndicator.setAction(this);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void detach() {
|
||||||
|
super.detach();
|
||||||
|
ActionIndicator.clearAction(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user