HeroSkillTable.java 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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.datatables;
  16. import net.sf.l2j.gameserver.model.L2Skill;
  17. /**
  18. *
  19. * @author BiTi
  20. */
  21. public class HeroSkillTable
  22. {
  23. private static HeroSkillTable _instance;
  24. private static L2Skill[] _heroSkills;
  25. private HeroSkillTable()
  26. {
  27. _heroSkills = new L2Skill[5];
  28. _heroSkills[0] = SkillTable.getInstance().getInfo(395, 1);
  29. _heroSkills[1] = SkillTable.getInstance().getInfo(396, 1);
  30. _heroSkills[2] = SkillTable.getInstance().getInfo(1374, 1);
  31. _heroSkills[3] = SkillTable.getInstance().getInfo(1375, 1);
  32. _heroSkills[4] = SkillTable.getInstance().getInfo(1376, 1);
  33. }
  34. public static HeroSkillTable getInstance()
  35. {
  36. if (_instance == null)
  37. _instance = new HeroSkillTable();
  38. return _instance;
  39. }
  40. public static L2Skill[] getHeroSkills()
  41. {
  42. return _heroSkills;
  43. }
  44. public static boolean isHeroSkill(int skillid)
  45. {
  46. Integer[] _HeroSkillsId = new Integer[]{395, 396, 1374, 1375, 1376};
  47. for (int id: _HeroSkillsId)
  48. {
  49. if (id == skillid)
  50. return true;
  51. }
  52. return false;
  53. }
  54. }