Merging 1.7.5 Source: actors/buffs changes
This commit is contained in:
@@ -20,25 +20,26 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfElements.Resistance;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.watabou.utils.Bundle;
|
||||
|
||||
public class Charm extends FlavourBuff {
|
||||
|
||||
|
||||
public int object = 0;
|
||||
|
||||
private static final String OBJECT = "object";
|
||||
|
||||
@Override
|
||||
public boolean attachTo( Char target ) {
|
||||
if (super.attachTo( target )) {
|
||||
target.pacified = true;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
public void storeInBundle( Bundle bundle ) {
|
||||
super.storeInBundle( bundle );
|
||||
bundle.put( OBJECT, object );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void detach() {
|
||||
target.pacified = false;
|
||||
super.detach();
|
||||
public void restoreFromBundle( Bundle bundle ) {
|
||||
super.restoreFromBundle( bundle );
|
||||
object = bundle.getInt( OBJECT );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int icon() {
|
||||
return BuffIndicator.HEART;
|
||||
|
||||
Reference in New Issue
Block a user