From a77c8fe253dace002732766bae7fb2c429bbfe50 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 8 Jul 2016 11:56:11 +0000 Subject: [PATCH] Fortune Pocket items. --- .../scripts/handlers/EffectMasterHandler.java | 1 + .../handlers/effecthandlers/GiveXp.java | 54 ++++++ .../game/data/stats/items/39600-39699.xml | 37 ++++ .../game/data/stats/skills/18000-18099.xml | 168 ++++++++++++++++-- 4 files changed, 241 insertions(+), 19 deletions(-) create mode 100644 trunk/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java diff --git a/trunk/dist/game/data/scripts/handlers/EffectMasterHandler.java b/trunk/dist/game/data/scripts/handlers/EffectMasterHandler.java index b1284b800e..b51ada8bb8 100644 --- a/trunk/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/trunk/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -140,6 +140,7 @@ public final class EffectMasterHandler EffectHandler.getInstance().registerHandler("GetMomentum", GetMomentum::new); EffectHandler.getInstance().registerHandler("GiveRecommendation", GiveRecommendation::new); EffectHandler.getInstance().registerHandler("GiveSp", GiveSp::new); + EffectHandler.getInstance().registerHandler("GiveXp", GiveXp::new); EffectHandler.getInstance().registerHandler("Grow", Grow::new); EffectHandler.getInstance().registerHandler("HairAccessorySet", HairAccessorySet::new); EffectHandler.getInstance().registerHandler("Harvesting", Harvesting::new); diff --git a/trunk/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java b/trunk/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java new file mode 100644 index 0000000000..210d76f3ea --- /dev/null +++ b/trunk/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java @@ -0,0 +1,54 @@ +/* + * 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.actor.L2Character; +import com.l2jmobius.gameserver.model.effects.AbstractEffect; +import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; +import com.l2jmobius.gameserver.model.skills.Skill; + +/** + * Give XP effect implementation. + * @author Mobius + */ +public final class GiveXp extends AbstractEffect +{ + private final int _xp; + + public GiveXp(StatsSet params) + { + _xp = params.getInt("xp", 0); + } + + @Override + public boolean isInstant() + { + return true; + } + + @Override + public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item) + { + if (!effector.isPlayer() || !effected.isPlayer() || effected.isAlikeDead()) + { + return; + } + + effector.getActingPlayer().addExpAndSp(_xp, 0); + } +} \ No newline at end of file diff --git a/trunk/dist/game/data/stats/items/39600-39699.xml b/trunk/dist/game/data/stats/items/39600-39699.xml index a4bbaffaf5..e6e4c8f290 100644 --- a/trunk/dist/game/data/stats/items/39600-39699.xml +++ b/trunk/dist/game/data/stats/items/39600-39699.xml @@ -646,6 +646,13 @@ + + + + + + + @@ -655,6 +662,13 @@ + + + + + + + @@ -664,6 +678,14 @@ + + + + + + + + @@ -673,6 +695,13 @@ + + + + + + + @@ -681,6 +710,14 @@ + + + + + + + + diff --git a/trunk/dist/game/data/stats/skills/18000-18099.xml b/trunk/dist/game/data/stats/skills/18000-18099.xml index 445feaedb9..9c4543b9c0 100644 --- a/trunk/dist/game/data/stats/skills/18000-18099.xml +++ b/trunk/dist/game/data/stats/skills/18000-18099.xml @@ -223,55 +223,185 @@ 600000 - - icon.skill0000 + 2 + 1 + 39629 + 1 A1 1000 + NONE;STRIDER;WYVERN;WOLF + 5 + 0 + SELF + SINGLE + + + 400000 + + - - icon.skill0000 + 2 + 1 + 39630 + 1 A1 1000 + NONE;STRIDER;WYVERN;WOLF + 5 + 0 + SELF + SINGLE + + + 1600000 + + - - icon.skill0000 + 2 + 1 + 39631 + 1 A1 - 5000 + 1000 + NONE;STRIDER;WYVERN;WOLF + 5 + 0 + SELF + SINGLE + + + 6400000 + + - - icon.skill0000 A1 - 1000 + NONE;STRIDER;WYVERN;WOLF + 5 + 0 + 1 + 2 + SELF + SINGLE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - icon.skill0000 + 2 + 1 + 39632 + 1 A1 - 200 1000 + NONE;STRIDER;WYVERN;WOLF + 5 + 0 + SELF + SINGLE + + + 80000 + + - - icon.skill0000 + 2 + 1 + 39633 + 1 A1 - 200 - 3000 + 1000 + NONE;STRIDER;WYVERN;WOLF + 5 + 0 + SELF + SINGLE + + + 256000 + + - icon.skill0000 A1 - 1000 + NONE;STRIDER;WYVERN;WOLF + 5 + 0 + 1 + 2 + SELF + SINGLE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +