From e383c285ec11eb95c6111a1a1570bb0a1e65f6e7 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 14 Mar 2019 21:01:26 -0400 Subject: [PATCH] v0.7.2: even more bugfixes: - fixed rankings windows being able to be stacked (caused crashes) - fixed visual bugs caused by stacked teleportation effects - fixed darts being counted as melee weapons for swift enchant --- .../items/scrolls/ScrollOfTeleportation.java | 2 +- .../items/weapon/missiles/darts/Dart.java | 4 +++- .../shatteredpixeldungeon/windows/WndRanking.java | 7 ++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java index 10a7e13b0..091d3863c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java @@ -211,7 +211,7 @@ public class ScrollOfTeleportation extends Scroll { ch.sprite.interruptMotion(); ch.move( pos ); - ch.sprite.place( pos ); + if (ch.pos == pos) ch.sprite.place( pos ); if (ch.invisible == 0) { ch.sprite.alpha( 0 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/darts/Dart.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/darts/Dart.java index d65f88634..c42d5ef26 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/darts/Dart.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/darts/Dart.java @@ -83,7 +83,9 @@ public class Dart extends MissileWeapon { @Override public int proc(Char attacker, Char defender, int damage) { if (bow != null && bow.enchantment != null && attacker.buff(MagicImmune.class) == null){ - damage = bow.enchantment.proc(bow, attacker, defender, damage); + level(bow.level()); + damage = bow.enchantment.proc(this, attacker, defender, damage); + level(0); } return super.proc(attacker, defender, damage); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java index e591b19fe..6248b9172 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java @@ -52,7 +52,7 @@ public class WndRanking extends WndTabbed { private static final int WIDTH = 115; private static final int HEIGHT = 144; - private Thread thread; + private static Thread thread; private String error = null; private Image busy; @@ -62,6 +62,11 @@ public class WndRanking extends WndTabbed { super(); resize( WIDTH, HEIGHT ); + if (thread != null){ + hide(); + return; + } + thread = new Thread() { @Override public void run() {