More proper TranscendentZone finish task.

This commit is contained in:
MobiusDevelopment
2021-09-23 21:03:00 +00:00
parent 72789d9a0c
commit 17cfba1ead
2 changed files with 4 additions and 16 deletions

View File

@@ -243,14 +243,6 @@ public class TranscendentZone extends AbstractInstance
player.sendPacket(new ExSendUIEvent(player, true, false, 600, 0, NpcStringId.TIME_LEFT)); player.sendPacket(new ExSendUIEvent(player, true, false, 600, 0, NpcStringId.TIME_LEFT));
player.sendPacket(TimedHuntingZoneExit.STATIC_PACKET); player.sendPacket(TimedHuntingZoneExit.STATIC_PACKET);
ThreadPool.schedule(() ->
{
if (player.getInstanceWorld() != instance)
{
finishInstance(player);
}
}, 300000);
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF); player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF);
instance.setParameter("PlayerIsOut", true); instance.setParameter("PlayerIsOut", true);
@@ -325,6 +317,8 @@ public class TranscendentZone extends AbstractInstance
spawnTask.cancel(false); spawnTask.cancel(false);
} }
}, instance.getRemainingTime() - 30000); }, instance.getRemainingTime() - 30000);
ThreadPool.schedule(() -> instance.finishInstance(), instance.getRemainingTime());
} }
} }

View File

@@ -243,14 +243,6 @@ public class TranscendentZone extends AbstractInstance
player.sendPacket(new ExSendUIEvent(player, true, false, 600, 0, NpcStringId.TIME_LEFT)); player.sendPacket(new ExSendUIEvent(player, true, false, 600, 0, NpcStringId.TIME_LEFT));
player.sendPacket(TimedHuntingZoneExit.STATIC_PACKET); player.sendPacket(TimedHuntingZoneExit.STATIC_PACKET);
ThreadPool.schedule(() ->
{
if (player.getInstanceWorld() != instance)
{
finishInstance(player);
}
}, 300000);
player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF); player.getEffectList().stopSkillEffects(SkillFinishType.REMOVED, BUFF);
instance.setParameter("PlayerIsOut", true); instance.setParameter("PlayerIsOut", true);
@@ -325,6 +317,8 @@ public class TranscendentZone extends AbstractInstance
spawnTask.cancel(false); spawnTask.cancel(false);
} }
}, instance.getRemainingTime() - 30000); }, instance.getRemainingTime() - 30000);
ThreadPool.schedule(() -> instance.finishInstance(), instance.getRemainingTime());
} }
} }