v3.0.0: stone of blink now lets you self-teleport (fixes recall exploit)
This commit is contained in:
+1
-1
@@ -71,7 +71,7 @@ public class ScrollOfTeleportation extends Scroll {
|
|||||||
PathFinder.buildDistanceMap(pos, BArray.or(Dungeon.level.passable, Dungeon.level.avoid, null));
|
PathFinder.buildDistanceMap(pos, BArray.or(Dungeon.level.passable, Dungeon.level.avoid, null));
|
||||||
if (PathFinder.distance[ch.pos] == Integer.MAX_VALUE
|
if (PathFinder.distance[ch.pos] == Integer.MAX_VALUE
|
||||||
|| (!Dungeon.level.passable[pos] && !Dungeon.level.avoid[pos])
|
|| (!Dungeon.level.passable[pos] && !Dungeon.level.avoid[pos])
|
||||||
|| Actor.findChar(pos) != null){
|
|| (Actor.findChar(pos) != null && Actor.findChar(pos) != ch)){
|
||||||
if (ch == Dungeon.hero){
|
if (ch == Dungeon.hero){
|
||||||
GLog.w( Messages.get(ScrollOfTeleportation.class, "cant_reach") );
|
GLog.w( Messages.get(ScrollOfTeleportation.class, "cant_reach") );
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-4
@@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items.stones;
|
package com.shatteredpixel.shatteredpixeldungeon.items.stones;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||||
@@ -53,8 +52,6 @@ public class StoneOfBlink extends Runestone {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void activate(int cell) {
|
protected void activate(int cell) {
|
||||||
if (!ScrollOfTeleportation.teleportToLocation(curUser, cell) && !anonymous){
|
ScrollOfTeleportation.teleportToLocation(curUser, cell);
|
||||||
Dungeon.level.drop(this, cell).sprite.drop();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user