Macro.java 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * Copyright (C) 2004-2013 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 com.l2jserver.gameserver.model;
  20. import java.util.List;
  21. import com.l2jserver.gameserver.model.interfaces.IIdentifiable;
  22. import com.l2jserver.gameserver.model.interfaces.INamable;
  23. public class Macro implements IIdentifiable, INamable
  24. {
  25. public static final int CMD_TYPE_SKILL = 1;
  26. public static final int CMD_TYPE_ACTION = 3;
  27. public static final int CMD_TYPE_SHORTCUT = 4;
  28. private int _id;
  29. private final int _icon;
  30. private final String _name;
  31. private final String _descr;
  32. private final String _acronym;
  33. private final List<MacroCmd> _commands;
  34. public Macro(int id, int icon, String name, String descr, String acronym, List<MacroCmd> list)
  35. {
  36. setId(id);
  37. _icon = icon;
  38. _name = name;
  39. _descr = descr;
  40. _acronym = acronym;
  41. _commands = list;
  42. }
  43. @Override
  44. public int getId()
  45. {
  46. return _id;
  47. }
  48. public void setId(int _id)
  49. {
  50. this._id = _id;
  51. }
  52. public int getIcon()
  53. {
  54. return _icon;
  55. }
  56. @Override
  57. public String getName()
  58. {
  59. return _name;
  60. }
  61. public String getDescr()
  62. {
  63. return _descr;
  64. }
  65. public String getAcronym()
  66. {
  67. return _acronym;
  68. }
  69. public List<MacroCmd> getCommands()
  70. {
  71. return _commands;
  72. }
  73. }