Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.96 KB | None | 0 0
  1. /*
  2. * This file is part of aion-unique <aion-unique.org>.
  3. *
  4. * aion-unique is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * aion-unique is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with aion-unique. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. package com.aionemu.gameserver.model.templates.item.enums;
  18.  
  19. import javax.xml.bind.annotation.XmlEnum;
  20. import javax.xml.bind.annotation.XmlType;
  21.  
  22. /**
  23. * @author xTz
  24. */
  25. @XmlType(name = "item_group")
  26. @XmlEnum
  27. public enum ItemGroup {
  28. NONE,
  29. NOWEAPON(3, ItemSubType.TWO_HAND),
  30. SWORD(3, ItemSubType.ONE_HAND, new int[] { 37, 44 }),
  31. GREATSWORD(3, ItemSubType.TWO_HAND, new int[] { 51 }),
  32. EXTRACT_SWORD(0, ItemSubType.NONE),
  33. DAGGER(3, ItemSubType.ONE_HAND, new int[] { 66, 45 }),
  34. MACE(3, ItemSubType.ONE_HAND, new int[] { 39, 46 }),
  35. ORB(3, ItemSubType.TWO_HAND, new int[] { 111 }),
  36. SPELLBOOK(3, ItemSubType.TWO_HAND, new int[] { 100 }),
  37. POLEARM(3, ItemSubType.TWO_HAND, new int[] { 52 }),
  38. STAFF(3, ItemSubType.TWO_HAND, new int[] { 89 }),
  39. BOW(3, ItemSubType.TWO_HAND, new int[] { 53 }),
  40. HARP(3, ItemSubType.TWO_HAND, new int[] { 124, 114 }),
  41. GUN(3, ItemSubType.ONE_HAND, new int[] { 117, 112 }),
  42. CANNON(3, ItemSubType.TWO_HAND, new int[] { 113 }),
  43. KEYBLADE(3, ItemSubType.TWO_HAND, new int[] { 112, 115 }),
  44. SHIELD(1 << 1, ItemSubType.SHIELD, new int[] { 43, 50 }),
  45.  
  46. TORSO(1 << 3, ItemSubType.ALL_ARMOR, new int[] { 103, 106 }),
  47. GLOVE(1 << 4, ItemSubType.ALL_ARMOR, new int[] { 103, 106 }),
  48. SHOULDER(1 << 11, ItemSubType.ALL_ARMOR, new int[] { 103, 106 }),
  49. PANTS(1 << 12, ItemSubType.ALL_ARMOR, new int[] { 103, 106 }),
  50. SHOES(1 << 5, ItemSubType.ALL_ARMOR, new int[] { 103, 106 }),
  51. RB_TORSO(1 << 3, ItemSubType.ROBE, new int[] { 103, 106 }),
  52. RB_GLOVE(1 << 4, ItemSubType.ROBE, new int[] { 103, 106 }),
  53. RB_SHOULDER(1 << 11, ItemSubType.ROBE, new int[] { 103, 106 }),
  54. RB_PANTS(1 << 12, ItemSubType.ROBE, new int[] { 103, 106 }),
  55. RB_SHOES(1 << 5, ItemSubType.ROBE, new int[] { 103, 106 }),
  56. CL_TORSO(1 << 3, ItemSubType.CLOTHES, new int[] { 40 }),
  57. CL_GLOVE(1 << 4, ItemSubType.CLOTHES, new int[] { 40 }),
  58. CL_SHOULDER(1 << 11, ItemSubType.CLOTHES, new int[] { 40 }),
  59. CL_PANTS(1 << 12, ItemSubType.CLOTHES, new int[] { 40 }),
  60. CL_SHOES(1 << 5, ItemSubType.CLOTHES, new int[] { 40 }),
  61. LT_TORSO(1 << 3, ItemSubType.LEATHER, new int[] { 41, 48 }),
  62. LT_GLOVE(1 << 4, ItemSubType.LEATHER, new int[] { 41, 48 }),
  63. LT_SHOULDER(1 << 11, ItemSubType.LEATHER, new int[] { 41, 48 }),
  64. LT_PANTS(1 << 12, ItemSubType.LEATHER, new int[] { 41, 48 }),
  65. LT_SHOES(1 << 5, ItemSubType.LEATHER, new int[] { 41, 48 }),
  66. CH_TORSO(1 << 3, ItemSubType.CHAIN, new int[] { 42, 49 }),
  67. CH_GLOVE(1 << 4, ItemSubType.CHAIN, new int[] { 42, 49 }),
  68. CH_SHOULDER(1 << 11, ItemSubType.CHAIN, new int[] { 42, 49 }),
  69. CH_PANTS(1 << 12, ItemSubType.CHAIN, new int[] { 42, 49 }),
  70. CH_SHOES(1 << 5, ItemSubType.CHAIN, new int[] { 42, 49 }),
  71. PL_TORSO(1 << 3, ItemSubType.PLATE, new int[] { 54 }),
  72. PL_GLOVE(1 << 4, ItemSubType.PLATE, new int[] { 54 }),
  73. PL_SHOULDER(1 << 11, ItemSubType.PLATE, new int[] { 54 }),
  74. PL_PANTS(1 << 12, ItemSubType.PLATE, new int[] { 54 }),
  75. PL_SHOES(1 << 5, ItemSubType.PLATE, new int[] { 54 }),
  76.  
  77.  
  78. EARRING(192, ArmorType.ACCESSORY),
  79. RING(768, ArmorType.ACCESSORY),
  80. NECKLACE(1 << 10, ArmorType.ACCESSORY),
  81. BELT(1 << 16, ArmorType.ACCESSORY),
  82. WING(1 << 15, ItemSubType.WING),
  83. PLUME(1 << 19, ItemSubType.PLUME),
  84.  
  85. HEAD(1 << 2, ArmorType.ACCESSORY),
  86. LT_HEAD(1 << 2, ItemSubType.LEATHER),
  87. CL_HEAD(1 << 2, ItemSubType.CLOTHES),
  88. CL_MULTISLOT(10, ItemSubType.CLOTHES),
  89. CL_SHIELD(1 << 1, ArmorType.ACCESSORY),
  90.  
  91. POWER_SHARDS(24576, ArmorType.ACCESSORY),
  92. STIGMA((long) 7E003F << 30, ItemSubType.STIGMA),
  93. // other
  94. ARROW(0, ItemSubType.ARROW),
  95. NPC_MACE(1, ItemSubType.ONE_HAND), // keep it above TOOLHOES, for search picking it up
  96. TOOLRODS(3, ItemSubType.TWO_HAND),
  97. TOOLHOES(1, ItemSubType.ONE_HAND),
  98. TOOLPICKS(3, ItemSubType.TWO_HAND),
  99. // non equip
  100. MANASTONE,
  101. SPECIAL_MANASTONE,
  102. RECIPE,
  103. ENCHANTMENT,
  104. PACK_SCROLL,
  105. FLUX,
  106. BALIC_EMOTION,
  107. BALIC_MATERIAL,
  108. RAWHIDE,
  109. SOULSTONE,
  110. GATHERABLE,
  111. GATHERABLE_BONUS,
  112. DROP_MATERIAL,
  113. COINS,
  114. MEDALS,
  115. QUEST,
  116. KEY,
  117. CRAFT_BOOST,
  118. TAMPERING,
  119. COMBINATION,
  120. SKILLBOOK,
  121. GODSTONE,
  122. STIGMA_SHARD;
  123.  
  124. private final long slot;
  125. private final ItemSubType itemSubType;
  126. private final ArmorType armorType;
  127. private final int[] requiredSkill;
  128.  
  129. private ItemGroup() {
  130. this(0, ItemSubType.NONE, new int[] {});
  131. }
  132.  
  133. private ItemGroup(long slot, ArmorType armorType) {
  134. this(slot, armorType, new int[] {});
  135. }
  136.  
  137. private ItemGroup(long slot, ItemSubType itemSubType) {
  138. this(slot, itemSubType, new int[] {});
  139. }
  140.  
  141. private ItemGroup(long slot, ItemSubType itemSubType, int[] requiredSkill) {
  142. this.slot = slot;
  143. this.itemSubType = itemSubType;
  144. this.armorType = null;
  145. this.requiredSkill = requiredSkill;
  146. }
  147.  
  148. private ItemGroup(long slot, ArmorType armorType, int[] requiredSkill) {
  149. this.slot = slot;
  150. this.itemSubType = ItemSubType.NONE;
  151. this.armorType = armorType;
  152. this.requiredSkill = requiredSkill;
  153. }
  154.  
  155. public long getSlots() {
  156. return slot;
  157. }
  158.  
  159. public ItemSubType getItemSubType() {
  160. return itemSubType;
  161. }
  162.  
  163. public ArmorType getArmorType() {
  164. return armorType;
  165. }
  166.  
  167. public int[] getRequiredSkills(String subtypePrefix) {
  168. if (requiredSkill != null)
  169. return requiredSkill;
  170. return null;
  171. }
  172.  
  173. public EquipType getEquipType() {
  174. if (armorType != null)
  175. return EquipType.ARMOR;
  176. else
  177. return itemSubType.getEquipType();
  178. }
  179.  
  180. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement