v3.0.0: fixed greater haste not preserving duration on save/load

This commit is contained in:
Evan Debenham
2024-12-02 17:31:53 -05:00
parent b45cd1a523
commit 87e034b394

View File

@@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.watabou.noosa.Image;
import com.watabou.utils.Bundle;
//currently only applies to the hero
public class GreaterHaste extends Buff {
@@ -83,4 +84,18 @@ public class GreaterHaste extends Buff {
return Messages.get(this, "desc", left);
}
private static final String LEFT = "left";
@Override
public void storeInBundle( Bundle bundle ) {
super.storeInBundle( bundle );
bundle.put( LEFT, left );
}
@Override
public void restoreFromBundle( Bundle bundle ) {
super.restoreFromBundle(bundle);
left = bundle.getInt( LEFT );
}
}