Package l2p.gameserver.skills.skillclasses

Source Code of l2p.gameserver.skills.skillclasses.BuffCharger

package l2p.gameserver.skills.skillclasses;

import l2p.gameserver.model.L2Character;
import l2p.gameserver.model.L2Effect;
import l2p.gameserver.model.L2Skill;
import l2p.gameserver.tables.SkillTable;
import l2p.gameserver.templates.StatsSet;
import l2p.util.GArray;

public class BuffCharger extends L2Skill
{
  private int _target;

  public BuffCharger(StatsSet set)
  {
    super(set);
    _target = set.getInteger("targetBuff", 0);
  }

  @Override
  public void useSkill(L2Character activeChar, GArray<L2Character> targets)
  {
    for(L2Character target : targets)
    {
      int level = 0;
      GArray<L2Effect> el = target.getEffectList().getEffectsBySkillId(_target);
      if(el != null)
      {
        level = el.get(0).getSkill().getLevel();
      }
      L2Skill next = SkillTable.getInstance().getInfo(_target, level + 1);
      if(next != null)
      {
        next.getEffects(activeChar, target, false, false);
      }
    }
  }
}
TOP

Related Classes of l2p.gameserver.skills.skillclasses.BuffCharger

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.