mmo.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818
  1. // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
  2. // For more information, see LICENCE in the main folder
  3. #ifndef _MMO_H_
  4. #define _MMO_H_
  5. #include "cbasetypes.h"
  6. #include "../common/db.h"
  7. #include <time.h>
  8. // server->client protocol version
  9. // 0 - pre-?
  10. // 1 - ? - 0x196
  11. // 2 - ? - 0x78, 0x79
  12. // 3 - ? - 0x1c8, 0x1c9, 0x1de
  13. // 4 - ? - 0x1d7, 0x1d8, 0x1d9, 0x1da
  14. // 5 - 2003-12-18aSakexe+ - 0x1ee, 0x1ef, 0x1f0, ?0x1c4, 0x1c5?
  15. // 6 - 2004-03-02aSakexe+ - 0x1f4, 0x1f5
  16. // 7 - 2005-04-11aSakexe+ - 0x229, 0x22a, 0x22b, 0x22c
  17. // see conf/battle/client.conf for other version
  18. #ifndef PACKETVER
  19. #define PACKETVER 20130807
  20. //#define PACKETVER 20120410
  21. #endif
  22. ///Remove/Comment this line to disable sc_data saving. [Skotlex]
  23. #define ENABLE_SC_SAVING
  24. /** Remove/Comment this line to disable server-side hot-key saving support [Skotlex]
  25. * Note that newer clients no longer save hotkeys in the registry! */
  26. #define HOTKEY_SAVING
  27. #if PACKETVER < 20090603
  28. // (27 = 9 skills x 3 bars) (0x02b9,191)
  29. #define MAX_HOTKEYS 27
  30. #elif PACKETVER < 20090617
  31. // (36 = 9 skills x 4 bars) (0x07d9,254)
  32. #define MAX_HOTKEYS 36
  33. #else
  34. // (38 = 9 skills x 4 bars & 2 Quickslots)(0x07d9,268)
  35. #define MAX_HOTKEYS 38
  36. #endif
  37. #define MAX_MAP_PER_SERVER 1500 /// Increased to allow creation of Instance Maps
  38. #define MAX_INVENTORY 100 ///Maximum items in player inventory
  39. /** Max number of characters per account. Note that changing this setting alone is not enough if the client is not hexed to support more characters as well.
  40. * Max value tested was 265 */
  41. #define MAX_CHARS 9
  42. /** Number of slots carded equipment can have. Never set to less than 4 as they are also used to keep the data of forged items/equipment. [Skotlex]
  43. * Note: The client seems unable to receive data for more than 4 slots due to all related packets having a fixed size. */
  44. #define MAX_SLOTS 4
  45. #define MAX_AMOUNT 30000 ////Max amount of a single stacked item
  46. #define MAX_ZENY 1000000000 ///Max zeny
  47. #define MAX_BANK_ZENY SINT32_MAX ///Max zeny in Bank
  48. #define MAX_FAME 1000000000 ///Max fame points
  49. #define MAX_CART 100 ///Maximum item in cart
  50. #define MAX_SKILL 5020 ///Maximum skill data
  51. #define GLOBAL_REG_NUM 256 ///Max permanent character variables per char
  52. #define ACCOUNT_REG_NUM 64 ///Max permanent local account variables per account
  53. #define ACCOUNT_REG2_NUM 16 ///Max permanent global account variables per account
  54. #define MAX_REG_NUM 256 ///Should hold the max of GLOBAL/ACCOUNT/ACCOUNT2 (needed for some arrays that hold all three)
  55. #define DEFAULT_WALK_SPEED 150 ///Default walk speed
  56. #define MIN_WALK_SPEED 20 ///Min walk speed
  57. #define MAX_WALK_SPEED 1000 ///Max walk speed
  58. #define MAX_STORAGE 600 ///Max number of storage slots a player can have, (up to ~850 tested)
  59. #define MAX_GUILD_STORAGE 600 ///Max number of storage slots a guild
  60. #define MAX_PARTY 12 ///Max party member
  61. #define MAX_GUILD 16+10*6 ///Increased max guild members +6 per 1 extension levels [Lupus]
  62. #define MAX_GUILDPOSITION 20 ///Increased max guild positions to accomodate for all members [Valaris] (removed) [PoW]
  63. #define MAX_GUILDEXPULSION 32 ///Max Guild expulsion
  64. #define MAX_GUILDALLIANCE 16 ///Max Guild alliance
  65. #define MAX_GUILDSKILL 15 ///Increased max guild skills because of new skills [Sara-chan]
  66. #define MAX_GUILDLEVEL 50 ///Max Guild level
  67. #define MAX_GUARDIANS 8 ///Local max per castle. If this value is increased, need to add more fields on MySQL `guild_castle` table [Skotlex]
  68. #define MAX_QUEST_OBJECTIVES 3 ///Max quest objectives for a quest
  69. #define MAX_PC_BONUS_SCRIPT 20 ///Max bonus script
  70. // for produce
  71. #define MIN_ATTRIBUTE 0
  72. #define MAX_ATTRIBUTE 4
  73. #define ATTRIBUTE_NORMAL 0
  74. #define MIN_STAR 0
  75. #define MAX_STAR 3
  76. #define MAX_STATUS_TYPE 5
  77. #define WEDDING_RING_M 2634
  78. #define WEDDING_RING_F 2635
  79. //For character names, title names, guilds, maps, etc.
  80. //Includes null-terminator as it is the length of the array.
  81. #define NAME_LENGTH (23 + 1)
  82. #define PASSWD_LENGTH (32+1)
  83. //For item names, which tend to have much longer names.
  84. #define ITEM_NAME_LENGTH 50
  85. //For Map Names, which the client considers to be 16 in length including the .gat extension
  86. #define MAP_NAME_LENGTH (11 + 1)
  87. #define MAP_NAME_LENGTH_EXT (MAP_NAME_LENGTH + 4)
  88. //Pincode Length
  89. #define PINCODE_LENGTH 4
  90. #define MAX_FRIENDS 40
  91. #define MAX_MEMOPOINTS 3
  92. #define MAX_SKILLCOOLDOWN 20
  93. //Size of the fame list arrays.
  94. #define MAX_FAME_LIST 10
  95. //Limits to avoid ID collision with other game objects
  96. #define START_ACCOUNT_NUM 2000000
  97. #define END_ACCOUNT_NUM 100000000
  98. #define START_CHAR_NUM 150000
  99. //Guilds
  100. #define MAX_GUILDMES1 60
  101. #define MAX_GUILDMES2 120
  102. //Base Homun skill.
  103. #define HM_SKILLBASE 8001
  104. #define MAX_HOMUNSKILL 43
  105. #define MAX_HOMUNCULUS_CLASS 52 //[orn], Increased to 60 from 16 to allow new Homun-S.
  106. #define HM_CLASS_BASE 6001
  107. #define HM_CLASS_MAX (HM_CLASS_BASE+MAX_HOMUNCULUS_CLASS-1)
  108. //Mail System
  109. #define MAIL_MAX_INBOX 30
  110. #define MAIL_TITLE_LENGTH 40
  111. #define MAIL_BODY_LENGTH 200
  112. //Mercenary System
  113. #define MC_SKILLBASE 8201
  114. #define MAX_MERCSKILL 40
  115. #define MAX_MERCENARY_CLASS 61
  116. //Elemental System
  117. #define MAX_ELEMENTALSKILL 42
  118. #define EL_SKILLBASE 8401
  119. #define MAX_ELESKILLTREE 3
  120. #define MAX_ELEMENTAL_CLASS 12
  121. #define EL_CLASS_BASE 2114
  122. #define EL_CLASS_MAX (EL_CLASS_BASE+MAX_ELEMENTAL_CLASS-1)
  123. enum item_types {
  124. IT_HEALING = 0,
  125. IT_UNKNOWN, //1
  126. IT_USABLE, //2
  127. IT_ETC, //3
  128. IT_ARMOR, //4
  129. IT_WEAPON, //5
  130. IT_CARD, //6
  131. IT_PETEGG, //7
  132. IT_PETARMOR,//8
  133. IT_UNKNOWN2,//9
  134. IT_AMMO, //10
  135. IT_DELAYCONSUME,//11
  136. IT_SHADOWGEAR, //12
  137. IT_CASH = 18,
  138. IT_MAX
  139. };
  140. // Questlog states
  141. enum quest_state {
  142. Q_INACTIVE, ///< Inactive quest (the user can toggle between active and inactive quests)
  143. Q_ACTIVE, ///< Active quest
  144. Q_COMPLETE, ///< Completed quest
  145. };
  146. /// Questlog entry
  147. struct quest {
  148. int quest_id; ///< Quest ID
  149. unsigned int time; ///< Expiration time
  150. int count[MAX_QUEST_OBJECTIVES]; ///< Kill counters of each quest objective
  151. enum quest_state state; ///< Current quest state
  152. };
  153. struct item {
  154. int id;
  155. unsigned short nameid;
  156. short amount;
  157. unsigned int equip; // location(s) where item is equipped (using enum equip_pos for bitmasking)
  158. char identify;
  159. char refine;
  160. char attribute;
  161. unsigned short card[MAX_SLOTS];
  162. unsigned int expire_time;
  163. char favorite, bound;
  164. uint64 unique_id;
  165. };
  166. //Equip position constants
  167. enum equip_pos {
  168. EQP_HEAD_LOW = 0x000001,
  169. EQP_HEAD_MID = 0x000200, // 512
  170. EQP_HEAD_TOP = 0x000100, // 256
  171. EQP_HAND_R = 0x000002, // 2
  172. EQP_HAND_L = 0x000020, // 32
  173. EQP_ARMOR = 0x000010, // 16
  174. EQP_SHOES = 0x000040, // 64
  175. EQP_GARMENT = 0x000004, // 4
  176. EQP_ACC_L = 0x000008, // 8
  177. EQP_ACC_R = 0x000080, // 128
  178. EQP_COSTUME_HEAD_TOP = 0x000400, // 1024
  179. EQP_COSTUME_HEAD_MID = 0x000800, // 2048
  180. EQP_COSTUME_HEAD_LOW = 0x001000, // 4096
  181. EQP_COSTUME_GARMENT = 0x002000, // 8192
  182. //EQP_COSTUME_FLOOR = 0x004000, // 16384
  183. EQP_AMMO = 0x008000, // 32768
  184. EQP_SHADOW_ARMOR = 0x010000, // 65536
  185. EQP_SHADOW_WEAPON = 0x020000, // 131072
  186. EQP_SHADOW_SHIELD = 0x040000, // 262144
  187. EQP_SHADOW_SHOES = 0x080000, // 524288
  188. EQP_SHADOW_ACC_R = 0x100000, // 1048576
  189. EQP_SHADOW_ACC_L = 0x200000, // 2097152
  190. };
  191. struct point {
  192. unsigned short map;
  193. short x,y;
  194. };
  195. enum e_skill_flag
  196. {
  197. SKILL_FLAG_PERMANENT,
  198. SKILL_FLAG_TEMPORARY,
  199. SKILL_FLAG_PLAGIARIZED,
  200. SKILL_FLAG_REPLACED_LV_0, // temporary skill overshadowing permanent skill of level 'N - SKILL_FLAG_REPLACED_LV_0',
  201. SKILL_FLAG_PERM_GRANTED, // permanent, granted through someway e.g. script
  202. SKILL_FLAG_TMP_COMBO, //@FIXME for homon combo atm
  203. //...
  204. };
  205. enum e_mmo_charstatus_opt {
  206. OPT_NONE = 0x0,
  207. OPT_SHOW_EQUIP = 0x1,
  208. OPT_ALLOW_PARTY = 0x2,
  209. };
  210. struct s_skill {
  211. unsigned short id;
  212. unsigned char lv;
  213. unsigned char flag; // see enum e_skill_flag
  214. };
  215. struct global_reg {
  216. char str[32];
  217. char value[256];
  218. };
  219. //Holds array of global registries, used by the char server and converter.
  220. struct accreg {
  221. uint32 account_id, char_id;
  222. int reg_num;
  223. struct global_reg reg[MAX_REG_NUM];
  224. };
  225. //For saving status changes across sessions. [Skotlex]
  226. struct status_change_data {
  227. unsigned short type; //SC_type
  228. long val1, val2, val3, val4, tick; //Remaining duration.
  229. };
  230. #define MAX_BONUS_SCRIPT_LENGTH 1024
  231. struct bonus_script_data {
  232. char script[MAX_BONUS_SCRIPT_LENGTH];
  233. long tick;
  234. char type;
  235. short flag, icon;
  236. };
  237. struct skill_cooldown_data {
  238. unsigned short skill_id;
  239. long tick;
  240. };
  241. struct storage_data {
  242. int storage_amount;
  243. struct item items[MAX_STORAGE];
  244. };
  245. /// Guild storgae struct
  246. struct guild_storage {
  247. bool dirty; ///< Dirty status, need to be saved
  248. int guild_id; ///< Guild ID
  249. short storage_amount; ///< Amount of item on storage
  250. struct item items[MAX_GUILD_STORAGE]; ///< Item entries
  251. bool locked; ///< If locked, can't use storage when item bound retrieval
  252. uint32 opened; ///< Holds the char_id that open the storage
  253. };
  254. struct s_pet {
  255. uint32 account_id;
  256. uint32 char_id;
  257. int pet_id;
  258. short class_;
  259. short level;
  260. short egg_id;//pet egg id
  261. short equip;//pet equip name_id
  262. short intimate;//pet friendly
  263. short hungry;//pet hungry
  264. char name[NAME_LENGTH];
  265. char rename_flag;
  266. char incubate;
  267. };
  268. struct s_homunculus { //[orn]
  269. char name[NAME_LENGTH];
  270. int hom_id;
  271. uint32 char_id;
  272. short class_;
  273. short prev_class;
  274. int hp,max_hp,sp,max_sp;
  275. unsigned int intimacy; //[orn]
  276. short hunger;
  277. struct s_skill hskill[MAX_HOMUNSKILL]; //albator
  278. short skillpts;
  279. short level;
  280. unsigned int exp;
  281. short rename_flag;
  282. short vaporize; //albator
  283. int str ;
  284. int agi ;
  285. int vit ;
  286. int int_ ;
  287. int dex ;
  288. int luk ;
  289. char spiritball; //for homun S [lighta]
  290. };
  291. struct s_mercenary {
  292. int mercenary_id;
  293. uint32 char_id;
  294. short class_;
  295. int hp, sp;
  296. unsigned int kill_count;
  297. unsigned int life_time;
  298. };
  299. struct s_elemental {
  300. int elemental_id;
  301. uint32 char_id;
  302. short class_;
  303. int mode;
  304. int hp, sp, max_hp, max_sp, matk, atk, atk2;
  305. short hit, flee, amotion, def, mdef;
  306. int life_time;
  307. };
  308. struct s_friend {
  309. uint32 account_id;
  310. uint32 char_id;
  311. char name[NAME_LENGTH];
  312. };
  313. #ifdef HOTKEY_SAVING
  314. struct hotkey {
  315. unsigned int id;
  316. unsigned short lv;
  317. unsigned char type; // 0: item, 1: skill
  318. };
  319. #endif
  320. struct mmo_charstatus {
  321. uint32 char_id;
  322. uint32 account_id;
  323. uint32 partner_id;
  324. int father;
  325. int mother;
  326. int child;
  327. unsigned int base_exp,job_exp;
  328. int zeny;
  329. int bank_vault;
  330. short class_;
  331. unsigned int status_point,skill_point;
  332. int hp,max_hp,sp,max_sp;
  333. unsigned int option;
  334. short manner; // Defines how many minutes a char will be muted, each negative point is equivalent to a minute.
  335. unsigned char karma;
  336. short hair,hair_color,clothes_color;
  337. int party_id,guild_id,pet_id,hom_id,mer_id,ele_id;
  338. int fame;
  339. // Mercenary Guilds Rank
  340. int arch_faith, arch_calls;
  341. int spear_faith, spear_calls;
  342. int sword_faith, sword_calls;
  343. short weapon; // enum weapon_type
  344. short shield; // view-id
  345. short head_top,head_mid,head_bottom;
  346. short robe;
  347. char name[NAME_LENGTH];
  348. unsigned int base_level,job_level;
  349. short str,agi,vit,int_,dex,luk;
  350. unsigned char slot,sex;
  351. uint32 mapip;
  352. uint16 mapport;
  353. struct point last_point,save_point,memo_point[MAX_MEMOPOINTS];
  354. struct item inventory[MAX_INVENTORY],cart[MAX_CART];
  355. struct storage_data storage;
  356. struct s_skill skill[MAX_SKILL];
  357. struct s_friend friends[MAX_FRIENDS]; //New friend system [Skotlex]
  358. #ifdef HOTKEY_SAVING
  359. struct hotkey hotkeys[MAX_HOTKEYS];
  360. #endif
  361. bool show_equip,allow_party;
  362. short rename;
  363. time_t delete_date;
  364. time_t unban_time;
  365. // Char server addon system
  366. unsigned int character_moves;
  367. unsigned char font;
  368. bool cashshop_sent; // Whether the player has received the CashShop list
  369. uint32 uniqueitem_counter;
  370. };
  371. typedef enum mail_status {
  372. MAIL_NEW,
  373. MAIL_UNREAD,
  374. MAIL_READ,
  375. } mail_status;
  376. struct mail_message {
  377. int id;
  378. int send_id;
  379. char send_name[NAME_LENGTH];
  380. int dest_id;
  381. char dest_name[NAME_LENGTH];
  382. char title[MAIL_TITLE_LENGTH];
  383. char body[MAIL_BODY_LENGTH];
  384. mail_status status;
  385. time_t timestamp; // marks when the message was sent
  386. int zeny;
  387. struct item item;
  388. };
  389. struct mail_data {
  390. short amount;
  391. bool full;
  392. short unchecked, unread;
  393. struct mail_message msg[MAIL_MAX_INBOX];
  394. };
  395. struct auction_data {
  396. unsigned int auction_id;
  397. int seller_id;
  398. char seller_name[NAME_LENGTH];
  399. int buyer_id;
  400. char buyer_name[NAME_LENGTH];
  401. struct item item;
  402. // This data is required for searching, as itemdb is not read by char server
  403. char item_name[ITEM_NAME_LENGTH];
  404. short type;
  405. unsigned short hours;
  406. int price, buynow;
  407. time_t timestamp; // auction's end time
  408. int auction_end_timer;
  409. };
  410. struct registry {
  411. int global_num;
  412. struct global_reg global[GLOBAL_REG_NUM];
  413. int account_num;
  414. struct global_reg account[ACCOUNT_REG_NUM];
  415. int account2_num;
  416. struct global_reg account2[ACCOUNT_REG2_NUM];
  417. };
  418. struct party_member {
  419. uint32 account_id;
  420. uint32 char_id;
  421. char name[NAME_LENGTH];
  422. unsigned short class_;
  423. unsigned short map;
  424. unsigned short lv;
  425. unsigned leader : 1,
  426. online : 1;
  427. };
  428. struct party {
  429. int party_id;
  430. char name[NAME_LENGTH];
  431. unsigned char count; //Count of online characters.
  432. unsigned exp : 1,
  433. item : 2; //&1: Party-Share (round-robin), &2: pickup style: shared.
  434. struct party_member member[MAX_PARTY];
  435. };
  436. struct map_session_data;
  437. struct guild_member {
  438. uint32 account_id, char_id;
  439. short hair,hair_color,gender,class_,lv;
  440. uint64 exp;
  441. int exp_payper;
  442. short online,position;
  443. char name[NAME_LENGTH];
  444. struct map_session_data *sd;
  445. unsigned char modified;
  446. };
  447. struct guild_position {
  448. char name[NAME_LENGTH];
  449. int mode;
  450. int exp_mode;
  451. unsigned char modified;
  452. };
  453. struct guild_alliance {
  454. int opposition;
  455. int guild_id;
  456. char name[NAME_LENGTH];
  457. };
  458. struct guild_expulsion {
  459. char name[NAME_LENGTH];
  460. char mes[40];
  461. uint32 account_id;
  462. };
  463. struct guild_skill {
  464. int id,lv;
  465. };
  466. struct Channel;
  467. struct guild {
  468. int guild_id;
  469. short guild_lv, connect_member, max_member, average_lv;
  470. uint64 exp;
  471. unsigned int next_exp;
  472. int skill_point;
  473. char name[NAME_LENGTH],master[NAME_LENGTH];
  474. struct guild_member member[MAX_GUILD];
  475. struct guild_position position[MAX_GUILDPOSITION];
  476. char mes1[MAX_GUILDMES1],mes2[MAX_GUILDMES2];
  477. int emblem_len,emblem_id;
  478. char emblem_data[2048];
  479. struct guild_alliance alliance[MAX_GUILDALLIANCE];
  480. struct guild_expulsion expulsion[MAX_GUILDEXPULSION];
  481. struct guild_skill skill[MAX_GUILDSKILL];
  482. struct Channel *channel;
  483. /* Used by char-server to save events for guilds */
  484. unsigned short save_flag;
  485. };
  486. struct guild_castle {
  487. int castle_id;
  488. int mapindex;
  489. char castle_name[NAME_LENGTH];
  490. char castle_event[NAME_LENGTH];
  491. int guild_id;
  492. int economy;
  493. int defense;
  494. int triggerE;
  495. int triggerD;
  496. int nextTime;
  497. int payTime;
  498. int createTime;
  499. int visibleC;
  500. struct {
  501. unsigned visible : 1;
  502. int id; // object id
  503. } guardian[MAX_GUARDIANS];
  504. int* temp_guardians; // ids of temporary guardians (mobs)
  505. int temp_guardians_max;
  506. };
  507. struct fame_list {
  508. int id;
  509. int fame;
  510. char name[NAME_LENGTH];
  511. };
  512. enum e_guild_info { //Change Guild Infos
  513. GBI_EXP =1, // Guild Experience (EXP)
  514. GBI_GUILDLV, // Guild level
  515. GBI_SKILLPOINT, // Guild skillpoints
  516. GBI_SKILLLV, // Guild skill_lv ?? seem unused
  517. };
  518. enum e_guild_member_info { //Change Member Infos
  519. GMI_POSITION =0,
  520. GMI_EXP,
  521. GMI_HAIR,
  522. GMI_HAIR_COLOR,
  523. GMI_GENDER,
  524. GMI_CLASS,
  525. GMI_LEVEL,
  526. };
  527. enum e_guild_skill {
  528. GD_SKILLBASE=10000,
  529. GD_APPROVAL=10000,
  530. GD_KAFRACONTRACT=10001,
  531. GD_GUARDRESEARCH=10002,
  532. GD_GUARDUP=10003,
  533. GD_EXTENSION=10004,
  534. GD_GLORYGUILD=10005,
  535. GD_LEADERSHIP=10006,
  536. GD_GLORYWOUNDS=10007,
  537. GD_SOULCOLD=10008,
  538. GD_HAWKEYES=10009,
  539. GD_BATTLEORDER=10010,
  540. GD_REGENERATION=10011,
  541. GD_RESTORE=10012,
  542. GD_EMERGENCYCALL=10013,
  543. GD_DEVELOPMENT=10014,
  544. GD_ITEMEMERGENCYCALL=10015,
  545. GD_MAX,
  546. };
  547. //These mark the ID of the jobs, as expected by the client. [Skotlex]
  548. enum e_job {
  549. JOB_NOVICE,
  550. JOB_SWORDMAN,
  551. JOB_MAGE,
  552. JOB_ARCHER,
  553. JOB_ACOLYTE,
  554. JOB_MERCHANT,
  555. JOB_THIEF,
  556. JOB_KNIGHT,
  557. JOB_PRIEST,
  558. JOB_WIZARD,
  559. JOB_BLACKSMITH,
  560. JOB_HUNTER,
  561. JOB_ASSASSIN,
  562. JOB_KNIGHT2,
  563. JOB_CRUSADER,
  564. JOB_MONK,
  565. JOB_SAGE,
  566. JOB_ROGUE,
  567. JOB_ALCHEMIST,
  568. JOB_BARD,
  569. JOB_DANCER,
  570. JOB_CRUSADER2,
  571. JOB_WEDDING,
  572. JOB_SUPER_NOVICE,
  573. JOB_GUNSLINGER,
  574. JOB_NINJA,
  575. JOB_XMAS,
  576. JOB_SUMMER,
  577. JOB_HANBOK,
  578. JOB_OKTOBERFEST,
  579. JOB_MAX_BASIC,
  580. JOB_NOVICE_HIGH = 4001,
  581. JOB_SWORDMAN_HIGH,
  582. JOB_MAGE_HIGH,
  583. JOB_ARCHER_HIGH,
  584. JOB_ACOLYTE_HIGH,
  585. JOB_MERCHANT_HIGH,
  586. JOB_THIEF_HIGH,
  587. JOB_LORD_KNIGHT,
  588. JOB_HIGH_PRIEST,
  589. JOB_HIGH_WIZARD,
  590. JOB_WHITESMITH,
  591. JOB_SNIPER,
  592. JOB_ASSASSIN_CROSS,
  593. JOB_LORD_KNIGHT2,
  594. JOB_PALADIN,
  595. JOB_CHAMPION,
  596. JOB_PROFESSOR,
  597. JOB_STALKER,
  598. JOB_CREATOR,
  599. JOB_CLOWN,
  600. JOB_GYPSY,
  601. JOB_PALADIN2,
  602. JOB_BABY,
  603. JOB_BABY_SWORDMAN,
  604. JOB_BABY_MAGE,
  605. JOB_BABY_ARCHER,
  606. JOB_BABY_ACOLYTE,
  607. JOB_BABY_MERCHANT,
  608. JOB_BABY_THIEF,
  609. JOB_BABY_KNIGHT,
  610. JOB_BABY_PRIEST,
  611. JOB_BABY_WIZARD,
  612. JOB_BABY_BLACKSMITH,
  613. JOB_BABY_HUNTER,
  614. JOB_BABY_ASSASSIN,
  615. JOB_BABY_KNIGHT2,
  616. JOB_BABY_CRUSADER,
  617. JOB_BABY_MONK,
  618. JOB_BABY_SAGE,
  619. JOB_BABY_ROGUE,
  620. JOB_BABY_ALCHEMIST,
  621. JOB_BABY_BARD,
  622. JOB_BABY_DANCER,
  623. JOB_BABY_CRUSADER2,
  624. JOB_SUPER_BABY,
  625. JOB_TAEKWON,
  626. JOB_STAR_GLADIATOR,
  627. JOB_STAR_GLADIATOR2,
  628. JOB_SOUL_LINKER,
  629. JOB_GANGSI,
  630. JOB_DEATH_KNIGHT,
  631. JOB_DARK_COLLECTOR,
  632. JOB_RUNE_KNIGHT = 4054,
  633. JOB_WARLOCK,
  634. JOB_RANGER,
  635. JOB_ARCH_BISHOP,
  636. JOB_MECHANIC,
  637. JOB_GUILLOTINE_CROSS,
  638. JOB_RUNE_KNIGHT_T,
  639. JOB_WARLOCK_T,
  640. JOB_RANGER_T,
  641. JOB_ARCH_BISHOP_T,
  642. JOB_MECHANIC_T,
  643. JOB_GUILLOTINE_CROSS_T,
  644. JOB_ROYAL_GUARD,
  645. JOB_SORCERER,
  646. JOB_MINSTREL,
  647. JOB_WANDERER,
  648. JOB_SURA,
  649. JOB_GENETIC,
  650. JOB_SHADOW_CHASER,
  651. JOB_ROYAL_GUARD_T,
  652. JOB_SORCERER_T,
  653. JOB_MINSTREL_T,
  654. JOB_WANDERER_T,
  655. JOB_SURA_T,
  656. JOB_GENETIC_T,
  657. JOB_SHADOW_CHASER_T,
  658. JOB_RUNE_KNIGHT2,
  659. JOB_RUNE_KNIGHT_T2,
  660. JOB_ROYAL_GUARD2,
  661. JOB_ROYAL_GUARD_T2,
  662. JOB_RANGER2,
  663. JOB_RANGER_T2,
  664. JOB_MECHANIC2,
  665. JOB_MECHANIC_T2,
  666. JOB_BABY_RUNE = 4096,
  667. JOB_BABY_WARLOCK,
  668. JOB_BABY_RANGER,
  669. JOB_BABY_BISHOP,
  670. JOB_BABY_MECHANIC,
  671. JOB_BABY_CROSS,
  672. JOB_BABY_GUARD,
  673. JOB_BABY_SORCERER,
  674. JOB_BABY_MINSTREL,
  675. JOB_BABY_WANDERER,
  676. JOB_BABY_SURA,
  677. JOB_BABY_GENETIC,
  678. JOB_BABY_CHASER,
  679. JOB_BABY_RUNE2,
  680. JOB_BABY_GUARD2,
  681. JOB_BABY_RANGER2,
  682. JOB_BABY_MECHANIC2,
  683. JOB_SUPER_NOVICE_E = 4190,
  684. JOB_SUPER_BABY_E,
  685. JOB_KAGEROU = 4211,
  686. JOB_OBORO,
  687. JOB_REBELLION = 4215,
  688. JOB_MAX,
  689. };
  690. enum e_sex {
  691. SEX_FEMALE = 0,
  692. SEX_MALE,
  693. SEX_SERVER
  694. };
  695. /// Item Bound Type
  696. enum bound_type {
  697. BOUND_NONE = 0, /// No bound
  698. BOUND_ACCOUNT, /// 1- Account Bound
  699. BOUND_GUILD, /// 2 - Guild Bound
  700. BOUND_PARTY, /// 3 - Party Bound
  701. BOUND_CHAR, /// 4 - Character Bound
  702. BOUND_MAX,
  703. BOUND_ONEQUIP = 1, ///< Show notification when item will be bound on equip
  704. BOUND_DISPYELLOW = 2, /// Shows the item name in yellow color
  705. };
  706. // sanity checks...
  707. #if MAX_ZENY > INT_MAX
  708. #error MAX_ZENY is too big
  709. #endif
  710. #if (MIN_CHARS + MAX_CHAR_VIP + MAX_CHAR_BILLING) > MAX_CHARS
  711. #error Config of MAX_CHARS is invalid
  712. #endif
  713. #if MIN_STORAGE > MAX_STORAGE
  714. #error Config of MIN_STORAGE is invalid
  715. #endif
  716. #endif /* _MMO_H_ */