Addition of CallLearnedSkill effect.

Contributed by Kazumi.
This commit is contained in:
MobiusDev
2019-02-16 15:26:21 +00:00
parent 25c8b60c26
commit 4e03ba0932
32 changed files with 709 additions and 274 deletions

View File

@@ -67,6 +67,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("BonusSpoilRate", BonusSpoilRate::new);
EffectHandler.getInstance().registerHandler("Breath", Breath::new);
EffectHandler.getInstance().registerHandler("BuffBlock", BuffBlock::new);
EffectHandler.getInstance().registerHandler("CallLearnedSkill", CallLearnedSkill::new);
EffectHandler.getInstance().registerHandler("CallParty", CallParty::new);
EffectHandler.getInstance().registerHandler("CallPc", CallPc::new);
EffectHandler.getInstance().registerHandler("CallRandomSkill", CallRandomSkill::new);

View 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;
import com.l2jmobius.gameserver.model.skills.SkillCaster;
/**
* Call Learned Skill by Level effect implementation.
* @author Kazumi
*/
public final class CallLearnedSkill extends AbstractEffect
{
private final int _skillId;
public CallLearnedSkill(StatsSet params)
{
_skillId = params.getInt("skillId");
}
@Override
public boolean isInstant()
{
return true;
}
@Override
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
{
final Skill knownSkill = effector.getKnownSkill(_skillId);
if (knownSkill != null)
{
SkillCaster.triggerCast(effector, effected, knownSkill);
}
}
}

View File

@@ -36,6 +36,7 @@ BonusDropRate: Bonus chance for dropping items. (l2jmobius)
BonusSpoilRate: Bonus chance for acquiring spoil items. (l2jmobius)
Breath: Underwater breathing stat.
BuffBlock: Blocks target from receiving buffs.
CallLearnedSkill: Calls existing learned skill. (l2jmobius)
CallParty: Recalls whole party.
CallPc: Recalls a Player.
CallRandomSkill: Triggers a random skill. (l2jmobius)