Fortune Pocket items.
This commit is contained in:
@@ -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);
|
||||
|
54
trunk/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
vendored
Normal file
54
trunk/dist/game/data/scripts/handlers/effecthandlers/GiveXp.java
vendored
Normal file
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user