From 9c565c53954757ce6203eb5b9ea937d45b63b2d8 Mon Sep 17 00:00:00 2001
From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Sun, 12 Nov 2017 16:24:55 +0000
Subject: [PATCH] Addition of AddSkillBySkill effect handler.
---
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/AddSkillBySkill.java | 59 +++++++++++++++++++
.../game/data/stats/skills/documentation.txt | 1 +
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/AddSkillBySkill.java | 59 +++++++++++++++++++
.../game/data/stats/skills/documentation.txt | 1 +
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/AddSkillBySkill.java | 59 +++++++++++++++++++
.../game/data/stats/skills/documentation.txt | 1 +
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/AddSkillBySkill.java | 59 +++++++++++++++++++
.../game/data/stats/skills/documentation.txt | 1 +
.../scripts/handlers/EffectMasterHandler.java | 1 +
.../effecthandlers/AddSkillBySkill.java | 59 +++++++++++++++++++
.../game/data/stats/skills/documentation.txt | 1 +
15 files changed, 305 insertions(+)
create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java
create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java
create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java
create mode 100644 L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java
create mode 100644 L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.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 17d6fd6772..4a1e1c59c7 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
@@ -37,6 +37,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("AbsorbDamage", AbsorbDamage::new);
EffectHandler.getInstance().registerHandler("Accuracy", Accuracy::new);
EffectHandler.getInstance().registerHandler("AddHate", AddHate::new);
+ EffectHandler.getInstance().registerHandler("AddSkillBySkill", AddSkillBySkill::new);
EffectHandler.getInstance().registerHandler("AddTeleportBookmarkSlot", AddTeleportBookmarkSlot::new);
EffectHandler.getInstance().registerHandler("AirBind", AirBind::new);
EffectHandler.getInstance().registerHandler("AreaDamage", AreaDamage::new);
diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java
new file mode 100644
index 0000000000..ad9d4513d3
--- /dev/null
+++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java
@@ -0,0 +1,59 @@
+/*
+ * 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.data.xml.impl.SkillData;
+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.skills.BuffInfo;
+import com.l2jmobius.gameserver.model.skills.Skill;
+
+/**
+ * @author Mobius
+ */
+public class AddSkillBySkill extends AbstractEffect
+{
+ private final int _existingSkillId;
+ private final int _existingSkillLevel;
+ private final Skill _addedSkill;
+
+ public AddSkillBySkill(StatsSet params)
+ {
+ _existingSkillId = params.getInt("existingSkillId");
+ _existingSkillLevel = params.getInt("existingSkillLevel");
+ _addedSkill = SkillData.getInstance().getSkill(params.getInt("addedSkillId"), params.getInt("addedSkillLevel"));
+ }
+
+ @Override
+ public boolean canPump(L2Character effector, L2Character effected, Skill skill)
+ {
+ return effector.isPlayer() && (effector.getSkillLevel(_existingSkillId) == _existingSkillLevel);
+ }
+
+ @Override
+ public void pump(L2Character effected, Skill skill)
+ {
+ effected.addSkill(_addedSkill);
+ }
+
+ @Override
+ public void onExit(BuffInfo info)
+ {
+ info.getEffected().removeSkill(_addedSkill, true);
+ }
+}
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 13fbef7dd2..f2cc1cb61e 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
@@ -6,6 +6,7 @@ AbstractStatAddEffect: Abstract class for managing stat adding.
AbstractStatEffect: Abstract class for managing stats.
Accuracy: P. Accuracy stat.
AddHate: Instant effect that increases target's hate towards you.
+AddSkillBySkill: Add skill when other skill already exists. (l2jmobius)
AddTeleportBookmarkSlot: Instant effect that increases the amount of My Teleport slots.
AirBind: Used by airbind chain skills. (l2jmobius)
AreaDamage: Topography (Danger Zone) resistance stat.
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 17d6fd6772..4a1e1c59c7 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
@@ -37,6 +37,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("AbsorbDamage", AbsorbDamage::new);
EffectHandler.getInstance().registerHandler("Accuracy", Accuracy::new);
EffectHandler.getInstance().registerHandler("AddHate", AddHate::new);
+ EffectHandler.getInstance().registerHandler("AddSkillBySkill", AddSkillBySkill::new);
EffectHandler.getInstance().registerHandler("AddTeleportBookmarkSlot", AddTeleportBookmarkSlot::new);
EffectHandler.getInstance().registerHandler("AirBind", AirBind::new);
EffectHandler.getInstance().registerHandler("AreaDamage", AreaDamage::new);
diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java
new file mode 100644
index 0000000000..ad9d4513d3
--- /dev/null
+++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java
@@ -0,0 +1,59 @@
+/*
+ * 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.data.xml.impl.SkillData;
+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.skills.BuffInfo;
+import com.l2jmobius.gameserver.model.skills.Skill;
+
+/**
+ * @author Mobius
+ */
+public class AddSkillBySkill extends AbstractEffect
+{
+ private final int _existingSkillId;
+ private final int _existingSkillLevel;
+ private final Skill _addedSkill;
+
+ public AddSkillBySkill(StatsSet params)
+ {
+ _existingSkillId = params.getInt("existingSkillId");
+ _existingSkillLevel = params.getInt("existingSkillLevel");
+ _addedSkill = SkillData.getInstance().getSkill(params.getInt("addedSkillId"), params.getInt("addedSkillLevel"));
+ }
+
+ @Override
+ public boolean canPump(L2Character effector, L2Character effected, Skill skill)
+ {
+ return effector.isPlayer() && (effector.getSkillLevel(_existingSkillId) == _existingSkillLevel);
+ }
+
+ @Override
+ public void pump(L2Character effected, Skill skill)
+ {
+ effected.addSkill(_addedSkill);
+ }
+
+ @Override
+ public void onExit(BuffInfo info)
+ {
+ info.getEffected().removeSkill(_addedSkill, true);
+ }
+}
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 13fbef7dd2..f2cc1cb61e 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
@@ -6,6 +6,7 @@ AbstractStatAddEffect: Abstract class for managing stat adding.
AbstractStatEffect: Abstract class for managing stats.
Accuracy: P. Accuracy stat.
AddHate: Instant effect that increases target's hate towards you.
+AddSkillBySkill: Add skill when other skill already exists. (l2jmobius)
AddTeleportBookmarkSlot: Instant effect that increases the amount of My Teleport slots.
AirBind: Used by airbind chain skills. (l2jmobius)
AreaDamage: Topography (Danger Zone) resistance stat.
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 17d6fd6772..4a1e1c59c7 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
@@ -37,6 +37,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("AbsorbDamage", AbsorbDamage::new);
EffectHandler.getInstance().registerHandler("Accuracy", Accuracy::new);
EffectHandler.getInstance().registerHandler("AddHate", AddHate::new);
+ EffectHandler.getInstance().registerHandler("AddSkillBySkill", AddSkillBySkill::new);
EffectHandler.getInstance().registerHandler("AddTeleportBookmarkSlot", AddTeleportBookmarkSlot::new);
EffectHandler.getInstance().registerHandler("AirBind", AirBind::new);
EffectHandler.getInstance().registerHandler("AreaDamage", AreaDamage::new);
diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java
new file mode 100644
index 0000000000..ad9d4513d3
--- /dev/null
+++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java
@@ -0,0 +1,59 @@
+/*
+ * 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.data.xml.impl.SkillData;
+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.skills.BuffInfo;
+import com.l2jmobius.gameserver.model.skills.Skill;
+
+/**
+ * @author Mobius
+ */
+public class AddSkillBySkill extends AbstractEffect
+{
+ private final int _existingSkillId;
+ private final int _existingSkillLevel;
+ private final Skill _addedSkill;
+
+ public AddSkillBySkill(StatsSet params)
+ {
+ _existingSkillId = params.getInt("existingSkillId");
+ _existingSkillLevel = params.getInt("existingSkillLevel");
+ _addedSkill = SkillData.getInstance().getSkill(params.getInt("addedSkillId"), params.getInt("addedSkillLevel"));
+ }
+
+ @Override
+ public boolean canPump(L2Character effector, L2Character effected, Skill skill)
+ {
+ return effector.isPlayer() && (effector.getSkillLevel(_existingSkillId) == _existingSkillLevel);
+ }
+
+ @Override
+ public void pump(L2Character effected, Skill skill)
+ {
+ effected.addSkill(_addedSkill);
+ }
+
+ @Override
+ public void onExit(BuffInfo info)
+ {
+ info.getEffected().removeSkill(_addedSkill, true);
+ }
+}
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 13fbef7dd2..f2cc1cb61e 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
@@ -6,6 +6,7 @@ AbstractStatAddEffect: Abstract class for managing stat adding.
AbstractStatEffect: Abstract class for managing stats.
Accuracy: P. Accuracy stat.
AddHate: Instant effect that increases target's hate towards you.
+AddSkillBySkill: Add skill when other skill already exists. (l2jmobius)
AddTeleportBookmarkSlot: Instant effect that increases the amount of My Teleport slots.
AirBind: Used by airbind chain skills. (l2jmobius)
AreaDamage: Topography (Danger Zone) resistance stat.
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java
index 17d6fd6772..4a1e1c59c7 100644
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java
@@ -37,6 +37,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("AbsorbDamage", AbsorbDamage::new);
EffectHandler.getInstance().registerHandler("Accuracy", Accuracy::new);
EffectHandler.getInstance().registerHandler("AddHate", AddHate::new);
+ EffectHandler.getInstance().registerHandler("AddSkillBySkill", AddSkillBySkill::new);
EffectHandler.getInstance().registerHandler("AddTeleportBookmarkSlot", AddTeleportBookmarkSlot::new);
EffectHandler.getInstance().registerHandler("AirBind", AirBind::new);
EffectHandler.getInstance().registerHandler("AreaDamage", AreaDamage::new);
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java
new file mode 100644
index 0000000000..ad9d4513d3
--- /dev/null
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java
@@ -0,0 +1,59 @@
+/*
+ * 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.data.xml.impl.SkillData;
+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.skills.BuffInfo;
+import com.l2jmobius.gameserver.model.skills.Skill;
+
+/**
+ * @author Mobius
+ */
+public class AddSkillBySkill extends AbstractEffect
+{
+ private final int _existingSkillId;
+ private final int _existingSkillLevel;
+ private final Skill _addedSkill;
+
+ public AddSkillBySkill(StatsSet params)
+ {
+ _existingSkillId = params.getInt("existingSkillId");
+ _existingSkillLevel = params.getInt("existingSkillLevel");
+ _addedSkill = SkillData.getInstance().getSkill(params.getInt("addedSkillId"), params.getInt("addedSkillLevel"));
+ }
+
+ @Override
+ public boolean canPump(L2Character effector, L2Character effected, Skill skill)
+ {
+ return effector.isPlayer() && (effector.getSkillLevel(_existingSkillId) == _existingSkillLevel);
+ }
+
+ @Override
+ public void pump(L2Character effected, Skill skill)
+ {
+ effected.addSkill(_addedSkill);
+ }
+
+ @Override
+ public void onExit(BuffInfo info)
+ {
+ info.getEffected().removeSkill(_addedSkill, true);
+ }
+}
diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt
index 13fbef7dd2..f2cc1cb61e 100644
--- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt
+++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt
@@ -6,6 +6,7 @@ AbstractStatAddEffect: Abstract class for managing stat adding.
AbstractStatEffect: Abstract class for managing stats.
Accuracy: P. Accuracy stat.
AddHate: Instant effect that increases target's hate towards you.
+AddSkillBySkill: Add skill when other skill already exists. (l2jmobius)
AddTeleportBookmarkSlot: Instant effect that increases the amount of My Teleport slots.
AirBind: Used by airbind chain skills. (l2jmobius)
AreaDamage: Topography (Danger Zone) resistance stat.
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 ef89f06b28..c916ba78dd 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
@@ -37,6 +37,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("AbsorbDamage", AbsorbDamage::new);
EffectHandler.getInstance().registerHandler("Accuracy", Accuracy::new);
EffectHandler.getInstance().registerHandler("AddHate", AddHate::new);
+ EffectHandler.getInstance().registerHandler("AddSkillBySkill", AddSkillBySkill::new);
EffectHandler.getInstance().registerHandler("AddTeleportBookmarkSlot", AddTeleportBookmarkSlot::new);
EffectHandler.getInstance().registerHandler("AreaDamage", AreaDamage::new);
EffectHandler.getInstance().registerHandler("AttackAttribute", AttackAttribute::new);
diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java
new file mode 100644
index 0000000000..ad9d4513d3
--- /dev/null
+++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/AddSkillBySkill.java
@@ -0,0 +1,59 @@
+/*
+ * 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.data.xml.impl.SkillData;
+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.skills.BuffInfo;
+import com.l2jmobius.gameserver.model.skills.Skill;
+
+/**
+ * @author Mobius
+ */
+public class AddSkillBySkill extends AbstractEffect
+{
+ private final int _existingSkillId;
+ private final int _existingSkillLevel;
+ private final Skill _addedSkill;
+
+ public AddSkillBySkill(StatsSet params)
+ {
+ _existingSkillId = params.getInt("existingSkillId");
+ _existingSkillLevel = params.getInt("existingSkillLevel");
+ _addedSkill = SkillData.getInstance().getSkill(params.getInt("addedSkillId"), params.getInt("addedSkillLevel"));
+ }
+
+ @Override
+ public boolean canPump(L2Character effector, L2Character effected, Skill skill)
+ {
+ return effector.isPlayer() && (effector.getSkillLevel(_existingSkillId) == _existingSkillLevel);
+ }
+
+ @Override
+ public void pump(L2Character effected, Skill skill)
+ {
+ effected.addSkill(_addedSkill);
+ }
+
+ @Override
+ public void onExit(BuffInfo info)
+ {
+ info.getEffected().removeSkill(_addedSkill, true);
+ }
+}
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 ff6f429781..62bdf7083e 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
@@ -6,6 +6,7 @@ AbstractStatAddEffect: Abstract class for managing stat adding.
AbstractStatEffect: Abstract class for managing stats.
Accuracy: P. Accuracy stat.
AddHate: Instant effect that increases target's hate towards you.
+AddSkillBySkill: Add skill when other skill already exists. (l2jmobius)
AddTeleportBookmarkSlot: Instant effect that increases the amount of My Teleport slots.
AreaDamage: Topography (Danger Zone) resistance stat.
AttackAttribute: Stat that increases specific attack attribute.