MacroCmd.java 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 com.l2jserver.gameserver.model;
  20. import com.l2jserver.gameserver.enums.MacroType;
  21. /**
  22. * Macro Cmd DTO.
  23. * @author Zoey76
  24. */
  25. public class MacroCmd
  26. {
  27. private final int _entry;
  28. private final MacroType _type;
  29. private final int _d1; // skill_id or page for shortcuts
  30. private final int _d2; // shortcut
  31. private final String _cmd;
  32. public MacroCmd(int entry, MacroType type, int d1, int d2, String cmd)
  33. {
  34. _entry = entry;
  35. _type = type;
  36. _d1 = d1;
  37. _d2 = d2;
  38. _cmd = cmd;
  39. }
  40. /**
  41. * Gets the entry index.
  42. * @return the entry index
  43. */
  44. public int getEntry()
  45. {
  46. return _entry;
  47. }
  48. /**
  49. * Gets the macro type.
  50. * @return the macro type
  51. */
  52. public MacroType getType()
  53. {
  54. return _type;
  55. }
  56. /**
  57. * Gets the skill ID, item ID, page ID, depending on the marco use.
  58. * @return the first value
  59. */
  60. public int getD1()
  61. {
  62. return _d1;
  63. }
  64. /**
  65. * Gets the skill level, shortcut ID, depending on the marco use.
  66. * @return the second value
  67. */
  68. public int getD2()
  69. {
  70. return _d2;
  71. }
  72. /**
  73. * Gets the command.
  74. * @return the command
  75. */
  76. public String getCmd()
  77. {
  78. return _cmd;
  79. }
  80. }