From c5cbd4100e5e3dec9a194de1ceac16fc8d61f24f Mon Sep 17 00:00:00 2001
From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Fri, 22 Sep 2017 19:47:49 +0000
Subject: [PATCH] Addition of VitalityExpRate effect handler.
---
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/VitalityExpRate.java | 31 +++++++++++++++++++
.../game/data/stats/skills/documentation.txt | 1 +
.../gameserver/model/actor/stat/PcStat.java | 2 +-
.../gameserver/model/stats/Stats.java | 1 +
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/VitalityExpRate.java | 31 +++++++++++++++++++
.../game/data/stats/skills/documentation.txt | 1 +
.../gameserver/model/actor/stat/PcStat.java | 2 +-
.../gameserver/model/stats/Stats.java | 1 +
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/VitalityExpRate.java | 31 +++++++++++++++++++
.../game/data/stats/skills/documentation.txt | 1 +
.../gameserver/model/actor/stat/PcStat.java | 2 +-
.../gameserver/model/stats/Stats.java | 1 +
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/VitalityExpRate.java | 31 +++++++++++++++++++
.../game/data/stats/skills/documentation.txt | 1 +
.../gameserver/model/actor/stat/PcStat.java | 2 +-
.../gameserver/model/stats/Stats.java | 1 +
20 files changed, 140 insertions(+), 4 deletions(-)
create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/VitalityExpRate.java
create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/VitalityExpRate.java
create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/VitalityExpRate.java
create mode 100644 L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/VitalityExpRate.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 624993425c..6f93c8f43e 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
@@ -342,6 +342,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("Untargetable", Untargetable::new);
EffectHandler.getInstance().registerHandler("VampiricAttack", VampiricAttack::new);
EffectHandler.getInstance().registerHandler("VampiricDefence", VampiricDefence::new);
+ EffectHandler.getInstance().registerHandler("VitalityExpRate", VitalityExpRate::new);
EffectHandler.getInstance().registerHandler("VitalityPointsRate", VitalityPointsRate::new);
EffectHandler.getInstance().registerHandler("VitalityPointUp", VitalityPointUp::new);
EffectHandler.getInstance().registerHandler("WeightLimit", WeightLimit::new);
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/VitalityExpRate.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/VitalityExpRate.java
new file mode 100644
index 0000000000..d58bbd8104
--- /dev/null
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/VitalityExpRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 com.l2jmobius.gameserver.model.StatsSet;
+import com.l2jmobius.gameserver.model.stats.Stats;
+
+/**
+ * @author Mobius
+ */
+public class VitalityExpRate extends AbstractStatEffect
+{
+ public VitalityExpRate(StatsSet params)
+ {
+ super(params, Stats.VITALITY_EXP_RATE);
+ }
+}
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 1bda54e2db..0359ac63d1 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
@@ -308,6 +308,7 @@ UnsummonServitors: Unsummons target servitors.
Untargetable: Becomes untargetable.
VampiricAttack: Increases current HP when dealing damage.
VampiricDefence: Resist stat towards VampiricAttack
+VitalityExpRate: Sets the vitality exp rate. (l2jmobius)
VitalityPointsRate: Vitality points consume rate.
VitalityPointUp: Increases vitality points.
WeightLimit: Maximum weight stat.
diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java
index 609e9fbdd7..45d04ef7fe 100644
--- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java
+++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java
@@ -474,7 +474,7 @@ public class PcStat extends PlayableStat
public double getVitalityExpBonus()
{
- return (getVitalityPoints() > 0) ? Config.RATE_VITALITY_EXP_MULTIPLIER : 1.0;
+ return (getVitalityPoints() > 0) ? getValue(Stats.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
}
public void setVitalityPoints(int value)
diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/Stats.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/Stats.java
index ee04033d04..63eaeeec79 100644
--- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/Stats.java
+++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/Stats.java
@@ -223,6 +223,7 @@ public enum Stats
// Vitality
VITALITY_CONSUME_RATE("vitalityConsumeRate"),
+ VITALITY_EXP_RATE("vitalityExpRate"),
// Souls
MAX_SOULS("maxSouls"),
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 624993425c..6f93c8f43e 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
@@ -342,6 +342,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("Untargetable", Untargetable::new);
EffectHandler.getInstance().registerHandler("VampiricAttack", VampiricAttack::new);
EffectHandler.getInstance().registerHandler("VampiricDefence", VampiricDefence::new);
+ EffectHandler.getInstance().registerHandler("VitalityExpRate", VitalityExpRate::new);
EffectHandler.getInstance().registerHandler("VitalityPointsRate", VitalityPointsRate::new);
EffectHandler.getInstance().registerHandler("VitalityPointUp", VitalityPointUp::new);
EffectHandler.getInstance().registerHandler("WeightLimit", WeightLimit::new);
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/VitalityExpRate.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/VitalityExpRate.java
new file mode 100644
index 0000000000..bab4dee755
--- /dev/null
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/VitalityExpRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 com.l2jmobius.gameserver.model.StatsSet;
+import com.l2jmobius.gameserver.model.stats.Stats;
+
+/**
+ * @author Mobius
+ */
+public class VitalityExpRate extends AbstractStatEffect
+{
+ public VitalityExpRate(StatsSet params)
+ {
+ super(params, Stats.VITALITY_EXP_RATE);
+ }
+}
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 1bda54e2db..0359ac63d1 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
@@ -308,6 +308,7 @@ UnsummonServitors: Unsummons target servitors.
Untargetable: Becomes untargetable.
VampiricAttack: Increases current HP when dealing damage.
VampiricDefence: Resist stat towards VampiricAttack
+VitalityExpRate: Sets the vitality exp rate. (l2jmobius)
VitalityPointsRate: Vitality points consume rate.
VitalityPointUp: Increases vitality points.
WeightLimit: Maximum weight stat.
diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java
index 4d84c6c29d..e9561cde00 100644
--- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java
+++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java
@@ -476,7 +476,7 @@ public class PcStat extends PlayableStat
public double getVitalityExpBonus()
{
- return (getVitalityPoints() > 0) ? Config.RATE_VITALITY_EXP_MULTIPLIER : 1.0;
+ return (getVitalityPoints() > 0) ? getValue(Stats.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
}
public void setVitalityPoints(int value)
diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/Stats.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/Stats.java
index ee04033d04..63eaeeec79 100644
--- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/Stats.java
+++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/Stats.java
@@ -223,6 +223,7 @@ public enum Stats
// Vitality
VITALITY_CONSUME_RATE("vitalityConsumeRate"),
+ VITALITY_EXP_RATE("vitalityExpRate"),
// Souls
MAX_SOULS("maxSouls"),
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 624993425c..6f93c8f43e 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
@@ -342,6 +342,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("Untargetable", Untargetable::new);
EffectHandler.getInstance().registerHandler("VampiricAttack", VampiricAttack::new);
EffectHandler.getInstance().registerHandler("VampiricDefence", VampiricDefence::new);
+ EffectHandler.getInstance().registerHandler("VitalityExpRate", VitalityExpRate::new);
EffectHandler.getInstance().registerHandler("VitalityPointsRate", VitalityPointsRate::new);
EffectHandler.getInstance().registerHandler("VitalityPointUp", VitalityPointUp::new);
EffectHandler.getInstance().registerHandler("WeightLimit", WeightLimit::new);
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/VitalityExpRate.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/VitalityExpRate.java
new file mode 100644
index 0000000000..d58bbd8104
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/VitalityExpRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 com.l2jmobius.gameserver.model.StatsSet;
+import com.l2jmobius.gameserver.model.stats.Stats;
+
+/**
+ * @author Mobius
+ */
+public class VitalityExpRate extends AbstractStatEffect
+{
+ public VitalityExpRate(StatsSet params)
+ {
+ super(params, Stats.VITALITY_EXP_RATE);
+ }
+}
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 1bda54e2db..0359ac63d1 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
@@ -308,6 +308,7 @@ UnsummonServitors: Unsummons target servitors.
Untargetable: Becomes untargetable.
VampiricAttack: Increases current HP when dealing damage.
VampiricDefence: Resist stat towards VampiricAttack
+VitalityExpRate: Sets the vitality exp rate. (l2jmobius)
VitalityPointsRate: Vitality points consume rate.
VitalityPointUp: Increases vitality points.
WeightLimit: Maximum weight stat.
diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java
index 4d84c6c29d..e9561cde00 100644
--- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java
+++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java
@@ -476,7 +476,7 @@ public class PcStat extends PlayableStat
public double getVitalityExpBonus()
{
- return (getVitalityPoints() > 0) ? Config.RATE_VITALITY_EXP_MULTIPLIER : 1.0;
+ return (getVitalityPoints() > 0) ? getValue(Stats.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
}
public void setVitalityPoints(int value)
diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/Stats.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/Stats.java
index ee04033d04..63eaeeec79 100644
--- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/Stats.java
+++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/Stats.java
@@ -223,6 +223,7 @@ public enum Stats
// Vitality
VITALITY_CONSUME_RATE("vitalityConsumeRate"),
+ VITALITY_EXP_RATE("vitalityExpRate"),
// Souls
MAX_SOULS("maxSouls"),
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 624993425c..6f93c8f43e 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
@@ -342,6 +342,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("Untargetable", Untargetable::new);
EffectHandler.getInstance().registerHandler("VampiricAttack", VampiricAttack::new);
EffectHandler.getInstance().registerHandler("VampiricDefence", VampiricDefence::new);
+ EffectHandler.getInstance().registerHandler("VitalityExpRate", VitalityExpRate::new);
EffectHandler.getInstance().registerHandler("VitalityPointsRate", VitalityPointsRate::new);
EffectHandler.getInstance().registerHandler("VitalityPointUp", VitalityPointUp::new);
EffectHandler.getInstance().registerHandler("WeightLimit", WeightLimit::new);
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/VitalityExpRate.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/VitalityExpRate.java
new file mode 100644
index 0000000000..d58bbd8104
--- /dev/null
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/VitalityExpRate.java
@@ -0,0 +1,31 @@
+/*
+ * 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 com.l2jmobius.gameserver.model.StatsSet;
+import com.l2jmobius.gameserver.model.stats.Stats;
+
+/**
+ * @author Mobius
+ */
+public class VitalityExpRate extends AbstractStatEffect
+{
+ public VitalityExpRate(StatsSet params)
+ {
+ super(params, Stats.VITALITY_EXP_RATE);
+ }
+}
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 1bda54e2db..0359ac63d1 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
@@ -308,6 +308,7 @@ UnsummonServitors: Unsummons target servitors.
Untargetable: Becomes untargetable.
VampiricAttack: Increases current HP when dealing damage.
VampiricDefence: Resist stat towards VampiricAttack
+VitalityExpRate: Sets the vitality exp rate. (l2jmobius)
VitalityPointsRate: Vitality points consume rate.
VitalityPointUp: Increases vitality points.
WeightLimit: Maximum weight stat.
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java
index 4d84c6c29d..e9561cde00 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java
+++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/stat/PcStat.java
@@ -476,7 +476,7 @@ public class PcStat extends PlayableStat
public double getVitalityExpBonus()
{
- return (getVitalityPoints() > 0) ? Config.RATE_VITALITY_EXP_MULTIPLIER : 1.0;
+ return (getVitalityPoints() > 0) ? getValue(Stats.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
}
public void setVitalityPoints(int value)
diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Stats.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Stats.java
index ee04033d04..63eaeeec79 100644
--- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Stats.java
+++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Stats.java
@@ -223,6 +223,7 @@ public enum Stats
// Vitality
VITALITY_CONSUME_RATE("vitalityConsumeRate"),
+ VITALITY_EXP_RATE("vitalityExpRate"),
// Souls
MAX_SOULS("maxSouls"),