From 8adca41278e146c3035c30f377cc5285a99de1e9 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Mon, 28 Jun 2021 23:24:16 +0000 Subject: [PATCH] Addition of PlayerInstance getTimedHuntingZone method. --- .../model/actor/instance/PlayerInstance.java | 12 ++++++++++++ .../model/actor/instance/PlayerInstance.java | 12 ++++++++++++ .../model/actor/instance/PlayerInstance.java | 12 ++++++++++++ .../model/actor/instance/PlayerInstance.java | 12 ++++++++++++ .../model/actor/instance/PlayerInstance.java | 12 ++++++++++++ .../model/actor/instance/PlayerInstance.java | 12 ++++++++++++ .../model/actor/instance/PlayerInstance.java | 12 ++++++++++++ 7 files changed, 84 insertions(+) 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 aab739fb54..dc96a836f0 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 @@ -14320,6 +14320,18 @@ public class PlayerInstance extends Playable return false; } + public TimedHuntingZoneHolder getTimedHuntingZone() + { + for (TimedHuntingZoneHolder holder : TimedHuntingZoneData.getInstance().getAllHuntingZones()) + { + if (isInTimedHuntingZone(holder.getZoneId())) + { + return holder; + } + } + return null; + } + public void startTimedHuntingZone(int zoneId, long delay) { // Stop previous task. diff --git a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index f3d6408bb5..a80c326f4e 100644 --- a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -14391,6 +14391,18 @@ public class PlayerInstance extends Playable return false; } + public TimedHuntingZoneHolder getTimedHuntingZone() + { + for (TimedHuntingZoneHolder holder : TimedHuntingZoneData.getInstance().getAllHuntingZones()) + { + if (isInTimedHuntingZone(holder.getZoneId())) + { + return holder; + } + } + return null; + } + public void startTimedHuntingZone(int zoneId, long delay) { // Stop previous task. diff --git a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index a2989819da..d4133341ab 100644 --- a/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_9.0_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -14429,6 +14429,18 @@ public class PlayerInstance extends Playable return false; } + public TimedHuntingZoneHolder getTimedHuntingZone() + { + for (TimedHuntingZoneHolder holder : TimedHuntingZoneData.getInstance().getAllHuntingZones()) + { + if (isInTimedHuntingZone(holder.getZoneId())) + { + return holder; + } + } + return null; + } + public void startTimedHuntingZone(int zoneId, long delay) { // Stop previous task. 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 659bca33e9..8f77840901 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 @@ -14300,6 +14300,18 @@ public class PlayerInstance extends Playable return false; } + public TimedHuntingZoneHolder getTimedHuntingZone() + { + for (TimedHuntingZoneHolder holder : TimedHuntingZoneData.getInstance().getAllHuntingZones()) + { + if (isInTimedHuntingZone(holder.getZoneId())) + { + return holder; + } + } + return null; + } + public void startTimedHuntingZone(int zoneId, long delay) { // Stop previous task. diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 3b6affffc0..8b25cab262 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -14561,6 +14561,18 @@ public class PlayerInstance extends Playable return false; } + public TimedHuntingZoneHolder getTimedHuntingZone() + { + for (TimedHuntingZoneHolder holder : TimedHuntingZoneData.getInstance().getAllHuntingZones()) + { + if (isInTimedHuntingZone(holder.getZoneId())) + { + return holder; + } + } + return null; + } + public void startTimedHuntingZone(int zoneId, long delay) { // Stop previous task. diff --git a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 23e534db69..cb44f50009 100644 --- a/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Essence_5.0_Sylph/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -14639,6 +14639,18 @@ public class PlayerInstance extends Playable return false; } + public TimedHuntingZoneHolder getTimedHuntingZone() + { + for (TimedHuntingZoneHolder holder : TimedHuntingZoneData.getInstance().getAllHuntingZones()) + { + if (isInTimedHuntingZone(holder.getZoneId())) + { + return holder; + } + } + return null; + } + public void startTimedHuntingZone(int zoneId, long delay) { // Stop previous task. diff --git a/L2J_Mobius_Essence_5.5_FrostLord/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Essence_5.5_FrostLord/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 23e534db69..cb44f50009 100644 --- a/L2J_Mobius_Essence_5.5_FrostLord/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Essence_5.5_FrostLord/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -14639,6 +14639,18 @@ public class PlayerInstance extends Playable return false; } + public TimedHuntingZoneHolder getTimedHuntingZone() + { + for (TimedHuntingZoneHolder holder : TimedHuntingZoneData.getInstance().getAllHuntingZones()) + { + if (isInTimedHuntingZone(holder.getZoneId())) + { + return holder; + } + } + return null; + } + public void startTimedHuntingZone(int zoneId, long delay) { // Stop previous task.