NpcBufferSkillData.java 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Copyright (C) 2004-2014 L2J Server
  3. *
  4. * This file is part of L2J Server.
  5. *
  6. * L2J Server is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * L2J Server is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. package ai.npc.NpcBuffers;
  20. import com.l2jserver.gameserver.model.StatsSet;
  21. import com.l2jserver.gameserver.model.holders.SkillHolder;
  22. import com.l2jserver.gameserver.model.skills.Skill;
  23. import com.l2jserver.gameserver.model.skills.targets.AffectObject;
  24. import com.l2jserver.gameserver.model.skills.targets.AffectScope;
  25. /**
  26. * @author UnAfraid
  27. */
  28. public class NpcBufferSkillData
  29. {
  30. private final SkillHolder _skill;
  31. private final int _initialDelay;
  32. private final int _delay;
  33. private final AffectScope _affectScope;
  34. private final AffectObject _affectObject;
  35. public NpcBufferSkillData(StatsSet set)
  36. {
  37. _skill = new SkillHolder(set.getInt("id"), set.getInt("level"));
  38. _initialDelay = set.getInt("skillInitDelay", 0) * 1000;
  39. _delay = set.getInt("delay") * 1000;
  40. _affectScope = set.getEnum("affectScope", AffectScope.class);
  41. _affectObject = set.getEnum("affectObject", AffectObject.class);
  42. }
  43. public Skill getSkill()
  44. {
  45. return _skill.getSkill();
  46. }
  47. public int getInitialDelay()
  48. {
  49. return _initialDelay;
  50. }
  51. public int getDelay()
  52. {
  53. return _delay;
  54. }
  55. public AffectScope getAffectScope()
  56. {
  57. return _affectScope;
  58. }
  59. public AffectObject getAffectObject()
  60. {
  61. return _affectObject;
  62. }
  63. }