Shortcut.java 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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.ShortcutType;
  21. /**
  22. * Shortcut DTO.
  23. * @author Zoey76
  24. */
  25. public class Shortcut
  26. {
  27. /** Slot from 0 to 11. */
  28. private final int _slot;
  29. /** Page from 0 to 9. */
  30. private final int _page;
  31. /** Type: item, skill, action, macro, recipe, bookmark. */
  32. private final ShortcutType _type;
  33. /** Shortcut ID. */
  34. private final int _id;
  35. /** Shortcut level (skills). */
  36. private final int _level;
  37. /** Character type: 1 player, 2 summon. */
  38. private final int _characterType;
  39. /** Shared reuse group. */
  40. private int _sharedReuseGroup = -1;
  41. public Shortcut(int slot, int page, ShortcutType type, int id, int level, int characterType)
  42. {
  43. _slot = slot;
  44. _page = page;
  45. _type = type;
  46. _id = id;
  47. _level = level;
  48. _characterType = characterType;
  49. }
  50. /**
  51. * Gets the shortcut ID.
  52. * @return the ID
  53. */
  54. public int getId()
  55. {
  56. return _id;
  57. }
  58. /**
  59. * Gets the shortcut level.
  60. * @return the level
  61. */
  62. public int getLevel()
  63. {
  64. return _level;
  65. }
  66. /**
  67. * Gets the shortcut page.
  68. * @return the page
  69. */
  70. public int getPage()
  71. {
  72. return _page;
  73. }
  74. /**
  75. * Gets the shortcut slot.
  76. * @return the slot
  77. */
  78. public int getSlot()
  79. {
  80. return _slot;
  81. }
  82. /**
  83. * Gets the shortcut type.
  84. * @return the type
  85. */
  86. public ShortcutType getType()
  87. {
  88. return _type;
  89. }
  90. /**
  91. * Gets the shortcut character type.
  92. * @return the character type
  93. */
  94. public int getCharacterType()
  95. {
  96. return _characterType;
  97. }
  98. /**
  99. * Gets the shared reuse group.
  100. * @return the shared reuse group
  101. */
  102. public int getSharedReuseGroup()
  103. {
  104. return _sharedReuseGroup;
  105. }
  106. /**
  107. * Sets the shared reuse group.
  108. * @param sharedReuseGroup the shared reuse group to set
  109. */
  110. public void setSharedReuseGroup(int sharedReuseGroup)
  111. {
  112. _sharedReuseGroup = sharedReuseGroup;
  113. }
  114. }