- Mesaj
- 1.188
- Çözümler
- 33
- Beğeni
- 874
- Puan
- 1.139
- Ticaret Puanı
- 0
Merhaba Arkadaşlar Toplu Envanter Sistemi(Yeni kostüm Envanterleri) şu sistemi ekledim ama slotlar karıştı sorunsuz çalışıyo ama yüzükleri taktığım zman aynı anda kuşak slotuna ve silah slotuna ekleniyo bende silah ve kuşak sistemi yok ondan kayklı olabilrmi
sadece 2 yüzük için yapıyo bunu her 2 penceredende kontrol edilebiliyo
sadece 2 yüzük için yapıyo bunu her 2 penceredende kontrol edilebiliyo
UserInterface/GameType.h:
#pragma once
#include "../GameLib/ItemData.h"
struct SAffects
{
enum
{
AFFECT_MAX_NUM = 32,
};
SAffects() : dwAffects(0) {}
SAffects(const DWORD & c_rAffects)
{
__SetAffects(c_rAffects);
}
int operator = (const DWORD & c_rAffects)
{
__SetAffects(c_rAffects);
}
BOOL IsAffect(BYTE byIndex)
{
return dwAffects & (1 << byIndex);
}
void __SetAffects(const DWORD & c_rAffects)
{
dwAffects = c_rAffects;
}
DWORD dwAffects;
};
extern std::string g_strGuildSymbolPathName;
const DWORD c_Name_Max_Length = 64;
const DWORD c_FileName_Max_Length = 128;
const DWORD c_Short_Name_Max_Length = 32;
const DWORD c_Inventory_Page_Size = 5*9; // x*y
const DWORD c_Inventory_Page_Count = 4;
const DWORD c_ItemSlot_Count = c_Inventory_Page_Size * c_Inventory_Page_Count;
const DWORD c_Equipment_Count = 12;
const DWORD c_Equipment_Start = c_ItemSlot_Count;
const DWORD c_Equipment_Body = c_Equipment_Start + 0;
const DWORD c_Equipment_Head = c_Equipment_Start + 1;
const DWORD c_Equipment_Shoes = c_Equipment_Start + 2;
const DWORD c_Equipment_Wrist = c_Equipment_Start + 3;
const DWORD c_Equipment_Weapon = c_Equipment_Start + 4;
const DWORD c_Equipment_Neck = c_Equipment_Start + 5;
const DWORD c_Equipment_Ear = c_Equipment_Start + 6;
const DWORD c_Equipment_Unique1 = c_Equipment_Start + 7;
const DWORD c_Equipment_Unique2 = c_Equipment_Start + 8;
const DWORD c_Equipment_Arrow = c_Equipment_Start + 9;
const DWORD c_Equipment_Shield = c_Equipment_Start + 10;
// 새로 추가된 신규 반지 & 벨트
// 장착형 아이템에 할당할 수 있는 위치가 기존 장비, 채기랍 퀘스트 보상, 코스튬 시스템 등으로 인해서 공간이 잘려있다.
// 이게 다 채기랍 보상 버프를 장착아이템처럼 구현한 ㅅㄲ 때문에 난리났따... ㅆㅂ
//
// 정리하면, 기존 장비창들은 서버DB상 아이템 포지션이 90 ~ 102 이고,
// 2013년 초에 새로 추가되는 슬롯들은 111 ~ 부터 시작한다. 착용 장비에서 최대로 사용할 수 있는 값은 121 까지이고, 122부터는 용혼석에서 사용한다.
#ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
const DWORD c_New_Equipment_Start = c_Equipment_Start + 21
#ifdef RING_SYSTEM
+ 8
#endif
;
const DWORD c_New_Equipment_Count = 3;
const DWORD c_Equipment_Ring1 = c_New_Equipment_Start + 0;
const DWORD c_Equipment_Ring2 = c_New_Equipment_Start + 1;
const DWORD c_Equipment_Belt = c_New_Equipment_Start + 2;;
#endif
enum EDragonSoulDeckType
{
DS_DECK_1,
DS_DECK_2,
DS_DECK_MAX_NUM = 2,
};
enum EDragonSoulGradeTypes
{
DRAGON_SOUL_GRADE_NORMAL,
DRAGON_SOUL_GRADE_BRILLIANT,
DRAGON_SOUL_GRADE_RARE,
DRAGON_SOUL_GRADE_ANCIENT,
DRAGON_SOUL_GRADE_LEGENDARY,
DRAGON_SOUL_GRADE_MAX,
};
enum EDragonSoulStepTypes
{
DRAGON_SOUL_STEP_LOWEST,
DRAGON_SOUL_STEP_LOW,
DRAGON_SOUL_STEP_MID,
DRAGON_SOUL_STEP_HIGH,
DRAGON_SOUL_STEP_HIGHEST,
DRAGON_SOUL_STEP_MAX,
};
#ifdef ENABLE_COSTUME_SYSTEM
const DWORD c_Costume_Slot_Start = c_Equipment_Start + 19;
const DWORD c_Costume_Slot_Body = c_Costume_Slot_Start + 0;
const DWORD c_Costume_Slot_Hair = c_Costume_Slot_Start + 1;
#ifdef RING_SYSTEM
const DWORD c_Costume_Slot_Sebnem_Hilal = c_Costume_Slot_Start + CItemData::COSTUME_RING_HILAL;
const DWORD c_Costume_Slot_Sebnem_Lolipop = c_Costume_Slot_Start + CItemData::COSTUME_RING_LOLIPOP;
const DWORD c_Costume_Slot_Sebnem_Mutluluk = c_Costume_Slot_Start + CItemData::COSTUME_RING_MUTLULUK;
const DWORD c_Costume_Slot_Sebnem_Olumcul = c_Costume_Slot_Start + CItemData::COSTUME_RING_OLUMCUL;
const DWORD c_Costume_Slot_Sebnem_Kahramanlik = c_Costume_Slot_Start + CItemData::COSTUME_RING_KAHRAMANLIK;
const DWORD c_Costume_Slot_Sebnem_Cikolata = c_Costume_Slot_Start + CItemData::COSTUME_RING_CIKOLATA;
const DWORD c_Costume_Slot_Sebnem_Nazar = c_Costume_Slot_Start + CItemData::COSTUME_RING_NAZAR;
const DWORD c_Costume_Slot_Sebnem_Bekciler = c_Costume_Slot_Start + CItemData::COSTUME_RING_BEKCILER;
#endif
const DWORD c_Costume_Slot_Count = 2
#ifdef RING_SYSTEM
+ 8
#endif
;
const DWORD c_Costume_Slot_End = c_Costume_Slot_Start + c_Costume_Slot_Count;
#endif
// [주의] 숫자(32) 하드코딩 주의. 현재 서버에서 용혼석 슬롯은 32부터임.
// 서버 common/length.h 파일의 EWearPositions 열거형이 32까지 확장될 것을 염두하고(32 이상은 확장 하기 힘들게 되어있음.),
// 그 이후부터를 용혼석 장착 슬롯으로 사용.
const DWORD c_Wear_Max = 64;
const DWORD c_DragonSoul_Equip_Start = c_ItemSlot_Count + c_Wear_Max;
const DWORD c_DragonSoul_Equip_Slot_Max = 6;
const DWORD c_DragonSoul_Equip_End = c_DragonSoul_Equip_Start + c_DragonSoul_Equip_Slot_Max * DS_DECK_MAX_NUM;
// NOTE: 2013년 2월 5일 현재... 용혼석 데크는 2개가 존재하는데, 향후 확장 가능성이 있어서 3개 데크 여유분을 할당 해 둠. 그 뒤 공간은 벨트 인벤토리로 사용
const DWORD c_DragonSoul_Equip_Reserved_Count = c_DragonSoul_Equip_Slot_Max * 3;
#ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
// 벨트 아이템이 제공하는 인벤토리
const DWORD c_Belt_Inventory_Slot_Start = c_DragonSoul_Equip_End + c_DragonSoul_Equip_Reserved_Count;
const DWORD c_Belt_Inventory_Width = 4;
const DWORD c_Belt_Inventory_Height= 4;
const DWORD c_Belt_Inventory_Slot_Count = c_Belt_Inventory_Width * c_Belt_Inventory_Height;
const DWORD c_Belt_Inventory_Slot_End = c_Belt_Inventory_Slot_Start + c_Belt_Inventory_Slot_Count;
#endif
#ifdef WJ_SPLIT_INVENTORY_SYSTEM
const DWORD c_Skill_Book_Inventory_Slot_Start = c_Belt_Inventory_Slot_End;
const DWORD c_Skill_Book_Inventory_Slot_Count = 135;
const DWORD c_Skill_Book_Inventory_Slot_End = c_Skill_Book_Inventory_Slot_Start + c_Skill_Book_Inventory_Slot_Count;
const DWORD c_Upgrade_Items_Inventory_Slot_Start = c_Skill_Book_Inventory_Slot_End;
const DWORD c_Upgrade_Items_Inventory_Slot_Count = 135;
const DWORD c_Upgrade_Items_Inventory_Slot_End = c_Upgrade_Items_Inventory_Slot_Start + c_Upgrade_Items_Inventory_Slot_Count;
const DWORD c_Stone_Inventory_Slot_Start = c_Upgrade_Items_Inventory_Slot_End;
const DWORD c_Stone_Inventory_Slot_Count = 135;
const DWORD c_Stone_Inventory_Slot_End = c_Stone_Inventory_Slot_Start + c_Stone_Inventory_Slot_Count;
const DWORD c_Box_Inventory_Slot_Start = c_Stone_Inventory_Slot_End;
const DWORD c_Box_Inventory_Slot_Count = 135;
const DWORD c_Box_Inventory_Slot_End = c_Box_Inventory_Slot_Start + c_Box_Inventory_Slot_Count;
const DWORD c_Efsun_Inventory_Slot_Start = c_Box_Inventory_Slot_End;
const DWORD c_Efsun_Inventory_Slot_Count = 135;
const DWORD c_Efsun_Inventory_Slot_End = c_Efsun_Inventory_Slot_Start + c_Efsun_Inventory_Slot_Count;
const DWORD c_Cicek_Inventory_Slot_Start = c_Efsun_Inventory_Slot_End;
const DWORD c_Cicek_Inventory_Slot_Count = 135;
const DWORD c_Cicek_Inventory_Slot_End = c_Cicek_Inventory_Slot_Start + c_Cicek_Inventory_Slot_Count;
const DWORD c_Inventory_Count = c_Cicek_Inventory_Slot_End;
#endif
// 용혼석 전용 인벤토리
const DWORD c_DragonSoul_Inventory_Start = 0;
const DWORD c_DragonSoul_Inventory_Box_Size = 32;
const DWORD c_DragonSoul_Inventory_Count = CItemData::DS_SLOT_NUM_TYPES * DRAGON_SOUL_GRADE_MAX * c_DragonSoul_Inventory_Box_Size;
const DWORD c_DragonSoul_Inventory_End = c_DragonSoul_Inventory_Start + c_DragonSoul_Inventory_Count;
enum ESlotType
{
SLOT_TYPE_NONE,
SLOT_TYPE_INVENTORY,
SLOT_TYPE_SKILL,
SLOT_TYPE_EMOTION,
SLOT_TYPE_SHOP,
SLOT_TYPE_EXCHANGE_OWNER,
SLOT_TYPE_EXCHANGE_TARGET,
SLOT_TYPE_QUICK_SLOT,
SLOT_TYPE_SAFEBOX,
SLOT_TYPE_PRIVATE_SHOP,
SLOT_TYPE_MALL,
SLOT_TYPE_DRAGON_SOUL_INVENTORY,
#ifdef WJ_SPLIT_INVENTORY_SYSTEM
SLOT_TYPE_SKILL_BOOK_INVENTORY,
SLOT_TYPE_UPGRADE_ITEMS_INVENTORY,
SLOT_TYPE_STONE_INVENTORY,
SLOT_TYPE_BOX_INVENTORY,
SLOT_TYPE_EFSUN_INVENTORY,
SLOT_TYPE_CICEK_INVENTORY,
#endif
SLOT_TYPE_MAX,
};
enum EWindows
{
RESERVED_WINDOW,
INVENTORY, // 기본 인벤토리. (45칸 짜리가 2페이지 존재 = 90칸)
EQUIPMENT,
SAFEBOX,
MALL,
DRAGON_SOUL_INVENTORY,
GROUND, // NOTE: 2013년 2월5일 현재까지 unused.. 왜 있는거지???
BELT_INVENTORY, // NOTE: W2.1 버전에 새로 추가되는 벨트 슬롯 아이템이 제공하는 벨트 인벤토리
#ifdef WJ_SPLIT_INVENTORY_SYSTEM
SKILL_BOOK_INVENTORY,
UPGRADE_ITEMS_INVENTORY,
STONE_INVENTORY,
BOX_INVENTORY,
EFSUN_INVENTORY,
CICEK_INVENTORY,
#endif
WINDOW_TYPE_MAX,
};
enum EDSInventoryMaxNum
{
DS_INVENTORY_MAX_NUM = c_DragonSoul_Inventory_Count,
DS_REFINE_WINDOW_MAX_NUM = 15,
};
#pragma pack (push, 1)
#define WORD_MAX 0xffff
typedef struct SItemPos
{
BYTE window_type;
WORD cell;
SItemPos ()
{
window_type = INVENTORY;
cell = WORD_MAX;
}
SItemPos (BYTE _window_type, WORD _cell)
{
window_type = _window_type;
cell = _cell;
}
// 기존에 cell의 형을 보면 BYTE가 대부분이지만, oi
// 어떤 부분은 int, 어떤 부분은 WORD로 되어있어,
// 가장 큰 자료형인 int로 받는다.
// int operator=(const int _cell)
// {
//window_type = INVENTORY;
// cell = _cell;
// return cell;
// }
bool IsValidCell()
{
switch (window_type)
{
case INVENTORY:
return cell < c_Inventory_Count;
break;
case EQUIPMENT:
return cell < c_DragonSoul_Equip_End;
break;
case DRAGON_SOUL_INVENTORY:
return cell < (DS_INVENTORY_MAX_NUM);
break;
default:
return false;
}
}
bool IsEquipCell()
{
switch (window_type)
{
case INVENTORY:
case EQUIPMENT:
return (c_Equipment_Start + c_Wear_Max > cell) && (c_Equipment_Start <= cell);
break;
case BELT_INVENTORY:
case DRAGON_SOUL_INVENTORY:
return false;
break;
default:
return false;
}
}
#ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
bool IsBeltInventoryCell()
{
bool bResult = c_Belt_Inventory_Slot_Start <= cell && c_Belt_Inventory_Slot_End > cell;
return bResult;
}
#endif
#ifdef WJ_SPLIT_INVENTORY_SYSTEM
bool IsSkillBookInventoryCell()
{
bool bResult = c_Skill_Book_Inventory_Slot_Start <= cell && c_Skill_Book_Inventory_Slot_End > cell;
return bResult;
}
bool IsUpgradeItemsInventoryCell()
{
bool bResult = c_Upgrade_Items_Inventory_Slot_Start <= cell && c_Upgrade_Items_Inventory_Slot_End > cell;
return bResult;
}
bool IsStoneInventoryCell()
{
bool bResult = c_Stone_Inventory_Slot_Start <= cell && c_Stone_Inventory_Slot_End > cell;
return bResult;
}
bool IsBoxInventoryCell()
{
bool bResult = c_Box_Inventory_Slot_Start <= cell && c_Box_Inventory_Slot_End > cell;
return bResult;
}
bool IsEfsunInventoryCell()
{
bool bResult = c_Efsun_Inventory_Slot_Start <= cell && c_Efsun_Inventory_Slot_End > cell;
return bResult;
}
bool IsCicekInventoryCell()
{
bool bResult = c_Cicek_Inventory_Slot_Start <= cell && c_Cicek_Inventory_Slot_End > cell;
return bResult;
}
#endif
bool operator==(const struct SItemPos& rhs) const
{
return (window_type == rhs.window_type) && (cell == rhs.cell);
}
bool operator<(const struct SItemPos& rhs) const
{
return (window_type < rhs.window_type) || ((window_type == rhs.window_type) && (cell < rhs.cell));
}
} TItemPos;
#pragma pack(pop)
const DWORD c_QuickBar_Line_Count = 3;
const DWORD c_QuickBar_Slot_Count = 12;
const float c_Idle_WaitTime = 5.0f;
const int c_Monster_Race_Start_Number = 6;
const int c_Monster_Model_Start_Number = 20001;
const float c_fAttack_Delay_Time = 0.2f;
const float c_fHit_Delay_Time = 0.1f;
const float c_fCrash_Wave_Time = 0.2f;
const float c_fCrash_Wave_Distance = 3.0f;
const float c_fHeight_Step_Distance = 50.0f;
enum
{
DISTANCE_TYPE_FOUR_WAY,
DISTANCE_TYPE_EIGHT_WAY,
DISTANCE_TYPE_ONE_WAY,
DISTANCE_TYPE_MAX_NUM,
};
const float c_fMagic_Script_Version = 1.0f;
const float c_fSkill_Script_Version = 1.0f;
const float c_fMagicSoundInformation_Version = 1.0f;
const float c_fBattleCommand_Script_Version = 1.0f;
const float c_fEmotionCommand_Script_Version = 1.0f;
const float c_fActive_Script_Version = 1.0f;
const float c_fPassive_Script_Version = 1.0f;
// Used by PushMove
const float c_fWalkDistance = 175.0f;
const float c_fRunDistance = 310.0f;
#define FILE_MAX_LEN 128
enum
{
ITEM_SOCKET_SLOT_MAX_NUM = 3,
ITEM_ATTRIBUTE_SLOT_MAX_NUM = 7,
};
#pragma pack(push)
#pragma pack(1)
typedef struct SQuickSlot
{
BYTE Type;
BYTE Position;
} TQuickSlot;
typedef struct TPlayerItemAttribute
{
BYTE bType;
short sValue;
} TPlayerItemAttribute;
typedef struct packet_item
{
DWORD vnum;
BYTE count;
DWORD flags;
DWORD anti_flags;
long alSockets[ITEM_SOCKET_SLOT_MAX_NUM];
TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
} TItemData;
typedef struct packet_shop_item
{
DWORD vnum;
long long price;
BYTE count;
BYTE display_pos;
long alSockets[ITEM_SOCKET_SLOT_MAX_NUM];
TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
} TShopItemData;
#pragma pack(pop)
inline float GetSqrtDistance(int ix1, int iy1, int ix2, int iy2) // By sqrt
{
float dx, dy;
dx = float(ix1 - ix2);
dy = float(iy1 - iy2);
return sqrtf(dx*dx + dy*dy);
}
// DEFAULT_FONT
void DefaultFont_Startup();
void DefaultFont_Cleanup();
void DefaultFont_SetName(const char * c_szFontName);
CResource* DefaultFont_GetResource();
CResource* DefaultItalicFont_GetResource();
// END_OF_DEFAULT_FONT
void SetGuildSymbolPath(const char * c_szPathName);
const char * GetGuildSymbolFileName(DWORD dwGuildID);
BYTE SlotTypeToInvenType(BYTE bSlotType);
common/length.h:
#ifndef __INC_METIN_II_LENGTH_H__
#define __INC_METIN_II_LENGTH_H__
#define WORD_MAX 0xffff
enum EMisc
{
MAX_HOST_LENGTH = 15,
IP_ADDRESS_LENGTH = 15,
LOGIN_MAX_LEN = 30,
PASSWD_MAX_LEN = 16,
PLAYER_PER_ACCOUNT = 4,
ACCOUNT_STATUS_MAX_LEN = 8,
CHARACTER_NAME_MAX_LEN = 24,
SHOP_SIGN_MAX_LEN = 32,
INVENTORY_MAX_NUM = 180,
INVENTORY_PAGE_COUNT = INVENTORY_MAX_NUM / 45,
INVENTORY_PAGE_SLOT_COUNT = INVENTORY_MAX_NUM / INVENTORY_PAGE_COUNT,
ABILITY_MAX_NUM = 50,
EMPIRE_MAX_NUM = 4,
BANWORD_MAX_LEN = 24,
SOCIAL_ID_MAX_LEN = 18,
GUILD_NAME_MAX_LEN = 12,
SHOP_HOST_ITEM_MAX_NUM = 40, /* 호스트의 최대 아이템 개수 */
SHOP_GUEST_ITEM_MAX_NUM = 18, /* 게스트의 최대 아이템 개수 */
SHOP_PRICELIST_MAX_NUM = 40, ///< 개인상점 가격정보 리스트에서 유지할 가격정보의 최대 갯수
CHAT_MAX_LEN = 512,
QUICKSLOT_MAX_NUM = 36,
JOURNAL_MAX_NUM = 2,
QUERY_MAX_LEN = 8192,
FILE_MAX_LEN = 128,
PLAYER_EXP_TABLE_MAX = 120,
PLAYER_MAX_LEVEL_CONST = 120,
GUILD_MAX_LEVEL = 20,
MOB_MAX_LEVEL = 100,
ATTRIBUTE_MAX_VALUE = 20,
CHARACTER_PATH_MAX_NUM = 64,
SKILL_MAX_NUM = 255,
SKILLBOOK_DELAY_MIN = 64800,
SKILLBOOK_DELAY_MAX = 108000,
SKILL_MAX_LEVEL = 40,
APPLY_NAME_MAX_LEN = 32,
EVENT_FLAG_NAME_MAX_LEN = 32,
MOB_SKILL_MAX_NUM = 5,
POINT_MAX_NUM = 255,
DRAGON_SOUL_BOX_SIZE = 32,
DRAGON_SOUL_BOX_COLUMN_NUM = 8,
DRAGON_SOUL_BOX_ROW_NUM = DRAGON_SOUL_BOX_SIZE / DRAGON_SOUL_BOX_COLUMN_NUM,
DRAGON_SOUL_REFINE_GRID_SIZE = 15,
MAX_AMOUNT_OF_MALL_BONUS = 20,
WEAR_MAX_NUM = 64,
//LIMIT_GOLD
GOLD_MAX = 1000000000000001LL,
//END_LIMIT_GOLD
SHOP_TAB_NAME_MAX = 32,
SHOP_TAB_COUNT_MAX = 3,
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
SKILL_BOOK_INVENTORY_MAX_NUM = 135,
UPGRADE_ITEMS_INVENTORY_MAX_NUM = 135,
STONE_INVENTORY_MAX_NUM = 135,
BOX_INVENTORY_MAX_NUM = 135,
EFSUN_INVENTORY_MAX_NUM = 135,
CICEK_INVENTORY_MAX_NUM = 135,
#endif
BELT_INVENTORY_SLOT_WIDTH = 4,
BELT_INVENTORY_SLOT_HEIGHT= 4,
BELT_INVENTORY_SLOT_COUNT = BELT_INVENTORY_SLOT_WIDTH * BELT_INVENTORY_SLOT_HEIGHT,
/**
**** 현재까지 할당 된 아이템 영역 정리 (DB상 Item Position) ****
+------------------------------------------------------+ 0
| 캐릭터 기본 인벤토리 (45칸 * 2페이지) 90칸 |
+------------------------------------------------------+ 90 = INVENTORY_MAX_NUM(90)
| 캐릭터 장비 창 (착용중인 아이템) 32칸 |
+------------------------------------------------------+ 122 = INVENTORY_MAX_NUM(90) + WEAR_MAX_NUM(32)
| 용혼석 장비 창 (착용중인 용혼석) 12칸 |
+------------------------------------------------------+ 134 = 122 + DS_SLOT_MAX(6) * DRAGON_SOUL_DECK_MAX_NUM(2)
| 용혼석 장비 창 예약 (아직 미사용) 18칸 |
+------------------------------------------------------+ 152 = 134 + DS_SLOT_MAX(6) * DRAGON_SOUL_DECK_RESERVED_MAX_NUM(3)
| 벨트 인벤토리 (벨트 착용시에만 벨트 레벨에 따라 활성)|
+------------------------------------------------------+ 168 = 152 + BELT_INVENTORY_SLOT_COUNT(16) = INVENTORY_AND_EQUIP_CELL_MAX
| 미사용 |
+------------------------------------------------------+ ??
*/
};
enum EWearPositions
{
WEAR_BODY, // 0
WEAR_HEAD, // 1
WEAR_FOOTS, // 2
WEAR_WRIST, // 3
WEAR_WEAPON, // 4
WEAR_NECK, // 5
WEAR_EAR, // 6
WEAR_UNIQUE1, // 7
WEAR_UNIQUE2, // 8
WEAR_ARROW, // 9
WEAR_SHIELD, // 10
WEAR_ABILITY1, // 11
WEAR_ABILITY2, // 12
WEAR_ABILITY3, // 13
WEAR_ABILITY4, // 14
WEAR_ABILITY5, // 15
WEAR_ABILITY6, // 16
WEAR_ABILITY7, // 17
WEAR_ABILITY8, // 18
WEAR_COSTUME_BODY, // 19
WEAR_COSTUME_HAIR, // 20
#ifdef RING_SYSTEM
WEAR_COSTUME_RING_HILAL,
WEAR_COSTUME_RING_LOLIPOP,
WEAR_COSTUME_RING_MUTLULUK,
WEAR_COSTUME_RING_OLUMCUL,
WEAR_COSTUME_RING_KAHRAMANLIK,
WEAR_COSTUME_RING_CIKOLATA,
WEAR_COSTUME_RING_NAZAR,
WEAR_COSTUME_RING_BEKCILER,
#endif
WEAR_RING1, // 21 :Yeni halka yuvası 1 (sol)
WEAR_RING2, // 22 : Yeni halka yuvası 2 (sa?)
WEAR_BELT, // 23 : Yeni kemer yuvası
WEAR_MAX = 64 //
};
enum EDragonSoulDeckType
{
DRAGON_SOUL_DECK_0,
DRAGON_SOUL_DECK_1,
DRAGON_SOUL_DECK_MAX_NUM = 2,
DRAGON_SOUL_DECK_RESERVED_MAX_NUM = 3, // NOTE: 중요! 아직 사용중이진 않지만, 3페이지 분량을 예약 해 둠. DS DECK을 늘릴 경우 반드시 그 수만큼 RESERVED에서 차감해야 함!
};
enum ESex
{
SEX_MALE,
SEX_FEMALE
};
enum EDirection
{
DIR_NORTH,
DIR_NORTHEAST,
DIR_EAST,
DIR_SOUTHEAST,
DIR_SOUTH,
DIR_SOUTHWEST,
DIR_WEST,
DIR_NORTHWEST,
DIR_MAX_NUM
};
#define ABILITY_MAX_LEVEL 10 /* 기술 최대 레벨 */
enum EAbilityDifficulty
{
DIFFICULTY_EASY,
DIFFICULTY_NORMAL,
DIFFICULTY_HARD,
DIFFICULTY_VERY_HARD,
DIFFICULTY_NUM_TYPES
};
enum EAbilityCategory
{
CATEGORY_PHYSICAL, /* 신체적 어빌리티 */
CATEGORY_MENTAL, /* 정신적 어빌리티 */
CATEGORY_ATTRIBUTE, /* 능력 어빌리티 */
CATEGORY_NUM_TYPES
};
enum EJobs
{
JOB_WARRIOR,
JOB_ASSASSIN,
JOB_SURA,
JOB_SHAMAN,
JOB_MAX_NUM
};
enum ESkillGroups
{
SKILL_GROUP_MAX_NUM = 2,
};
enum ERaceFlags
{
RACE_FLAG_ANIMAL = (1 << 0),
RACE_FLAG_UNDEAD = (1 << 1),
RACE_FLAG_DEVIL = (1 << 2),
RACE_FLAG_HUMAN = (1 << 3),
RACE_FLAG_ORC = (1 << 4),
RACE_FLAG_MILGYO = (1 << 5),
RACE_FLAG_INSECT = (1 << 6),
RACE_FLAG_FIRE = (1 << 7),
RACE_FLAG_ICE = (1 << 8),
RACE_FLAG_DESERT = (1 << 9),
RACE_FLAG_TREE = (1 << 10),
RACE_FLAG_ATT_ELEC = (1 << 11),
RACE_FLAG_ATT_FIRE = (1 << 12),
RACE_FLAG_ATT_ICE = (1 << 13),
RACE_FLAG_ATT_WIND = (1 << 14),
RACE_FLAG_ATT_EARTH = (1 << 15),
RACE_FLAG_ATT_DARK = (1 << 16),
};
enum ELoads
{
LOAD_NONE,
LOAD_LIGHT,
LOAD_NORMAL,
LOAD_HEAVY,
LOAD_MASSIVE
};
enum
{
QUICKSLOT_TYPE_NONE,
QUICKSLOT_TYPE_ITEM,
QUICKSLOT_TYPE_SKILL,
QUICKSLOT_TYPE_COMMAND,
QUICKSLOT_TYPE_MAX_NUM,
};
enum EParts
{
PART_MAIN,
PART_WEAPON,
PART_HEAD,
PART_HAIR,
PART_MAX_NUM,
PART_WEAPON_SUB,
};
enum EChatType
{
CHAT_TYPE_TALKING, /* 그냥 채팅 */
CHAT_TYPE_INFO, /* 정보 (아이템을 집었다, 경험치를 얻었다. 등) */
CHAT_TYPE_NOTICE, /* 공지사항 */
CHAT_TYPE_PARTY, /* 파티말 */
CHAT_TYPE_GUILD, /* 길드말 */
CHAT_TYPE_COMMAND, /* 일반 명령 */
CHAT_TYPE_SHOUT, /* 외치기 */
CHAT_TYPE_WHISPER,
CHAT_TYPE_BIG_NOTICE,
CHAT_TYPE_MAX_NUM
};
enum EWhisperType
{
WHISPER_TYPE_NORMAL = 0,
WHISPER_TYPE_NOT_EXIST = 1,
WHISPER_TYPE_TARGET_BLOCKED = 2,
WHISPER_TYPE_SENDER_BLOCKED = 3,
WHISPER_TYPE_ERROR = 4,
WHISPER_TYPE_GM = 5,
WHISPER_TYPE_SYSTEM = 0xFF
};
enum ECharacterPosition
{
POSITION_GENERAL,
POSITION_BATTLE,
POSITION_DYING,
POSITION_SITTING_CHAIR,
POSITION_SITTING_GROUND,
POSITION_INTRO,
POSITION_MAX_NUM
};
enum EGMLevels
{
GM_PLAYER,
GM_LOW_WIZARD,
GM_WIZARD,
GM_HIGH_WIZARD,
GM_GOD,
GM_IMPLEMENTOR
};
enum EMobRank
{
MOB_RANK_PAWN,
MOB_RANK_S_PAWN,
MOB_RANK_KNIGHT,
MOB_RANK_S_KNIGHT,
MOB_RANK_BOSS,
MOB_RANK_KING,
MOB_RANK_MAX_NUM
};
enum ECharType
{
CHAR_TYPE_MONSTER,
CHAR_TYPE_NPC,
CHAR_TYPE_STONE,
CHAR_TYPE_WARP,
CHAR_TYPE_DOOR,
CHAR_TYPE_BUILDING,
CHAR_TYPE_PC,
CHAR_TYPE_POLYMORPH_PC,
CHAR_TYPE_HORSE,
CHAR_TYPE_GOTO
};
enum EBattleType
{
BATTLE_TYPE_MELEE,
BATTLE_TYPE_RANGE,
BATTLE_TYPE_MAGIC,
BATTLE_TYPE_SPECIAL,
BATTLE_TYPE_POWER,
BATTLE_TYPE_TANKER,
BATTLE_TYPE_SUPER_POWER,
BATTLE_TYPE_SUPER_TANKER,
BATTLE_TYPE_MAX_NUM
};
enum EApplyTypes
{
APPLY_NONE, // 0
APPLY_MAX_HP, // 1
APPLY_MAX_SP, // 2
APPLY_CON, // 3
APPLY_INT, // 4
APPLY_STR, // 5
APPLY_DEX, // 6
APPLY_ATT_SPEED, // 7
APPLY_MOV_SPEED, // 8
APPLY_CAST_SPEED, // 9
APPLY_HP_REGEN, // 10
APPLY_SP_REGEN, // 11
APPLY_POISON_PCT, // 12
APPLY_STUN_PCT, // 13
APPLY_SLOW_PCT, // 14
APPLY_CRITICAL_PCT, // 15
APPLY_PENETRATE_PCT, // 16
APPLY_ATTBONUS_HUMAN, // 17
APPLY_ATTBONUS_ANIMAL, // 18
APPLY_ATTBONUS_ORC, // 19
APPLY_ATTBONUS_MILGYO, // 20
APPLY_ATTBONUS_UNDEAD, // 21
APPLY_ATTBONUS_DEVIL, // 22
APPLY_STEAL_HP, // 23
APPLY_STEAL_SP, // 24
APPLY_MANA_BURN_PCT, // 25
APPLY_DAMAGE_SP_RECOVER, // 26
APPLY_BLOCK, // 27
APPLY_DODGE, // 28
APPLY_RESIST_SWORD, // 29
APPLY_RESIST_TWOHAND, // 30
APPLY_RESIST_DAGGER, // 31
APPLY_RESIST_BELL, // 32
APPLY_RESIST_FAN, // 33
APPLY_RESIST_BOW, // 34
APPLY_RESIST_FIRE, // 35
APPLY_RESIST_ELEC, // 36
APPLY_RESIST_MAGIC, // 37
APPLY_RESIST_WIND, // 38
APPLY_REFLECT_MELEE, // 39
APPLY_REFLECT_CURSE, // 40
APPLY_POISON_REDUCE, // 41
APPLY_KILL_SP_RECOVER, // 42
APPLY_EXP_DOUBLE_BONUS, // 43
APPLY_GOLD_DOUBLE_BONUS, // 44
APPLY_ITEM_DROP_BONUS, // 45
APPLY_POTION_BONUS, // 46
APPLY_KILL_HP_RECOVER, // 47
APPLY_IMMUNE_STUN, // 48
APPLY_IMMUNE_SLOW, // 49
APPLY_IMMUNE_FALL, // 50
APPLY_SKILL, // 51
APPLY_BOW_DISTANCE, // 52
APPLY_ATT_GRADE_BONUS, // 53
APPLY_DEF_GRADE_BONUS, // 54
APPLY_MAGIC_ATT_GRADE, // 55
APPLY_MAGIC_DEF_GRADE, // 56
APPLY_CURSE_PCT, // 57
APPLY_MAX_STAMINA, // 58
APPLY_ATTBONUS_WARRIOR, // 59
APPLY_ATTBONUS_ASSASSIN, // 60
APPLY_ATTBONUS_SURA, // 61
APPLY_ATTBONUS_SHAMAN, // 62
APPLY_ATTBONUS_MONSTER, // 63
APPLY_MALL_ATTBONUS, // 64 공격력 +x%
APPLY_MALL_DEFBONUS, // 65 방어력 +x%
APPLY_MALL_EXPBONUS, // 66 경험치 +x%
APPLY_MALL_ITEMBONUS, // 67 아이템 드롭율 x/10배
APPLY_MALL_GOLDBONUS, // 68 돈 드롭율 x/10배
APPLY_MAX_HP_PCT, // 69 최대 생명력 +x%
APPLY_MAX_SP_PCT, // 70 최대 정신력 +x%
APPLY_SKILL_DAMAGE_BONUS, // 71 스킬 데미지 * (100+x)%
APPLY_NORMAL_HIT_DAMAGE_BONUS, // 72 평타 데미지 * (100+x)%
APPLY_SKILL_DEFEND_BONUS, // 73 스킬 데미지 방어 * (100-x)%
APPLY_NORMAL_HIT_DEFEND_BONUS, // 74 평타 데미지 방어 * (100-x)%
APPLY_PC_BANG_EXP_BONUS, // 75 PC방 아이템 EXP 보너스
APPLY_PC_BANG_DROP_BONUS, // 76 PC방 아이템 드롭율 보너스
APPLY_EXTRACT_HP_PCT, // 77 사용시 HP 소모
APPLY_RESIST_WARRIOR, // 78 무사에게 저항
APPLY_RESIST_ASSASSIN, // 79 자객에게 저항
APPLY_RESIST_SURA, // 80 수라에게 저항
APPLY_RESIST_SHAMAN, // 81 무당에게 저항
APPLY_ENERGY, // 82 기력
APPLY_DEF_GRADE, // 83 방어력. DEF_GRADE_BONUS는 클라에서 두배로 보여지는 의도된 버그(...)가 있다.
APPLY_COSTUME_ATTR_BONUS, // 84 코스튬 아이템에 붙은 속성치 보너스
APPLY_MAGIC_ATTBONUS_PER, // 85 마법 공격력 +x%
APPLY_MELEE_MAGIC_ATTBONUS_PER, // 86 마법 + 밀리 공격력 +x%
APPLY_RESIST_ICE, // 87 냉기 저항
APPLY_RESIST_EARTH, // 88 대지 저항
APPLY_RESIST_DARK, // 89 어둠 저항
APPLY_ANTI_CRITICAL_PCT, //90 크리티컬 저항
APPLY_ANTI_PENETRATE_PCT, //91 관통타격 저항
#ifdef METIN_BOSS_BONUSES
APPLY_ATTBONUS_METIN,
APPLY_ATTBONUS_BOSS,
#endif
MAX_APPLY_NUM, //
};
enum EOnClickEvents
{
ON_CLICK_NONE,
ON_CLICK_SHOP,
ON_CLICK_TALK,
ON_CLICK_MAX_NUM
};
enum EOnIdleEvents
{
ON_IDLE_NONE,
ON_IDLE_GENERAL,
ON_IDLE_MAX_NUM
};
enum EWindows
{
RESERVED_WINDOW,
INVENTORY,
EQUIPMENT,
SAFEBOX,
MALL,
DRAGON_SOUL_INVENTORY,
BELT_INVENTORY,
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
SKILL_BOOK_INVENTORY,
UPGRADE_ITEMS_INVENTORY,
STONE_INVENTORY,
BOX_INVENTORY,
EFSUN_INVENTORY,
CICEK_INVENTORY,
#endif
GROUND
};
enum EMobSizes
{
MOBSIZE_RESERVED,
MOBSIZE_SMALL,
MOBSIZE_MEDIUM,
MOBSIZE_BIG
};
enum EAIFlags
{
AIFLAG_AGGRESSIVE = (1 << 0),
AIFLAG_NOMOVE = (1 << 1),
AIFLAG_COWARD = (1 << 2),
AIFLAG_NOATTACKSHINSU = (1 << 3),
AIFLAG_NOATTACKJINNO = (1 << 4),
AIFLAG_NOATTACKCHUNJO = (1 << 5),
AIFLAG_ATTACKMOB = (1 << 6 ),
AIFLAG_BERSERK = (1 << 7),
AIFLAG_STONESKIN = (1 << 8),
AIFLAG_GODSPEED = (1 << 9),
AIFLAG_DEATHBLOW = (1 << 10),
AIFLAG_REVIVE = (1 << 11),
};
enum EMobStatType
{
MOB_STATTYPE_POWER,
MOB_STATTYPE_TANKER,
MOB_STATTYPE_SUPER_POWER,
MOB_STATTYPE_SUPER_TANKER,
MOB_STATTYPE_RANGE,
MOB_STATTYPE_MAGIC,
MOB_STATTYPE_MAX_NUM
};
enum EImmuneFlags
{
IMMUNE_STUN = (1 << 0),
IMMUNE_SLOW = (1 << 1),
IMMUNE_FALL = (1 << 2),
IMMUNE_CURSE = (1 << 3),
IMMUNE_POISON = (1 << 4),
IMMUNE_TERROR = (1 << 5),
IMMUNE_REFLECT = (1 << 6),
};
enum EMobEnchants
{
MOB_ENCHANT_CURSE,
MOB_ENCHANT_SLOW,
MOB_ENCHANT_POISON,
MOB_ENCHANT_STUN,
MOB_ENCHANT_CRITICAL,
MOB_ENCHANT_PENETRATE,
MOB_ENCHANTS_MAX_NUM
};
enum EMobResists
{
MOB_RESIST_SWORD,
MOB_RESIST_TWOHAND,
MOB_RESIST_DAGGER,
MOB_RESIST_BELL,
MOB_RESIST_FAN,
MOB_RESIST_BOW,
MOB_RESIST_FIRE,
MOB_RESIST_ELECT,
MOB_RESIST_MAGIC,
MOB_RESIST_WIND,
MOB_RESIST_POISON,
MOB_RESISTS_MAX_NUM
};
enum
{
SKILL_ATTR_TYPE_NORMAL = 1,
SKILL_ATTR_TYPE_MELEE,
SKILL_ATTR_TYPE_RANGE,
SKILL_ATTR_TYPE_MAGIC
/*
SKILL_ATTR_TYPE_FIRE,
SKILL_ATTR_TYPE_ICE,
SKILL_ATTR_TYPE_ELEC,
SKILL_ATTR_TYPE_DARK,
*/
};
enum
{
SKILL_NORMAL,
SKILL_MASTER,
SKILL_GRAND_MASTER,
SKILL_PERFECT_MASTER,
};
enum EGuildWarType
{
GUILD_WAR_TYPE_FIELD,
GUILD_WAR_TYPE_BATTLE,
GUILD_WAR_TYPE_FLAG,
GUILD_WAR_TYPE_MAX_NUM
};
enum EGuildWarState
{
GUILD_WAR_NONE,
GUILD_WAR_SEND_DECLARE,
GUILD_WAR_REFUSE,
GUILD_WAR_RECV_DECLARE,
GUILD_WAR_WAIT_START,
GUILD_WAR_CANCEL,
GUILD_WAR_ON_WAR,
GUILD_WAR_END,
GUILD_WAR_OVER,
GUILD_WAR_RESERVE,
GUILD_WAR_DURATION = 30*60, // 1시간
GUILD_WAR_WIN_POINT = 1000,
GUILD_WAR_LADDER_HALF_PENALTY_TIME = 12*60*60,
};
enum EAttributeSet
{
ATTRIBUTE_SET_WEAPON,
ATTRIBUTE_SET_BODY,
ATTRIBUTE_SET_WRIST,
ATTRIBUTE_SET_FOOTS,
ATTRIBUTE_SET_NECK,
ATTRIBUTE_SET_HEAD,
ATTRIBUTE_SET_SHIELD,
ATTRIBUTE_SET_EAR,
ATTRIBUTE_SET_MAX_NUM
};
enum EPrivType
{
PRIV_NONE,
PRIV_ITEM_DROP,
PRIV_GOLD_DROP,
PRIV_GOLD10_DROP,
PRIV_EXP_PCT,
MAX_PRIV_NUM,
};
enum EMoneyLogType
{
MONEY_LOG_RESERVED,
MONEY_LOG_MONSTER,
MONEY_LOG_SHOP,
MONEY_LOG_REFINE,
MONEY_LOG_QUEST,
MONEY_LOG_GUILD,
MONEY_LOG_MISC,
MONEY_LOG_MONSTER_KILL,
MONEY_LOG_DROP,
MONEY_LOG_TYPE_MAX_NUM,
};
enum EPremiumTypes
{
PREMIUM_EXP, // 경험치가 1.2배
PREMIUM_ITEM, // 아이템 드롭율이 2배
PREMIUM_SAFEBOX, // 창고가 1칸에서 3칸
PREMIUM_AUTOLOOT, // 돈 자동 줍기
PREMIUM_FISH_MIND, // 고급 물고기 낚일 확률 상승
PREMIUM_MARRIAGE_FAST, // 금실 증가 양을 빠르게합니다.
PREMIUM_GOLD, // 돈 드롭율이 1.5배
PREMIUM_MAX_NUM = 9
};
enum SPECIAL_EFFECT
{
SE_NONE,
SE_HPUP_RED,
SE_SPUP_BLUE,
SE_SPEEDUP_GREEN,
SE_DXUP_PURPLE,
SE_CRITICAL,
SE_PENETRATE,
SE_BLOCK,
SE_DODGE,
SE_CHINA_FIREWORK,
SE_SPIN_TOP,
SE_SUCCESS,
SE_FAIL,
SE_FR_SUCCESS,
SE_LEVELUP_ON_14_FOR_GERMANY,
SE_LEVELUP_UNDER_15_FOR_GERMANY,
SE_PERCENT_DAMAGE1,
SE_PERCENT_DAMAGE2,
SE_PERCENT_DAMAGE3,
SE_AUTO_HPUP,
SE_AUTO_SPUP,
SE_EQUIP_RAMADAN_RING, // 라마단 초승달의 반지(71135) 착용할 때 이펙트 (발동이펙트임, 지속이펙트 아님)
SE_EQUIP_HALLOWEEN_CANDY, // 할로윈 사탕을 착용(-_-;)한 순간에 발동하는 이펙트
SE_EQUIP_HAPPINESS_RING, // 크리스마스 행복의 반지(71143) 착용할 때 이펙트 (발동이펙트임, 지속이펙트 아님)
SE_EQUIP_LOVE_PENDANT, // 발렌타인 사랑의 팬던트(71145) 착용할 때 이펙트 (발동이펙트임, 지속이펙트 아님)
} ;
#include "item_length.h"
// inventory의 position을 나타내는 구조체
// int와의 암시적 형변환이 있는 이유는,
// 인벤 관련된 모든 함수가 window_type은 받지 않고, cell 하나만 받았기 때문에,(기존에는 인벤이 하나 뿐이어서 inventory type이란게 필요없었기 때문에,)
// 인벤 관련 모든 함수 호출부분을 수정하는 것이 난감하기 문이다.
enum EDragonSoulRefineWindowSize
{
DRAGON_SOUL_REFINE_GRID_MAX = 15,
};
enum EMisc2
{
DRAGON_SOUL_EQUIP_SLOT_START = INVENTORY_MAX_NUM + WEAR_MAX_NUM,
DRAGON_SOUL_EQUIP_SLOT_END = DRAGON_SOUL_EQUIP_SLOT_START + (DS_SLOT_MAX * DRAGON_SOUL_DECK_MAX_NUM),
DRAGON_SOUL_EQUIP_RESERVED_SLOT_END = DRAGON_SOUL_EQUIP_SLOT_END + (DS_SLOT_MAX * DRAGON_SOUL_DECK_RESERVED_MAX_NUM),
BELT_INVENTORY_SLOT_START = DRAGON_SOUL_EQUIP_RESERVED_SLOT_END,
BELT_INVENTORY_SLOT_END = BELT_INVENTORY_SLOT_START + BELT_INVENTORY_SLOT_COUNT,
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
SKILL_BOOK_INVENTORY_SLOT_START = BELT_INVENTORY_SLOT_END,
SKILL_BOOK_INVENTORY_SLOT_END = SKILL_BOOK_INVENTORY_SLOT_START + SKILL_BOOK_INVENTORY_MAX_NUM,
UPGRADE_ITEMS_INVENTORY_SLOT_START = SKILL_BOOK_INVENTORY_SLOT_END,
UPGRADE_ITEMS_INVENTORY_SLOT_END = UPGRADE_ITEMS_INVENTORY_SLOT_START + UPGRADE_ITEMS_INVENTORY_MAX_NUM,
STONE_INVENTORY_SLOT_START = UPGRADE_ITEMS_INVENTORY_SLOT_END,
STONE_INVENTORY_SLOT_END = STONE_INVENTORY_SLOT_START + STONE_INVENTORY_MAX_NUM,
BOX_INVENTORY_SLOT_START = STONE_INVENTORY_SLOT_END,
BOX_INVENTORY_SLOT_END = BOX_INVENTORY_SLOT_START + BOX_INVENTORY_MAX_NUM,
EFSUN_INVENTORY_SLOT_START = BOX_INVENTORY_SLOT_END,
EFSUN_INVENTORY_SLOT_END = EFSUN_INVENTORY_SLOT_START + EFSUN_INVENTORY_MAX_NUM,
CICEK_INVENTORY_SLOT_START = EFSUN_INVENTORY_SLOT_END,
CICEK_INVENTORY_SLOT_END = CICEK_INVENTORY_SLOT_START + CICEK_INVENTORY_MAX_NUM,
#endif
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
INVENTORY_AND_EQUIP_SLOT_MAX = CICEK_INVENTORY_SLOT_END,
#else
INVENTORY_AND_EQUIP_SLOT_MAX = BELT_INVENTORY_SLOT_END,
#endif
};
#pragma pack(push, 1)
typedef struct SItemPos
{
BYTE window_type;
WORD cell;
SItemPos ()
{
window_type = INVENTORY;
cell = WORD_MAX;
}
SItemPos (BYTE _window_type, WORD _cell)
{
window_type = _window_type;
cell = _cell;
}
bool IsValidItemPosition() const
{
switch (window_type)
{
case RESERVED_WINDOW:
return false;
case INVENTORY:
case EQUIPMENT:
case BELT_INVENTORY:
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
case SKILL_BOOK_INVENTORY:
case UPGRADE_ITEMS_INVENTORY:
case STONE_INVENTORY:
case BOX_INVENTORY:
case EFSUN_INVENTORY:
case CICEK_INVENTORY:
#endif
return cell < INVENTORY_AND_EQUIP_SLOT_MAX;
case DRAGON_SOUL_INVENTORY:
return cell < (DRAGON_SOUL_INVENTORY_MAX_NUM);
// 동적으로 크기가 정해지는 window는 valid 체크를 할 수가 없다.
case SAFEBOX:
case MALL:
return false;
default:
return false;
}
return false;
}
bool IsEquipPosition() const
{
return ((INVENTORY == window_type || EQUIPMENT == window_type) && cell >= INVENTORY_MAX_NUM && cell < INVENTORY_MAX_NUM + WEAR_MAX_NUM)
|| IsDragonSoulEquipPosition();
}
bool IsDragonSoulEquipPosition() const
{
return (DRAGON_SOUL_EQUIP_SLOT_START <= cell) && (DRAGON_SOUL_EQUIP_SLOT_END > cell);
}
bool IsBeltInventoryPosition() const
{
return (BELT_INVENTORY_SLOT_START <= cell) && (BELT_INVENTORY_SLOT_END > cell);
}
bool IsDefaultInventoryPosition() const
{
return INVENTORY == window_type && cell < INVENTORY_MAX_NUM;
}
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
bool IsSkillBookInventoryPosition() const
{
return ((INVENTORY == window_type) && cell >= SKILL_BOOK_INVENTORY_SLOT_START && cell < SKILL_BOOK_INVENTORY_SLOT_END);
}
bool IsUpgradeItemsInventoryPosition() const
{
return ((INVENTORY == window_type) && cell >= UPGRADE_ITEMS_INVENTORY_SLOT_START && cell < UPGRADE_ITEMS_INVENTORY_SLOT_END);
}
bool IsStoneInventoryPosition() const
{
return ((INVENTORY == window_type) && cell >= STONE_INVENTORY_SLOT_START && cell < STONE_INVENTORY_SLOT_END);
}
bool IsBoxInventoryPosition() const
{
return ((INVENTORY == window_type) && cell >= BOX_INVENTORY_SLOT_START && cell < BOX_INVENTORY_SLOT_END);
}
bool IsEfsunInventoryPosition() const
{
return ((INVENTORY == window_type) && cell >= EFSUN_INVENTORY_SLOT_START && cell < EFSUN_INVENTORY_SLOT_END);
}
bool IsCicekInventoryPosition() const
{
return ((INVENTORY == window_type) && cell >= CICEK_INVENTORY_SLOT_START && cell < CICEK_INVENTORY_SLOT_END);
}
#endif
bool operator==(const struct SItemPos& rhs) const
{
return (window_type == rhs.window_type) && (cell == rhs.cell);
}
bool operator<(const struct SItemPos& rhs) const
{
return (window_type < rhs.window_type) || ((window_type == rhs.window_type) && (cell < rhs.cell));
}
} TItemPos;
const TItemPos NPOS (RESERVED_WINDOW, WORD_MAX);
typedef enum
{
SHOP_COIN_TYPE_GOLD, // DEFAULT VALUE
SHOP_COIN_TYPE_SECONDARY_COIN,
} EShopCoinType;
#pragma pack(pop)
#endif