v0.9.0: fixed some crash bugs
This commit is contained in:
parent
6f7cc49431
commit
578c307b1f
|
@ -150,7 +150,7 @@ public class Thief extends Mob {
|
||||||
|
|
||||||
GLog.w( Messages.get(Thief.class, "stole", toSteal.name()) );
|
GLog.w( Messages.get(Thief.class, "stole", toSteal.name()) );
|
||||||
if (!toSteal.stackable) {
|
if (!toSteal.stackable) {
|
||||||
Dungeon.quickslot.convertToPlaceholder(item);
|
Dungeon.quickslot.convertToPlaceholder(toSteal);
|
||||||
}
|
}
|
||||||
Item.updateQuickslot();
|
Item.updateQuickslot();
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,7 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndUseItem;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndUseItem;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
|
import com.watabou.noosa.particles.Emitter;
|
||||||
import com.watabou.utils.Bundle;
|
import com.watabou.utils.Bundle;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
import com.watabou.utils.Reflection;
|
import com.watabou.utils.Reflection;
|
||||||
|
@ -375,7 +376,8 @@ public class Potion extends Item {
|
||||||
Hero hero = Dungeon.hero;
|
Hero hero = Dungeon.hero;
|
||||||
if (hero.hasTalent(Talent.TEST_SUBJECT)) {
|
if (hero.hasTalent(Talent.TEST_SUBJECT)) {
|
||||||
hero.HP = Math.min(hero.HP + 1 + (2 * hero.pointsInTalent(Talent.TEST_SUBJECT)), hero.HT);
|
hero.HP = Math.min(hero.HP + 1 + (2 * hero.pointsInTalent(Talent.TEST_SUBJECT)), hero.HT);
|
||||||
hero.sprite.emitter().burst(Speck.factory(Speck.HEALING), hero.pointsInTalent(Talent.TEST_SUBJECT));
|
Emitter e = hero.sprite.emitter();
|
||||||
|
if (e != null) e.burst(Speck.factory(Speck.HEALING), hero.pointsInTalent(Talent.TEST_SUBJECT));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return super.identify();
|
return super.identify();
|
||||||
|
|
|
@ -31,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
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.watabou.noosa.particles.Emitter;
|
||||||
|
|
||||||
public class ScrollOfRecharging extends Scroll {
|
public class ScrollOfRecharging extends Scroll {
|
||||||
|
|
||||||
|
@ -55,7 +56,8 @@ public class ScrollOfRecharging extends Scroll {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void charge( Char user ) {
|
public static void charge( Char user ) {
|
||||||
user.sprite.centerEmitter().burst( EnergyParticle.FACTORY, 15 );
|
Emitter e = user.sprite.centerEmitter();
|
||||||
|
if (e != null) e.burst( EnergyParticle.FACTORY, 15 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user