From 17cfba1ead2990ab805f53f505be3bfa4bc14365 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Thu, 23 Sep 2021 21:03:00 +0000 Subject: [PATCH] More proper TranscendentZone finish task. --- .../instances/TranscendentZone/TranscendentZone.java | 10 ++-------- .../instances/TranscendentZone/TranscendentZone.java | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/instances/TranscendentZone/TranscendentZone.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/instances/TranscendentZone/TranscendentZone.java index 3db3b11e28..91730de637 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/instances/TranscendentZone/TranscendentZone.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/instances/TranscendentZone/TranscendentZone.java @@ -243,14 +243,6 @@ public class TranscendentZone extends AbstractInstance player.sendPacket(new ExSendUIEvent(player, true, false, 600, 0, NpcStringId.TIME_LEFT)); player.sendPacket(TimedHuntingZoneExit.STATIC_PACKET); - ThreadPool.schedule(() -> - { - if (player.getInstanceWorld() != instance) - { - finishInstance(player); - } - }, 300000); - player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF); instance.setParameter("PlayerIsOut", true); @@ -325,6 +317,8 @@ public class TranscendentZone extends AbstractInstance spawnTask.cancel(false); } }, instance.getRemainingTime() - 30000); + + ThreadPool.schedule(() -> instance.finishInstance(), instance.getRemainingTime()); } } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/instances/TranscendentZone/TranscendentZone.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/instances/TranscendentZone/TranscendentZone.java index 3db3b11e28..91730de637 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/instances/TranscendentZone/TranscendentZone.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/instances/TranscendentZone/TranscendentZone.java @@ -243,14 +243,6 @@ public class TranscendentZone extends AbstractInstance player.sendPacket(new ExSendUIEvent(player, true, false, 600, 0, NpcStringId.TIME_LEFT)); player.sendPacket(TimedHuntingZoneExit.STATIC_PACKET); - ThreadPool.schedule(() -> - { - if (player.getInstanceWorld() != instance) - { - finishInstance(player); - } - }, 300000); - player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF); instance.setParameter("PlayerIsOut", true); @@ -325,6 +317,8 @@ public class TranscendentZone extends AbstractInstance spawnTask.cancel(false); } }, instance.getRemainingTime() - 30000); + + ThreadPool.schedule(() -> instance.finishInstance(), instance.getRemainingTime()); } }