From 86b672924c48767a37fd2dbdc414459ff88269e8 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Thu, 23 Jan 2020 10:53:14 +0000 Subject: [PATCH] Minor PlayerInstance timed hunting zone related improvements. --- .../model/actor/instance/PlayerInstance.java | 17 +++++------------ .../model/actor/instance/PlayerInstance.java | 11 ++++------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index c96fd77b1d..f7ed2bf0d1 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -14235,19 +14235,11 @@ public class PlayerInstance extends Playable { case 1: // Storm Isle { - if ((x == 25) && (y == 23)) - { - return true; - } - break; + return (x == 25) && (y == 23); } case 6: // Primeval Isle { - if ((x == 20) && (y == 17)) - { - return true; - } - break; + return (x == 20) && (y == 17); } } @@ -14256,10 +14248,11 @@ public class PlayerInstance extends Playable public void startTimedHuntingZone(int zoneId, long delay) { + // Stop previous task. + stopTimedHuntingZoneTask(); + // TODO: Delay window. // sendPacket(new TimedHuntingZoneEnter((int) (delay / 60 / 1000))); - // For now close window. - sendPacket(TimedHuntingZoneExit.STATIC_PACKET); _timedHuntingZoneFinishTask = ThreadPool.schedule(() -> { diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 8699f06d70..1e03af12b5 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -14180,11 +14180,7 @@ public class PlayerInstance extends Playable { case 2: // Ancient Pirates' Tomb. { - if ((x == 20) && (y == 15)) - { - return true; - } - break; + return (x == 20) && (y == 15); } } @@ -14193,10 +14189,11 @@ public class PlayerInstance extends Playable public void startTimedHuntingZone(int zoneId, long delay) { + // Stop previous task. + stopTimedHuntingZoneTask(); + // TODO: Delay window. // sendPacket(new TimedHuntingZoneEnter((int) (delay / 60 / 1000))); - // For now close window. - sendPacket(TimedHuntingZoneExit.STATIC_PACKET); _timedHuntingZoneFinishTask = ThreadPool.schedule(() -> {