DrainSoul.java 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * This program is free software: you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation, either version 3 of the License, or (at your option) any later
  5. * version.
  6. *
  7. * This program is distributed in the hope that it will be useful, but WITHOUT
  8. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10. * details.
  11. *
  12. * You should have received a copy of the GNU General Public License along with
  13. * this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. package net.sf.l2j.gameserver.handler.skillhandlers;
  16. import java.util.logging.Logger;
  17. import net.sf.l2j.gameserver.handler.ISkillHandler;
  18. import net.sf.l2j.gameserver.model.L2Character;
  19. import net.sf.l2j.gameserver.model.L2Object;
  20. import net.sf.l2j.gameserver.model.L2Skill;
  21. import net.sf.l2j.gameserver.model.L2Skill.SkillType;
  22. import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  23. /**
  24. * @author _drunk_
  25. *
  26. * TODO To change the template for this generated type comment go to
  27. * Window - Preferences - Java - Code Style - Code Templates
  28. */
  29. public class DrainSoul implements ISkillHandler
  30. {
  31. private static Logger _log = Logger.getLogger(DrainSoul.class.getName());
  32. private static final SkillType[] SKILL_IDS = {SkillType.DRAIN_SOUL};
  33. public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets)
  34. {
  35. if (!(activeChar instanceof L2PcInstance))
  36. return;
  37. L2Object[] targetList = skill.getTargetList(activeChar);
  38. if (targetList == null)
  39. {
  40. return;
  41. }
  42. _log.fine("Soul Crystal casting succeded.");
  43. // This is just a dummy skill handler for the soul crystal skill,
  44. // since the Soul Crystal item handler already does everything.
  45. }
  46. public SkillType[] getSkillIds()
  47. {
  48. return SKILL_IDS;
  49. }
  50. }