EffectPhoenixBless.java 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 2, or (at your option) any later version.
  5. *
  6. * This program is distributed in the hope that it will be useful, but WITHOUT
  7. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  8. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  9. * details.
  10. *
  11. * You should have received a copy of the GNU General Public License along with
  12. * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
  13. * Place - Suite 330, Boston, MA 02111-1307, USA.
  14. *
  15. * http://www.gnu.org/copyleft/gpl.html
  16. */
  17. package net.sf.l2j.gameserver.skills.effects;
  18. import net.sf.l2j.gameserver.model.L2Effect;
  19. import net.sf.l2j.gameserver.model.actor.L2Playable;
  20. import net.sf.l2j.gameserver.skills.Env;
  21. import net.sf.l2j.gameserver.templates.effects.EffectTemplate;
  22. import net.sf.l2j.gameserver.templates.skills.L2EffectType;
  23. /**
  24. * @author Faror
  25. */
  26. public class EffectPhoenixBless extends L2Effect
  27. {
  28. public EffectPhoenixBless(Env env, EffectTemplate template)
  29. {
  30. super(env, template);
  31. }
  32. /**
  33. *
  34. * @see net.sf.l2j.gameserver.model.L2Effect#getEffectType()
  35. */
  36. @Override
  37. public L2EffectType getEffectType()
  38. {
  39. return L2EffectType.PHOENIX_BLESSING;
  40. }
  41. /**
  42. *
  43. * @see net.sf.l2j.gameserver.model.L2Effect#onStart()
  44. */
  45. @Override
  46. public boolean onStart()
  47. {
  48. if (getEffected() instanceof L2Playable)
  49. {
  50. ((L2Playable) getEffected()).startPhoenixBlessing();
  51. return true;
  52. }
  53. return false;
  54. }
  55. /**
  56. *
  57. * @see net.sf.l2j.gameserver.model.L2Effect#onExit()
  58. */
  59. @Override
  60. public void onExit()
  61. {
  62. ((L2Playable) getEffected()).stopPhoenixBlessing(this);
  63. }
  64. /**
  65. *
  66. * @see net.sf.l2j.gameserver.model.L2Effect#onActionTime()
  67. */
  68. @Override
  69. public boolean onActionTime()
  70. {
  71. // just stop this effect
  72. return false;
  73. }
  74. }