diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/EffectMasterHandler.java index fdbe2a8762..610ee9e614 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -162,6 +162,7 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("GiveFame", GiveFame::new); EffectHandler.getInstance().registerHandler("GiveRecommendation", GiveRecommendation::new); EffectHandler.getInstance().registerHandler("GiveSp", GiveSp::new); + EffectHandler.getInstance().registerHandler("GiveSpiritExp", GiveSpiritExp::new); EffectHandler.getInstance().registerHandler("GiveXp", GiveXp::new); EffectHandler.getInstance().registerHandler("Grow", Grow::new); EffectHandler.getInstance().registerHandler("HairAccessorySet", HairAccessorySet::new); diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/GiveSpiritExp.java b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/GiveSpiritExp.java new file mode 100644 index 0000000000..5ab943b1f0 --- /dev/null +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/GiveSpiritExp.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 org.l2jmobius.gameserver.enums.ElementalType; +import org.l2jmobius.gameserver.model.ElementalSpirit; +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.effects.AbstractEffect; +import org.l2jmobius.gameserver.model.items.instance.ItemInstance; +import org.l2jmobius.gameserver.model.skills.Skill; + +/** + * @author Mobius + */ +public class GiveSpiritExp extends AbstractEffect +{ + private final ElementalType _type; + private final int _amount; + + public GiveSpiritExp(StatSet params) + { + _type = params.getEnum("type", ElementalType.class, ElementalType.NONE); + _amount = params.getInt("amount"); + } + + @Override + public boolean isInstant() + { + return true; + } + + @Override + public void instant(Creature effector, Creature effected, Skill skill, ItemInstance item) + { + if (effected == null) + { + return; + } + + final PlayerInstance player = effected.getActingPlayer(); + if (player == null) + { + return; + } + + final ElementalSpirit spirit = player.getElementalSpirit(_type); + if (spirit != null) + { + spirit.addExperience(_amount); + } + } +} \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/stats/skills/documentation.txt index 29e13a15f8..e93ce6a3da 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/stats/skills/documentation.txt @@ -133,6 +133,7 @@ GiveExpAndSp: Gives a given amount of XP and SP. (l2jmobius) GiveFame: Gives a given amount of Fame. (l2jmobius) GiveRecommendation: Gives recommendations to a player. Blue name. GiveSp: Gives a given amount of SP. +GiveSpiritExp: Adds set amount of experience to spirit. (l2jmobius) GiveXp: Gives a given amount of XP. (l2jmobius) Grow: Sets NPC collision to its growth collision. HairAccessorySet: See/Unsee hair accessory. diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/EffectMasterHandler.java index fdbe2a8762..610ee9e614 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -162,6 +162,7 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("GiveFame", GiveFame::new); EffectHandler.getInstance().registerHandler("GiveRecommendation", GiveRecommendation::new); EffectHandler.getInstance().registerHandler("GiveSp", GiveSp::new); + EffectHandler.getInstance().registerHandler("GiveSpiritExp", GiveSpiritExp::new); EffectHandler.getInstance().registerHandler("GiveXp", GiveXp::new); EffectHandler.getInstance().registerHandler("Grow", Grow::new); EffectHandler.getInstance().registerHandler("HairAccessorySet", HairAccessorySet::new); diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/GiveSpiritExp.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/GiveSpiritExp.java new file mode 100644 index 0000000000..5ab943b1f0 --- /dev/null +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/GiveSpiritExp.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 org.l2jmobius.gameserver.enums.ElementalType; +import org.l2jmobius.gameserver.model.ElementalSpirit; +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.effects.AbstractEffect; +import org.l2jmobius.gameserver.model.items.instance.ItemInstance; +import org.l2jmobius.gameserver.model.skills.Skill; + +/** + * @author Mobius + */ +public class GiveSpiritExp extends AbstractEffect +{ + private final ElementalType _type; + private final int _amount; + + public GiveSpiritExp(StatSet params) + { + _type = params.getEnum("type", ElementalType.class, ElementalType.NONE); + _amount = params.getInt("amount"); + } + + @Override + public boolean isInstant() + { + return true; + } + + @Override + public void instant(Creature effector, Creature effected, Skill skill, ItemInstance item) + { + if (effected == null) + { + return; + } + + final PlayerInstance player = effected.getActingPlayer(); + if (player == null) + { + return; + } + + final ElementalSpirit spirit = player.getElementalSpirit(_type); + if (spirit != null) + { + spirit.addExperience(_amount); + } + } +} \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/stats/skills/documentation.txt index 29e13a15f8..e93ce6a3da 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/stats/skills/documentation.txt @@ -133,6 +133,7 @@ GiveExpAndSp: Gives a given amount of XP and SP. (l2jmobius) GiveFame: Gives a given amount of Fame. (l2jmobius) GiveRecommendation: Gives recommendations to a player. Blue name. GiveSp: Gives a given amount of SP. +GiveSpiritExp: Adds set amount of experience to spirit. (l2jmobius) GiveXp: Gives a given amount of XP. (l2jmobius) Grow: Sets NPC collision to its growth collision. HairAccessorySet: See/Unsee hair accessory. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java index c259f5eb2b..152706f735 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -162,6 +162,7 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("GiveFame", GiveFame::new); EffectHandler.getInstance().registerHandler("GiveRecommendation", GiveRecommendation::new); EffectHandler.getInstance().registerHandler("GiveSp", GiveSp::new); + EffectHandler.getInstance().registerHandler("GiveSpiritExp", GiveSpiritExp::new); EffectHandler.getInstance().registerHandler("GiveXp", GiveXp::new); EffectHandler.getInstance().registerHandler("Grow", Grow::new); EffectHandler.getInstance().registerHandler("HairAccessorySet", HairAccessorySet::new); diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/GiveSpiritExp.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/GiveSpiritExp.java new file mode 100644 index 0000000000..5ab943b1f0 --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/GiveSpiritExp.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 org.l2jmobius.gameserver.enums.ElementalType; +import org.l2jmobius.gameserver.model.ElementalSpirit; +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.effects.AbstractEffect; +import org.l2jmobius.gameserver.model.items.instance.ItemInstance; +import org.l2jmobius.gameserver.model.skills.Skill; + +/** + * @author Mobius + */ +public class GiveSpiritExp extends AbstractEffect +{ + private final ElementalType _type; + private final int _amount; + + public GiveSpiritExp(StatSet params) + { + _type = params.getEnum("type", ElementalType.class, ElementalType.NONE); + _amount = params.getInt("amount"); + } + + @Override + public boolean isInstant() + { + return true; + } + + @Override + public void instant(Creature effector, Creature effected, Skill skill, ItemInstance item) + { + if (effected == null) + { + return; + } + + final PlayerInstance player = effected.getActingPlayer(); + if (player == null) + { + return; + } + + final ElementalSpirit spirit = player.getElementalSpirit(_type); + if (spirit != null) + { + spirit.addExperience(_amount); + } + } +} \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt index f8884db193..458e2bf4e3 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt @@ -133,6 +133,7 @@ GiveExpAndSp: Gives a given amount of XP and SP. (l2jmobius) GiveFame: Gives a given amount of Fame. (l2jmobius) GiveRecommendation: Gives recommendations to a player. Blue name. GiveSp: Gives a given amount of SP. +GiveSpiritExp: Adds set amount of experience to spirit. (l2jmobius) GiveXp: Gives a given amount of XP. (l2jmobius) Grow: Sets NPC collision to its growth collision. HairAccessorySet: See/Unsee hair accessory. diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java index 0a9d59c545..12f9142f76 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -162,6 +162,7 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("GiveFame", GiveFame::new); EffectHandler.getInstance().registerHandler("GiveRecommendation", GiveRecommendation::new); EffectHandler.getInstance().registerHandler("GiveSp", GiveSp::new); + EffectHandler.getInstance().registerHandler("GiveSpiritExp", GiveSpiritExp::new); EffectHandler.getInstance().registerHandler("GiveXp", GiveXp::new); EffectHandler.getInstance().registerHandler("Grow", Grow::new); EffectHandler.getInstance().registerHandler("HairAccessorySet", HairAccessorySet::new); diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/GiveSpiritExp.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/GiveSpiritExp.java new file mode 100644 index 0000000000..5ab943b1f0 --- /dev/null +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/GiveSpiritExp.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 org.l2jmobius.gameserver.enums.ElementalType; +import org.l2jmobius.gameserver.model.ElementalSpirit; +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.effects.AbstractEffect; +import org.l2jmobius.gameserver.model.items.instance.ItemInstance; +import org.l2jmobius.gameserver.model.skills.Skill; + +/** + * @author Mobius + */ +public class GiveSpiritExp extends AbstractEffect +{ + private final ElementalType _type; + private final int _amount; + + public GiveSpiritExp(StatSet params) + { + _type = params.getEnum("type", ElementalType.class, ElementalType.NONE); + _amount = params.getInt("amount"); + } + + @Override + public boolean isInstant() + { + return true; + } + + @Override + public void instant(Creature effector, Creature effected, Skill skill, ItemInstance item) + { + if (effected == null) + { + return; + } + + final PlayerInstance player = effected.getActingPlayer(); + if (player == null) + { + return; + } + + final ElementalSpirit spirit = player.getElementalSpirit(_type); + if (spirit != null) + { + spirit.addExperience(_amount); + } + } +} \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt index 58d6c9593a..a8b5268dc1 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt @@ -133,6 +133,7 @@ GiveExpAndSp: Gives a given amount of XP and SP. (l2jmobius) GiveFame: Gives a given amount of Fame. (l2jmobius) GiveRecommendation: Gives recommendations to a player. Blue name. GiveSp: Gives a given amount of SP. +GiveSpiritExp: Adds set amount of experience to spirit. (l2jmobius) GiveXp: Gives a given amount of XP. (l2jmobius) Grow: Sets NPC collision to its growth collision. HairAccessorySet: See/Unsee hair accessory.