Lock player movement while entering whirlpool

This commit is contained in:
ceikry
2021-06-26 12:52:25 -05:00
parent 56f26677c9
commit 3f7a9278fe
@@ -1,5 +1,6 @@
package core.game.node.entity.skill.slayer.dungeon;
import api.ContentAPI;
import core.cache.def.impl.ObjectDefinition;
import core.game.component.CloseEvent;
import core.game.component.Component;
@@ -67,6 +68,7 @@ public final class AncientCavern extends MapZone implements Plugin<Object> {
@Override
public boolean handle(final Player player, Node node, String option) {
ContentAPI.lock(player, 30);
AgilityHandler.forceWalk(player, -1, player.getLocation(), player.getLocation().transform(0, -6, 0), Animation.create(6723), 10, 0.0, null);
GameWorld.getPulser().submit(new Pulse(1, player) {
int count;
@@ -83,6 +85,9 @@ public final class AncientCavern extends MapZone implements Plugin<Object> {
player.getInterfaceManager().closeOverlay();
player.getProperties().setTeleportLocation(Location.create(1763, 5365, 1));
player.getPacketDispatch().sendMessages("You dive into the swirling maelstorm of the whirlpool.", "You are swirled beneath the water, the darkness and pressure are overwhelming.", "Mystical forces guide you into a cavern below the whirlpool.");
break;
case 8:
ContentAPI.unlock(player);
return true;
}
return false;