테스트

aion-server 4.8

Gitteol
최고관리자 · 1 · 💬 0 클론/새로받기
 4.8 61f661d · 1 commits 새로받기(Pull)
game-server/src/com/aionemu/gameserver/model/templates/item/enums/ItemGroup.java
package com.aionemu.gameserver.model.templates.item.enums;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;

import com.aionemu.gameserver.model.items.ItemSlot;

/**
 * @author xTz
 */
@XmlType(name = "item_group")
@XmlEnum
public enum ItemGroup {
	NONE,
	NOWEAPON(ItemSlot.MAIN_OR_SUB.getSlotIdMask(), ItemSubType.TWO_HAND),
	SWORD(ItemSlot.MAIN_OR_SUB.getSlotIdMask(), ItemSubType.ONE_HAND, new int[] { 37, 44 }),
	GREATSWORD(ItemSlot.MAIN_OR_SUB.getSlotIdMask(), ItemSubType.TWO_HAND, new int[] { 51 }),
	EXTRACT_SWORD(0, ItemSubType.NONE),
	DAGGER(ItemSlot.MAIN_OR_SUB.getSlotIdMask(), ItemSubType.ONE_HAND, new int[] { 66, 45 }),
	MACE(ItemSlot.MAIN_OR_SUB.getSlotIdMask(), ItemSubType.ONE_HAND, new int[] { 39, 46 }),
	ORB(ItemSlot.MAIN_OR_SUB.getSlotIdMask(), ItemSubType.TWO_HAND, new int[] { 111 }),
	SPELLBOOK(ItemSlot.MAIN_OR_SUB.getSlotIdMask(), ItemSubType.TWO_HAND, new int[] { 100 }),
	POLEARM(ItemSlot.MAIN_OR_SUB.getSlotIdMask(), ItemSubType.TWO_HAND, new int[] { 52 }),
	STAFF(ItemSlot.MAIN_OR_SUB.getSlotIdMask(), ItemSubType.TWO_HAND, new int[] { 89 }),
	BOW(ItemSlot.MAIN_OR_SUB.getSlotIdMask(), ItemSubType.TWO_HAND, new int[] { 53 }),
	HARP(ItemSlot.MAIN_OR_SUB.getSlotIdMask(), ItemSubType.TWO_HAND, new int[] { 124, 114 }),
	GUN(ItemSlot.MAIN_OR_SUB.getSlotIdMask(), ItemSubType.ONE_HAND, new int[] { 117, 112 }),
	CANNON(ItemSlot.MAIN_OR_SUB.getSlotIdMask(), ItemSubType.TWO_HAND, new int[] { 113 }),
	KEYBLADE(ItemSlot.MAIN_OR_SUB.getSlotIdMask(), ItemSubType.TWO_HAND, new int[] { 112, 115 }),
	SHIELD(ItemSlot.SUB_HAND.getSlotIdMask(), ItemSubType.SHIELD, new int[] { 43, 50 }),
	
	TORSO(ItemSlot.TORSO.getSlotIdMask(), ItemSubType.ALL_ARMOR, new int[] { 103, 106 }),
	GLOVE(ItemSlot.GLOVES.getSlotIdMask(), ItemSubType.ALL_ARMOR, new int[] { 103, 106 }),
	SHOULDER(ItemSlot.SHOULDER.getSlotIdMask(), ItemSubType.ALL_ARMOR, new int[] { 103, 106 }),
	PANTS(ItemSlot.PANTS.getSlotIdMask(), ItemSubType.ALL_ARMOR, new int[] { 103, 106 }),
	SHOES(ItemSlot.BOOTS.getSlotIdMask(), ItemSubType.ALL_ARMOR, new int[] { 103, 106 }),
	RB_TORSO(ItemSlot.TORSO.getSlotIdMask(), ItemSubType.ROBE, new int[] { 103, 106 }),
	RB_GLOVE(ItemSlot.GLOVES.getSlotIdMask(), ItemSubType.ROBE, new int[] { 103, 106 }),
	RB_SHOULDER(ItemSlot.SHOULDER.getSlotIdMask(), ItemSubType.ROBE, new int[] { 103, 106 }),
	RB_PANTS(ItemSlot.PANTS.getSlotIdMask(), ItemSubType.ROBE, new int[] { 103, 106 }),
	RB_SHOES(ItemSlot.BOOTS.getSlotIdMask(), ItemSubType.ROBE, new int[] { 103, 106 }),
	CL_TORSO(ItemSlot.TORSO.getSlotIdMask(), ItemSubType.CLOTHES, new int[] { 40 }),
	CL_GLOVE(ItemSlot.GLOVES.getSlotIdMask(), ItemSubType.CLOTHES, new int[] { 40 }),
	CL_SHOULDER(ItemSlot.SHOULDER.getSlotIdMask(), ItemSubType.CLOTHES, new int[] { 40 }),
	CL_PANTS(ItemSlot.PANTS.getSlotIdMask(), ItemSubType.CLOTHES, new int[] { 40 }),
	CL_SHOES(ItemSlot.BOOTS.getSlotIdMask(), ItemSubType.CLOTHES, new int[] { 40 }),
	LT_TORSO(ItemSlot.TORSO.getSlotIdMask(), ItemSubType.LEATHER, new int[] { 41, 48 }),
	LT_GLOVE(ItemSlot.GLOVES.getSlotIdMask(), ItemSubType.LEATHER, new int[] { 41, 48 }),
	LT_SHOULDER(ItemSlot.SHOULDER.getSlotIdMask(), ItemSubType.LEATHER, new int[] { 41, 48 }),
	LT_PANTS(ItemSlot.PANTS.getSlotIdMask(), ItemSubType.LEATHER, new int[] { 41, 48 }),
	LT_SHOES(ItemSlot.BOOTS.getSlotIdMask(), ItemSubType.LEATHER, new int[] { 41, 48 }),
	CH_TORSO(ItemSlot.TORSO.getSlotIdMask(), ItemSubType.CHAIN, new int[] { 42, 49 }),
	CH_GLOVE(ItemSlot.GLOVES.getSlotIdMask(), ItemSubType.CHAIN, new int[] { 42, 49 }),
	CH_SHOULDER(ItemSlot.SHOULDER.getSlotIdMask(), ItemSubType.CHAIN, new int[] { 42, 49 }),
	CH_PANTS(ItemSlot.PANTS.getSlotIdMask(), ItemSubType.CHAIN, new int[] { 42, 49 }),
	CH_SHOES(ItemSlot.BOOTS.getSlotIdMask(), ItemSubType.CHAIN, new int[] { 42, 49 }),
	PL_TORSO(ItemSlot.TORSO.getSlotIdMask(), ItemSubType.PLATE, new int[] { 54 }),
	PL_GLOVE(ItemSlot.GLOVES.getSlotIdMask(), ItemSubType.PLATE, new int[] { 54 }),
	PL_SHOULDER(ItemSlot.SHOULDER.getSlotIdMask(), ItemSubType.PLATE, new int[] { 54 }),
	PL_PANTS(ItemSlot.PANTS.getSlotIdMask(), ItemSubType.PLATE, new int[] { 54 }),
	PL_SHOES(ItemSlot.BOOTS.getSlotIdMask(), ItemSubType.PLATE, new int[] { 54 }),
	
	EARRING(ItemSlot.EARRINGS_LEFT.getSlotIdMask() | ItemSlot.EARRINGS_RIGHT.getSlotIdMask(), ArmorType.ACCESSORY),
	RING(ItemSlot.RING_LEFT.getSlotIdMask() | ItemSlot.RING_RIGHT.getSlotIdMask(), ArmorType.ACCESSORY),
	NECKLACE(ItemSlot.NECKLACE.getSlotIdMask(), ArmorType.ACCESSORY),
	BELT(ItemSlot.WAIST.getSlotIdMask(), ArmorType.ACCESSORY),
	WING(ItemSlot.WINGS.getSlotIdMask(), ItemSubType.WING),
	PLUME(ItemSlot.PLUME.getSlotIdMask(), ItemSubType.PLUME),

	HEAD(ItemSlot.HELMET.getSlotIdMask(), ArmorType.ACCESSORY),
	LT_HEADS(ItemSlot.HELMET.getSlotIdMask(), ItemSubType.LEATHER),
	CL_HEADS(ItemSlot.HELMET.getSlotIdMask(), ItemSubType.CLOTHES),
	CL_MULTISLOT(ItemSlot.TORSO.getSlotIdMask() | ItemSlot.PANTS.getSlotIdMask(), ItemSubType.CLOTHES),
	CL_SHIELD(ItemSlot.SUB_HAND.getSlotIdMask(), ArmorType.ACCESSORY),
	
	POWER_SHARDS(ItemSlot.POWER_SHARD_RIGHT.getSlotIdMask() | ItemSlot.POWER_SHARD_LEFT.getSlotIdMask(), ArmorType.ACCESSORY),
	STIGMA(ItemSlot.ALL_STIGMA.getSlotIdMask(), ItemSubType.STIGMA),
	// other
	ARROW(0, ItemSubType.ARROW),
	NPC_MACE(ItemSlot.MAIN_HAND.getSlotIdMask(), ItemSubType.ONE_HAND), // keep it above TOOLHOES, for search picking it up
	TOOLRODS(ItemSlot.MAIN_OR_SUB.getSlotIdMask(), ItemSubType.TWO_HAND),
	TOOLHOES(ItemSlot.MAIN_HAND.getSlotIdMask(), ItemSubType.ONE_HAND),
	TOOLPICKS(ItemSlot.MAIN_OR_SUB.getSlotIdMask(), ItemSubType.TWO_HAND),
	// non equip
	MANASTONE,
	SPECIAL_MANASTONE,
	RECIPE,
	ENCHANTMENT,
	PACK_SCROLL,
	FLUX,
	BALIC_EMOTION,
	BALIC_MATERIAL,
	RAWHIDE,
	SOULSTONE,
	GATHERABLE,
	GATHERABLE_BONUS,
	DROP_MATERIAL,
	COINS,
	MEDALS,
	QUEST,
	KEY,
	CRAFT_BOOST,
	TAMPERING,
	COMBINATION,
	SKILLBOOK,
	GODSTONE,
	STIGMA_SHARD;

	private final long validEquipmentSlots;
	private final ItemSubType itemSubType;
	private final ArmorType armorType;
	private final int[] requiredSkill;

	private ItemGroup() {
		this(0, ItemSubType.NONE, new int[] {});
	}

	private ItemGroup(long validEquipmentSlots, ArmorType armorType) {
		this(validEquipmentSlots, armorType, new int[] {});
	}

	private ItemGroup(long validEquipmentSlots, ItemSubType itemSubType) {
		this(validEquipmentSlots, itemSubType, new int[] {});
	}

	private ItemGroup(long validEquipmentSlots, ItemSubType itemSubType, int[] requiredSkill) {
		this.validEquipmentSlots = validEquipmentSlots;
		this.itemSubType = itemSubType;
		this.armorType = null;
		this.requiredSkill = requiredSkill;
	}

	private ItemGroup(long validEquipmentSlots, ArmorType armorType, int[] requiredSkill) {
		this.validEquipmentSlots = validEquipmentSlots;
		this.itemSubType = ItemSubType.NONE;
		this.armorType = armorType;
		this.requiredSkill = requiredSkill;
	}

	public long getValidEquipmentSlots() {
		return validEquipmentSlots;
	}

	public ItemSubType getItemSubType() {
		return itemSubType;
	}

	public ArmorType getArmorType() {
		return armorType;
	}

	public int[] getRequiredSkills() {
		return requiredSkill;
	}

	public EquipType getEquipType() {
		if (armorType != null)
			return EquipType.ARMOR;
		else
			return itemSubType.getEquipType();
	}

}

📎 첨부파일

댓글 작성 권한이 없습니다.
🏆 포인트 랭킹 TOP 10
순위 닉네임 포인트
1 no_profile 타키야겐지쪽지보내기 자기소개 아이디로 검색 전체게시물 102,949
2 no_profile 동가리쪽지보내기 자기소개 아이디로 검색 전체게시물 63,733
3 no_profile 라프텔쪽지보내기 자기소개 아이디로 검색 전체게시물 51,771
4 no_profile 불멸의행복쪽지보내기 자기소개 아이디로 검색 전체게시물 36,923
5 서번트쪽지보내기 자기소개 아이디로 검색 전체게시물 35,011
6 no_profile 닥터스쪽지보내기 자기소개 아이디로 검색 전체게시물 29,470
7 no_profile 검은고양이쪽지보내기 자기소개 아이디로 검색 전체게시물 29,097
8 no_profile Revolution쪽지보내기 자기소개 아이디로 검색 전체게시물 28,199
9 no_profile 보거스쪽지보내기 자기소개 아이디로 검색 전체게시물 26,731
10 no_profile 호롤롤로쪽지보내기 자기소개 아이디로 검색 전체게시물 17,020
알림 0