From 64f3191c4d359055154af59edc07f59baf0d730d Mon Sep 17 00:00:00 2001
From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Mon, 30 Oct 2017 22:22:56 +0000
Subject: [PATCH] Addition of ResetInstanceEntry effect handler.
---
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/ResetInstanceEntry.java | 68 +++++++++++++++++++
.../game/data/stats/skills/documentation.txt | 1 +
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/ResetInstanceEntry.java | 68 +++++++++++++++++++
.../game/data/stats/skills/documentation.txt | 1 +
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/ResetInstanceEntry.java | 68 +++++++++++++++++++
.../game/data/stats/skills/documentation.txt | 1 +
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/ResetInstanceEntry.java | 68 +++++++++++++++++++
.../game/data/stats/skills/documentation.txt | 1 +
12 files changed, 280 insertions(+)
create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ResetInstanceEntry.java
create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ResetInstanceEntry.java
create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ResetInstanceEntry.java
create mode 100644 L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ResetInstanceEntry.java
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java
index 087630c862..ef89f06b28 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -262,6 +262,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("ReflectSkill", ReflectSkill::new);
EffectHandler.getInstance().registerHandler("RefuelAirship", RefuelAirship::new);
EffectHandler.getInstance().registerHandler("Relax", Relax::new);
+ EffectHandler.getInstance().registerHandler("ResetInstanceEntry", ResetInstanceEntry::new);
EffectHandler.getInstance().registerHandler("ResistAbnormalByCategory", ResistAbnormalByCategory::new);
EffectHandler.getInstance().registerHandler("ResistDDMagic", ResistDDMagic::new);
EffectHandler.getInstance().registerHandler("ResistDispelByCategory", ResistDispelByCategory::new);
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ResetInstanceEntry.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ResetInstanceEntry.java
new file mode 100644
index 0000000000..b231c1dcdf
--- /dev/null
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/ResetInstanceEntry.java
@@ -0,0 +1,68 @@
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package handlers.effecthandlers;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import com.l2jmobius.gameserver.instancemanager.InstanceManager;
+import com.l2jmobius.gameserver.model.StatsSet;
+import com.l2jmobius.gameserver.model.actor.L2Character;
+import com.l2jmobius.gameserver.model.effects.AbstractEffect;
+import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
+import com.l2jmobius.gameserver.model.skills.Skill;
+
+/**
+ * @author Mobius
+ */
+public class ResetInstanceEntry extends AbstractEffect
+{
+ private final Set _instanceId;
+
+ public ResetInstanceEntry(StatsSet params)
+ {
+ final String instanceIds = params.getString("instanceId", null);
+ if ((instanceIds != null) && !instanceIds.isEmpty())
+ {
+ _instanceId = new HashSet<>();
+ for (String id : instanceIds.split(";"))
+ {
+ _instanceId.add(Integer.parseInt(id));
+ }
+ }
+ else
+ {
+ _instanceId = Collections. emptySet();
+ }
+ }
+
+ @Override
+ public boolean isInstant()
+ {
+ return true;
+ }
+
+ @Override
+ public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
+ {
+ for (int instanceId : _instanceId)
+ {
+ InstanceManager.getInstance().deleteInstanceTime(effector.getActingPlayer(), instanceId);
+ }
+ }
+}
\ No newline at end of file
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt
index cface0300e..ff6f429781 100644
--- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt
@@ -230,6 +230,7 @@ ReflectMagic: Deflects magical damage back to the attacker.
ReflectSkill: Deflects physical/magical debuffs back to the attacker.
RefuelAirship: Increases Airship's fuel.
Relax: Sits down and increases HP regeneration until full.
+ResetInstanceEntry: Resets instance re-entry time. (l2jmobius)
ResistAbnormalByCategory: Buff/debuff resist stat.
ResistDDMagic: Magic resist stat (magic attack 50% effective or 1 damage)
ResistDispelByCategory: Buff/Debuff cancellation resist.
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java
index 087630c862..ef89f06b28 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -262,6 +262,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("ReflectSkill", ReflectSkill::new);
EffectHandler.getInstance().registerHandler("RefuelAirship", RefuelAirship::new);
EffectHandler.getInstance().registerHandler("Relax", Relax::new);
+ EffectHandler.getInstance().registerHandler("ResetInstanceEntry", ResetInstanceEntry::new);
EffectHandler.getInstance().registerHandler("ResistAbnormalByCategory", ResistAbnormalByCategory::new);
EffectHandler.getInstance().registerHandler("ResistDDMagic", ResistDDMagic::new);
EffectHandler.getInstance().registerHandler("ResistDispelByCategory", ResistDispelByCategory::new);
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ResetInstanceEntry.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ResetInstanceEntry.java
new file mode 100644
index 0000000000..b231c1dcdf
--- /dev/null
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/ResetInstanceEntry.java
@@ -0,0 +1,68 @@
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package handlers.effecthandlers;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import com.l2jmobius.gameserver.instancemanager.InstanceManager;
+import com.l2jmobius.gameserver.model.StatsSet;
+import com.l2jmobius.gameserver.model.actor.L2Character;
+import com.l2jmobius.gameserver.model.effects.AbstractEffect;
+import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
+import com.l2jmobius.gameserver.model.skills.Skill;
+
+/**
+ * @author Mobius
+ */
+public class ResetInstanceEntry extends AbstractEffect
+{
+ private final Set _instanceId;
+
+ public ResetInstanceEntry(StatsSet params)
+ {
+ final String instanceIds = params.getString("instanceId", null);
+ if ((instanceIds != null) && !instanceIds.isEmpty())
+ {
+ _instanceId = new HashSet<>();
+ for (String id : instanceIds.split(";"))
+ {
+ _instanceId.add(Integer.parseInt(id));
+ }
+ }
+ else
+ {
+ _instanceId = Collections. emptySet();
+ }
+ }
+
+ @Override
+ public boolean isInstant()
+ {
+ return true;
+ }
+
+ @Override
+ public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
+ {
+ for (int instanceId : _instanceId)
+ {
+ InstanceManager.getInstance().deleteInstanceTime(effector.getActingPlayer(), instanceId);
+ }
+ }
+}
\ No newline at end of file
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt
index cface0300e..ff6f429781 100644
--- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt
@@ -230,6 +230,7 @@ ReflectMagic: Deflects magical damage back to the attacker.
ReflectSkill: Deflects physical/magical debuffs back to the attacker.
RefuelAirship: Increases Airship's fuel.
Relax: Sits down and increases HP regeneration until full.
+ResetInstanceEntry: Resets instance re-entry time. (l2jmobius)
ResistAbnormalByCategory: Buff/debuff resist stat.
ResistDDMagic: Magic resist stat (magic attack 50% effective or 1 damage)
ResistDispelByCategory: Buff/Debuff cancellation resist.
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java
index 087630c862..ef89f06b28 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -262,6 +262,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("ReflectSkill", ReflectSkill::new);
EffectHandler.getInstance().registerHandler("RefuelAirship", RefuelAirship::new);
EffectHandler.getInstance().registerHandler("Relax", Relax::new);
+ EffectHandler.getInstance().registerHandler("ResetInstanceEntry", ResetInstanceEntry::new);
EffectHandler.getInstance().registerHandler("ResistAbnormalByCategory", ResistAbnormalByCategory::new);
EffectHandler.getInstance().registerHandler("ResistDDMagic", ResistDDMagic::new);
EffectHandler.getInstance().registerHandler("ResistDispelByCategory", ResistDispelByCategory::new);
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ResetInstanceEntry.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ResetInstanceEntry.java
new file mode 100644
index 0000000000..b231c1dcdf
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/ResetInstanceEntry.java
@@ -0,0 +1,68 @@
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package handlers.effecthandlers;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import com.l2jmobius.gameserver.instancemanager.InstanceManager;
+import com.l2jmobius.gameserver.model.StatsSet;
+import com.l2jmobius.gameserver.model.actor.L2Character;
+import com.l2jmobius.gameserver.model.effects.AbstractEffect;
+import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
+import com.l2jmobius.gameserver.model.skills.Skill;
+
+/**
+ * @author Mobius
+ */
+public class ResetInstanceEntry extends AbstractEffect
+{
+ private final Set _instanceId;
+
+ public ResetInstanceEntry(StatsSet params)
+ {
+ final String instanceIds = params.getString("instanceId", null);
+ if ((instanceIds != null) && !instanceIds.isEmpty())
+ {
+ _instanceId = new HashSet<>();
+ for (String id : instanceIds.split(";"))
+ {
+ _instanceId.add(Integer.parseInt(id));
+ }
+ }
+ else
+ {
+ _instanceId = Collections. emptySet();
+ }
+ }
+
+ @Override
+ public boolean isInstant()
+ {
+ return true;
+ }
+
+ @Override
+ public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
+ {
+ for (int instanceId : _instanceId)
+ {
+ InstanceManager.getInstance().deleteInstanceTime(effector.getActingPlayer(), instanceId);
+ }
+ }
+}
\ No newline at end of file
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt
index cface0300e..ff6f429781 100644
--- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt
@@ -230,6 +230,7 @@ ReflectMagic: Deflects magical damage back to the attacker.
ReflectSkill: Deflects physical/magical debuffs back to the attacker.
RefuelAirship: Increases Airship's fuel.
Relax: Sits down and increases HP regeneration until full.
+ResetInstanceEntry: Resets instance re-entry time. (l2jmobius)
ResistAbnormalByCategory: Buff/debuff resist stat.
ResistDDMagic: Magic resist stat (magic attack 50% effective or 1 damage)
ResistDispelByCategory: Buff/Debuff cancellation resist.
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java
index 087630c862..ef89f06b28 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -262,6 +262,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("ReflectSkill", ReflectSkill::new);
EffectHandler.getInstance().registerHandler("RefuelAirship", RefuelAirship::new);
EffectHandler.getInstance().registerHandler("Relax", Relax::new);
+ EffectHandler.getInstance().registerHandler("ResetInstanceEntry", ResetInstanceEntry::new);
EffectHandler.getInstance().registerHandler("ResistAbnormalByCategory", ResistAbnormalByCategory::new);
EffectHandler.getInstance().registerHandler("ResistDDMagic", ResistDDMagic::new);
EffectHandler.getInstance().registerHandler("ResistDispelByCategory", ResistDispelByCategory::new);
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ResetInstanceEntry.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ResetInstanceEntry.java
new file mode 100644
index 0000000000..b231c1dcdf
--- /dev/null
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/ResetInstanceEntry.java
@@ -0,0 +1,68 @@
+/*
+ * This file is part of the L2J Mobius project.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package handlers.effecthandlers;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import com.l2jmobius.gameserver.instancemanager.InstanceManager;
+import com.l2jmobius.gameserver.model.StatsSet;
+import com.l2jmobius.gameserver.model.actor.L2Character;
+import com.l2jmobius.gameserver.model.effects.AbstractEffect;
+import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
+import com.l2jmobius.gameserver.model.skills.Skill;
+
+/**
+ * @author Mobius
+ */
+public class ResetInstanceEntry extends AbstractEffect
+{
+ private final Set _instanceId;
+
+ public ResetInstanceEntry(StatsSet params)
+ {
+ final String instanceIds = params.getString("instanceId", null);
+ if ((instanceIds != null) && !instanceIds.isEmpty())
+ {
+ _instanceId = new HashSet<>();
+ for (String id : instanceIds.split(";"))
+ {
+ _instanceId.add(Integer.parseInt(id));
+ }
+ }
+ else
+ {
+ _instanceId = Collections. emptySet();
+ }
+ }
+
+ @Override
+ public boolean isInstant()
+ {
+ return true;
+ }
+
+ @Override
+ public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
+ {
+ for (int instanceId : _instanceId)
+ {
+ InstanceManager.getInstance().deleteInstanceTime(effector.getActingPlayer(), instanceId);
+ }
+ }
+}
\ No newline at end of file
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt
index cface0300e..ff6f429781 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt
@@ -230,6 +230,7 @@ ReflectMagic: Deflects magical damage back to the attacker.
ReflectSkill: Deflects physical/magical debuffs back to the attacker.
RefuelAirship: Increases Airship's fuel.
Relax: Sits down and increases HP regeneration until full.
+ResetInstanceEntry: Resets instance re-entry time. (l2jmobius)
ResistAbnormalByCategory: Buff/debuff resist stat.
ResistDDMagic: Magic resist stat (magic attack 50% effective or 1 damage)
ResistDispelByCategory: Buff/Debuff cancellation resist.