mmo.hpp 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201
  1. // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
  2. // For more information, see LICENCE in the main folder
  3. #ifndef MMO_HPP
  4. #define MMO_HPP
  5. #include <time.h>
  6. #include "../config/core.hpp"
  7. #include "cbasetypes.hpp"
  8. #include "db.hpp"
  9. #include "timer.hpp" // t_tick
  10. #ifndef PACKETVER
  11. #error Please define PACKETVER in src/config/packets.hpp
  12. #endif
  13. ///Remove/Comment this line to disable sc_data saving. [Skotlex]
  14. #define ENABLE_SC_SAVING
  15. /** Remove/Comment this line to disable server-side hot-key saving support [Skotlex]
  16. * Note that newer clients no longer save hotkeys in the registry! */
  17. #define HOTKEY_SAVING
  18. #if PACKETVER < 20090603
  19. // (27 = 9 skills x 3 bars) (0x02b9,191)
  20. #define MAX_HOTKEYS 27
  21. #elif PACKETVER < 20090617
  22. // (36 = 9 skills x 4 bars) (0x07d9,254)
  23. #define MAX_HOTKEYS 36
  24. #else
  25. // (38 = 9 skills x 4 bars & 2 Quickslots)(0x07d9,268)
  26. #define MAX_HOTKEYS 38
  27. #endif
  28. #if PACKETVER_MAIN_NUM >= 20190522 || PACKETVER_RE_NUM >= 20190508 || PACKETVER_ZERO_NUM >= 20190605
  29. #define MAX_HOTKEYS_DB ((MAX_HOTKEYS) * 2)
  30. #else
  31. #define MAX_HOTKEYS_DB MAX_HOTKEYS
  32. #endif
  33. #define MAX_MAP_PER_SERVER 1500 /// Maximum amount of maps available on a server
  34. #ifndef INVENTORY_BASE_SIZE
  35. #define INVENTORY_BASE_SIZE 100 // Amount of inventory slots each player has
  36. #endif
  37. #ifndef INVENTORY_EXPANSION_SIZE
  38. #if PACKETVER_MAIN_NUM >= 20181031 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20181114
  39. #define INVENTORY_EXPANSION_SIZE 100 // Amount of additional inventory slots a player can have
  40. #else
  41. #define INVENTORY_EXPANSION_SIZE 0
  42. #endif
  43. #endif
  44. #ifndef MAX_INVENTORY
  45. #define MAX_INVENTORY ( INVENTORY_BASE_SIZE + INVENTORY_EXPANSION_SIZE ) // Maximum items in player inventory (in total)
  46. #else
  47. #if MAX_INVENTORY < ( INVENTORY_BASE_SIZE + INVENTORY_EXPANSION_SIZE )
  48. #error Your custom MAX_INVENTORY define is too low
  49. #endif
  50. #endif
  51. /** 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.
  52. * Max value tested was 265 */
  53. #ifndef MAX_CHARS
  54. #if PACKETVER >= 20180124
  55. #define MAX_CHARS 15
  56. #elif PACKETVER >= 20100413
  57. #define MAX_CHARS 12
  58. #else
  59. #define MAX_CHARS 9
  60. #endif
  61. #endif
  62. typedef uint32 t_itemid;
  63. /** 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]
  64. * Note: The client seems unable to receive data for more than 4 slots due to all related packets having a fixed size. */
  65. #define MAX_SLOTS 4
  66. #define MAX_AMOUNT 30000 ////Max amount of a single stacked item
  67. #define MAX_ZENY INT_MAX ///Max zeny
  68. #define MAX_BANK_ZENY SINT32_MAX ///Max zeny in Bank
  69. #ifndef MAX_CASHPOINT
  70. #define MAX_CASHPOINT INT_MAX
  71. #endif
  72. #ifndef MAX_KAFRAPOINT
  73. #define MAX_KAFRAPOINT INT_MAX
  74. #endif
  75. #define MAX_FAME 1000000000 ///Max fame points
  76. #define MAX_CART 100 ///Maximum item in cart
  77. #define MAX_SKILL 1454 ///Maximum skill can be hold by Player, Homunculus, & Mercenary (skill list) AND skill_db limit
  78. #define DEFAULT_WALK_SPEED 150 ///Default walk speed
  79. #define MIN_WALK_SPEED 20 ///Min walk speed
  80. #define MAX_WALK_SPEED 1000 ///Max walk speed
  81. #define MAX_STORAGE 600 ///Max number of storage slots a player can have
  82. #define MAX_GUILD_STORAGE 600 ///Max number of storage slots a guild
  83. #define MAX_PARTY 12 ///Max party member
  84. #define MAX_GUILD 16+10*6 ///Increased max guild members +6 per 1 extension levels [Lupus]
  85. #define MAX_GUILDPOSITION 20 ///Increased max guild positions to accomodate for all members [Valaris] (removed) [PoW]
  86. #define MAX_GUILDEXPULSION 32 ///Max Guild expulsion
  87. #define MAX_GUILDALLIANCE 16 ///Max Guild alliance
  88. #ifdef RENEWAL
  89. #define MAX_GUILDSKILL 20 ///Max Guild skills
  90. #else
  91. #define MAX_GUILDSKILL 15 ///Max Guild skills
  92. #endif
  93. #define MAX_GUILDLEVEL 50 ///Max Guild level
  94. #define MAX_GUARDIANS 8 ///Local max per castle. If this value is increased, need to add more fields on MySQL `guild_castle` table [Skotlex]
  95. #define MAX_QUEST_OBJECTIVES 3 ///Max quest objectives for a quest
  96. #define MAX_PC_BONUS_SCRIPT 50 ///Max bonus script can be fetched from `bonus_script` table on player load [Cydh]
  97. #define MAX_ITEM_RDM_OPT 5 /// Max item random option [Napster]
  98. #define DB_NAME_LEN 256 //max len of dbs
  99. #define MAX_CLAN 500
  100. #define MAX_CLANALLIANCE 6
  101. #ifndef MAX_BARTER_REQUIREMENTS
  102. #define MAX_BARTER_REQUIREMENTS 5
  103. #endif
  104. enum e_enchantgrade : uint16{
  105. ENCHANTGRADE_NONE = 0,
  106. ENCHANTGRADE_D,
  107. ENCHANTGRADE_C,
  108. ENCHANTGRADE_B,
  109. ENCHANTGRADE_A
  110. };
  111. #ifdef RENEWAL
  112. #define MAX_WEAPON_LEVEL 5
  113. #define MAX_ARMOR_LEVEL 2
  114. #define MAX_ENCHANTGRADE ENCHANTGRADE_A
  115. #else
  116. #define MAX_WEAPON_LEVEL 4
  117. #define MAX_ARMOR_LEVEL 1
  118. #define MAX_ENCHANTGRADE ENCHANTGRADE_NONE
  119. #endif
  120. // for produce
  121. #define MIN_ATTRIBUTE 0
  122. #define MAX_ATTRIBUTE 4
  123. #define ATTRIBUTE_NORMAL 0
  124. #define MIN_STAR 0
  125. #define MAX_STAR 3
  126. const t_itemid WEDDING_RING_M = 2634;
  127. const t_itemid WEDDING_RING_F = 2635;
  128. //For character names, title names, guilds, maps, etc.
  129. //Includes null-terminator as it is the length of the array.
  130. #define NAME_LENGTH (23 + 1)
  131. #define PASSWD_LENGTH (32+1)
  132. //NPC names can be longer than it's displayed on client (NAME_LENGTH).
  133. #define NPC_NAME_LENGTH 50
  134. // <NPC_NAME_LENGTH> for npc name + 2 for a "::" + <NAME_LENGTH> for label + 1 for EOS
  135. #define EVENT_NAME_LENGTH ( NPC_NAME_LENGTH + 2 + NAME_LENGTH + 1 )
  136. //For item names, which tend to have much longer names.
  137. #define ITEM_NAME_LENGTH 50
  138. //For Map Names, which the client considers to be 16 in length including the .gat extension
  139. #define MAP_NAME_LENGTH (11 + 1)
  140. #define MAP_NAME_LENGTH_EXT (MAP_NAME_LENGTH + 4)
  141. //Pincode Length
  142. #define PINCODE_LENGTH 4
  143. #define MAX_FRIENDS 40
  144. #define MAX_MEMOPOINTS 3
  145. #define MAX_SKILLCOOLDOWN 20
  146. //Size of the fame list arrays.
  147. #define MAX_FAME_LIST 10
  148. //Limits to avoid ID collision with other game objects
  149. #define START_ACCOUNT_NUM 2000000
  150. #define END_ACCOUNT_NUM 100000000
  151. #define START_CHAR_NUM 150000
  152. //Guilds
  153. #define MAX_GUILDMES1 60
  154. #define MAX_GUILDMES2 120
  155. //Base Homun skill.
  156. #define HM_SKILLBASE 8001
  157. #define MAX_HOMUNSKILL 43
  158. #define MAX_HOMUNCULUS_CLASS 52 //[orn], Increased to 60 from 16 to allow new Homun-S.
  159. #define HM_CLASS_BASE 6001
  160. #define HM_CLASS_MAX (HM_CLASS_BASE+MAX_HOMUNCULUS_CLASS-1)
  161. //Mail System
  162. #define MAIL_MAX_INBOX 30
  163. #define MAIL_TITLE_LENGTH 40
  164. #if PACKETVER < 20150513
  165. #define MAIL_BODY_LENGTH 200
  166. #define MAIL_MAX_ITEM 1
  167. #else
  168. #define MAIL_BODY_LENGTH 500
  169. #define MAIL_MAX_ITEM 5
  170. #define MAIL_PAGE_SIZE 7
  171. #endif
  172. #ifndef MAIL_ITERATION_SIZE
  173. #define MAIL_ITERATION_SIZE 100
  174. #endif
  175. //Mercenary System
  176. #define MC_SKILLBASE 8201
  177. #define MAX_MERCSKILL 41
  178. //Elemental System
  179. #define MAX_ELEMENTALSKILL 57
  180. #define EL_SKILLBASE 8401
  181. //Automated Battle Robot System
  182. #define ABR_SKILLBASE 8601
  183. #define MAX_ABRSKILL 5
  184. //Achievement System
  185. #define MAX_ACHIEVEMENT_OBJECTIVES 10 /// Maximum different objectives in achievement_db.yml
  186. #define MAX_ACHIEVEMENT_DEPENDENTS 20 /// Maximum different dependents in achievement_db.yml
  187. #define ACHIEVEMENT_NAME_LENGTH 50 /// Max Achievement Name length
  188. enum item_types {
  189. IT_HEALING = 0,
  190. IT_UNKNOWN, //1
  191. IT_USABLE, //2
  192. IT_ETC, //3
  193. IT_ARMOR, //4
  194. IT_WEAPON, //5
  195. IT_CARD, //6
  196. IT_PETEGG, //7
  197. IT_PETARMOR,//8
  198. IT_UNKNOWN2,//9
  199. IT_AMMO, //10
  200. IT_DELAYCONSUME,//11
  201. IT_SHADOWGEAR, //12
  202. IT_CASH = 18,
  203. IT_MAX
  204. };
  205. /// Monster mode definitions to clear up code reading. [Skotlex]
  206. enum e_mode {
  207. MD_NONE = 0x0000000,
  208. MD_CANMOVE = 0x0000001,
  209. MD_LOOTER = 0x0000002,
  210. MD_AGGRESSIVE = 0x0000004,
  211. MD_ASSIST = 0x0000008,
  212. MD_CASTSENSORIDLE = 0x0000010,
  213. MD_NORANDOMWALK = 0x0000020,
  214. MD_NOCAST = 0x0000040,
  215. MD_CANATTACK = 0x0000080,
  216. //FREE = 0x0000100,
  217. MD_CASTSENSORCHASE = 0x0000200,
  218. MD_CHANGECHASE = 0x0000400,
  219. MD_ANGRY = 0x0000800,
  220. MD_CHANGETARGETMELEE = 0x0001000,
  221. MD_CHANGETARGETCHASE = 0x0002000,
  222. MD_TARGETWEAK = 0x0004000,
  223. MD_RANDOMTARGET = 0x0008000,
  224. MD_IGNOREMELEE = 0x0010000,
  225. MD_IGNOREMAGIC = 0x0020000,
  226. MD_IGNORERANGED = 0x0040000,
  227. MD_MVP = 0x0080000,
  228. MD_IGNOREMISC = 0x0100000,
  229. MD_KNOCKBACKIMMUNE = 0x0200000,
  230. MD_TELEPORTBLOCK = 0x0400000,
  231. //FREE = 0x0800000,
  232. MD_FIXEDITEMDROP = 0x1000000,
  233. MD_DETECTOR = 0x2000000,
  234. MD_STATUSIMMUNE = 0x4000000,
  235. MD_SKILLIMMUNE = 0x8000000,
  236. };
  237. #define MD_MASK 0x000FFFF
  238. #define ATR_MASK 0x0FF0000
  239. #define CL_MASK 0xF000000
  240. // Questlog states
  241. enum e_quest_state : uint8 {
  242. Q_INACTIVE, ///< Inactive quest (the user can toggle between active and inactive quests)
  243. Q_ACTIVE, ///< Active quest
  244. Q_COMPLETE, ///< Completed quest
  245. };
  246. /// Questlog entry
  247. struct quest {
  248. int quest_id; ///< Quest ID
  249. uint32 time; ///< Expiration time
  250. int count[MAX_QUEST_OBJECTIVES]; ///< Kill counters of each quest objective
  251. e_quest_state state; ///< Current quest state
  252. };
  253. /// Achievement log entry
  254. struct achievement {
  255. int achievement_id; ///< Achievement ID
  256. int count[MAX_ACHIEVEMENT_OBJECTIVES]; ///< Counters of each achievement objective
  257. time_t completed; ///< Date completed
  258. time_t rewarded; ///< Received reward?
  259. int score; ///< Amount of points achievement is worth
  260. };
  261. // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
  262. #if !defined( sun ) && ( !defined( __NETBSD__ ) || __NetBSD_Version__ >= 600000000 )
  263. #pragma pack( push, 1 )
  264. #endif
  265. struct s_item_randomoption {
  266. short id;
  267. short value;
  268. char param;
  269. } __attribute__((packed));
  270. struct item {
  271. int id;
  272. t_itemid nameid;
  273. short amount;
  274. unsigned int equip; // location(s) where item is equipped (using enum equip_pos for bitmasking)
  275. char identify;
  276. char refine;
  277. char attribute;
  278. t_itemid card[MAX_SLOTS];
  279. struct s_item_randomoption option[MAX_ITEM_RDM_OPT]; // max of 5 random options can be supported.
  280. unsigned int expire_time;
  281. char favorite, bound;
  282. uint64 unique_id;
  283. unsigned int equipSwitch; // location(s) where item is equipped for equip switching (using enum equip_pos for bitmasking)
  284. uint8 enchantgrade;
  285. } __attribute__((packed));
  286. // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
  287. #if !defined( sun ) && ( !defined( __NETBSD__ ) || __NetBSD_Version__ >= 600000000 )
  288. #pragma pack( pop )
  289. #endif
  290. //Equip position constants
  291. enum equip_pos : uint32 {
  292. EQP_HEAD_LOW = 0x000001,
  293. EQP_HEAD_MID = 0x000200, // 512
  294. EQP_HEAD_TOP = 0x000100, // 256
  295. EQP_HAND_R = 0x000002, // 2
  296. EQP_HAND_L = 0x000020, // 32
  297. EQP_ARMOR = 0x000010, // 16
  298. EQP_SHOES = 0x000040, // 64
  299. EQP_GARMENT = 0x000004, // 4
  300. EQP_ACC_R = 0x000008, // 8
  301. EQP_ACC_L = 0x000080, // 128
  302. EQP_COSTUME_HEAD_TOP = 0x000400, // 1024
  303. EQP_COSTUME_HEAD_MID = 0x000800, // 2048
  304. EQP_COSTUME_HEAD_LOW = 0x001000, // 4096
  305. EQP_COSTUME_GARMENT = 0x002000, // 8192
  306. //EQP_COSTUME_FLOOR = 0x004000, // 16384
  307. EQP_AMMO = 0x008000, // 32768
  308. EQP_SHADOW_ARMOR = 0x010000, // 65536
  309. EQP_SHADOW_WEAPON = 0x020000, // 131072
  310. EQP_SHADOW_SHIELD = 0x040000, // 262144
  311. EQP_SHADOW_SHOES = 0x080000, // 524288
  312. EQP_SHADOW_ACC_R = 0x100000, // 1048576
  313. EQP_SHADOW_ACC_L = 0x200000, // 2097152
  314. // Combined
  315. EQP_ACC_RL = EQP_ACC_R|EQP_ACC_L,
  316. EQP_SHADOW_ACC_RL = EQP_SHADOW_ACC_R|EQP_SHADOW_ACC_L,
  317. };
  318. struct point {
  319. uint16 map;
  320. uint16 x,y;
  321. };
  322. struct s_point_str{
  323. char map[MAP_NAME_LENGTH_EXT];
  324. uint16 x,y;
  325. };
  326. struct startitem {
  327. t_itemid nameid;
  328. unsigned short amount;
  329. uint32 pos;
  330. };
  331. enum e_skill_flag : int8
  332. {
  333. SKILL_FLAG_NONE = -1,
  334. SKILL_FLAG_PERMANENT,
  335. SKILL_FLAG_TEMPORARY,
  336. SKILL_FLAG_PLAGIARIZED,
  337. SKILL_FLAG_PERM_GRANTED, // Permanent, granted through someway e.g. script
  338. SKILL_FLAG_TMP_COMBO, //@FIXME for homunculus combo atm
  339. //! NOTE: This flag be the last flag, and don't change the value if not needed!
  340. SKILL_FLAG_REPLACED_LV_0 = 10, // temporary skill overshadowing permanent skill of level 'N - SKILL_FLAG_REPLACED_LV_0',
  341. };
  342. struct s_skill {
  343. uint16 id;
  344. uint8 lv;
  345. uint8 flag; // see enum e_skill_flag
  346. };
  347. struct script_reg_state {
  348. unsigned int type : 1; // because I'm a memory hoarder and having them in the same struct would be a 8-byte/instance waste while ints outnumber str on a 10000-to-1 ratio.
  349. unsigned int update : 1; // whether it needs to be sent to char server for insertion/update/delete
  350. };
  351. struct script_reg_num {
  352. struct script_reg_state flag;
  353. int64 value;
  354. };
  355. struct script_reg_str {
  356. struct script_reg_state flag;
  357. char *value;
  358. };
  359. //For saving status changes across sessions. [Skotlex]
  360. struct status_change_data {
  361. unsigned short type; //SC_type
  362. long val1, val2, val3, val4;
  363. t_tick tick; //Remaining duration.
  364. };
  365. #define MAX_BONUS_SCRIPT_LENGTH 512
  366. struct bonus_script_data {
  367. char script_str[MAX_BONUS_SCRIPT_LENGTH]; //< Script string
  368. t_tick tick; ///< Tick
  369. uint16 flag; ///< Flags @see enum e_bonus_script_flags
  370. int16 icon; ///< Icon SI
  371. uint8 type; ///< 0 - None, 1 - Buff, 2 - Debuff
  372. };
  373. struct skill_cooldown_data {
  374. unsigned short skill_id;
  375. t_tick tick;
  376. };
  377. enum storage_type {
  378. TABLE_INVENTORY = 1,
  379. TABLE_CART,
  380. TABLE_STORAGE,
  381. TABLE_GUILD_STORAGE,
  382. };
  383. enum e_storage_mode {
  384. STOR_MODE_NONE = 0x0,
  385. STOR_MODE_GET = 0x1,
  386. STOR_MODE_PUT = 0x2,
  387. STOR_MODE_ALL = 0x3,
  388. };
  389. struct s_storage {
  390. bool dirty; ///< Dirty status, data needs to be saved
  391. bool status; ///< Current status of storage (opened or closed)
  392. uint16 amount; ///< Amount of items in storage
  393. bool lock; ///< If locked, can't use storage when item bound retrieval
  394. uint32 id; ///< Account ID / Character ID / Guild ID (owner of storage)
  395. enum storage_type type; ///< Type of storage (inventory, cart, storage, guild storage)
  396. uint16 max_amount; ///< Maximum amount of items in storage
  397. uint8 stor_id; ///< Storage ID
  398. struct {
  399. unsigned get : 1;
  400. unsigned put : 1;
  401. } state;
  402. union { // Max for inventory, storage, cart, and guild storage are 818 each without changing this struct and struct item [2016/08/14]
  403. struct item items_inventory[MAX_INVENTORY];
  404. struct item items_storage[MAX_STORAGE];
  405. struct item items_cart[MAX_CART];
  406. struct item items_guild[MAX_GUILD_STORAGE];
  407. } u;
  408. };
  409. struct s_storage_table {
  410. char name[NAME_LENGTH];
  411. char table[DB_NAME_LEN];
  412. uint16 max_num;
  413. uint8 id;
  414. };
  415. struct s_pet {
  416. uint32 account_id;
  417. uint32 char_id;
  418. int pet_id;
  419. short class_;
  420. short level;
  421. t_itemid egg_id;//pet egg id
  422. t_itemid equip;//pet equip name_id
  423. short intimate;//pet friendly
  424. short hungry;//pet hungry
  425. char name[NAME_LENGTH];
  426. char rename_flag;
  427. char incubate;
  428. bool autofeed;
  429. };
  430. struct s_homunculus { //[orn]
  431. char name[NAME_LENGTH];
  432. int hom_id;
  433. uint32 char_id;
  434. short class_;
  435. short prev_class;
  436. int hp,max_hp,sp,max_sp;
  437. unsigned int intimacy; //[orn]
  438. short hunger;
  439. struct s_skill hskill[MAX_HOMUNSKILL]; //albator
  440. short skillpts;
  441. short level;
  442. t_exp exp;
  443. short rename_flag;
  444. short vaporize; //albator
  445. int str;
  446. int agi;
  447. int vit;
  448. int int_;
  449. int dex;
  450. int luk;
  451. int str_value;
  452. int agi_value;
  453. int vit_value;
  454. int int_value;
  455. int dex_value;
  456. int luk_value;
  457. char spiritball; //for homun S [lighta]
  458. bool autofeed;
  459. };
  460. struct s_mercenary {
  461. int mercenary_id;
  462. uint32 char_id;
  463. short class_;
  464. int hp, sp;
  465. unsigned int kill_count;
  466. t_tick life_time;
  467. };
  468. struct s_elemental {
  469. int elemental_id;
  470. uint32 char_id;
  471. short class_;
  472. int mode;
  473. int hp, sp, max_hp, max_sp, matk, atk, atk2;
  474. short hit, flee, amotion, def, mdef;
  475. t_tick life_time;
  476. };
  477. struct s_friend {
  478. uint32 account_id;
  479. uint32 char_id;
  480. char name[NAME_LENGTH];
  481. };
  482. #ifdef HOTKEY_SAVING
  483. struct hotkey {
  484. unsigned int id;
  485. unsigned short lv;
  486. unsigned char type; // 0: item, 1: skill
  487. };
  488. #endif
  489. struct mmo_charstatus {
  490. uint32 char_id;
  491. uint32 account_id;
  492. uint32 partner_id;
  493. uint32 father;
  494. uint32 mother;
  495. uint32 child;
  496. t_exp base_exp,job_exp;
  497. int zeny;
  498. short class_; ///< Player's JobID
  499. unsigned int status_point,skill_point,trait_point;
  500. int hp,max_hp,sp,max_sp,ap,max_ap;
  501. unsigned int option;
  502. short manner; // Defines how many minutes a char will be muted, each negative point is equivalent to a minute.
  503. unsigned char karma;
  504. short hair,hair_color,clothes_color,body;
  505. int party_id,guild_id,pet_id,hom_id,mer_id,ele_id,clan_id;
  506. int fame;
  507. // Mercenary Guilds Rank
  508. int arch_faith, arch_calls;
  509. int spear_faith, spear_calls;
  510. int sword_faith, sword_calls;
  511. short weapon; // enum weapon_type
  512. short shield; // view-id
  513. short head_top,head_mid,head_bottom;
  514. short robe;
  515. uint8 body_direction;
  516. char name[NAME_LENGTH];
  517. unsigned int base_level,job_level;
  518. unsigned short str,agi,vit,int_,dex,luk;
  519. unsigned short pow,sta,wis,spl,con,crt;
  520. unsigned char slot,sex;
  521. uint32 mapip;
  522. uint16 mapport;
  523. struct s_point_str last_point;
  524. struct s_point_str save_point;
  525. struct s_point_str memo_point[MAX_MEMOPOINTS];
  526. struct s_skill skill[MAX_SKILL];
  527. struct s_friend friends[MAX_FRIENDS]; //New friend system [Skotlex]
  528. #ifdef HOTKEY_SAVING
  529. struct hotkey hotkeys[MAX_HOTKEYS_DB];
  530. #endif
  531. bool show_equip,allow_party, disable_call;
  532. short rename;
  533. time_t delete_date;
  534. time_t unban_time;
  535. // Char server addon system
  536. unsigned int character_moves;
  537. unsigned char font;
  538. bool cashshop_sent; // Whether the player has received the CashShop list
  539. uint32 uniqueitem_counter;
  540. unsigned char hotkey_rowshift;
  541. unsigned char hotkey_rowshift2;
  542. unsigned long title_id;
  543. uint16 inventory_slots;
  544. };
  545. typedef enum mail_status {
  546. MAIL_NEW,
  547. MAIL_UNREAD,
  548. MAIL_READ,
  549. } mail_status;
  550. enum mail_inbox_type {
  551. MAIL_INBOX_NORMAL = 0,
  552. MAIL_INBOX_ACCOUNT,
  553. MAIL_INBOX_RETURNED
  554. };
  555. enum mail_attachment_type {
  556. MAIL_ATT_NONE = 0,
  557. MAIL_ATT_ZENY = 1,
  558. MAIL_ATT_ITEM = 2,
  559. MAIL_ATT_ALL = MAIL_ATT_ZENY | MAIL_ATT_ITEM
  560. };
  561. struct mail_message {
  562. int id;
  563. uint32 send_id; //hold char_id of sender
  564. char send_name[NAME_LENGTH]; //sender nickname
  565. uint32 dest_id; //hold char_id of receiver
  566. char dest_name[NAME_LENGTH]; //receiver nickname
  567. char title[MAIL_TITLE_LENGTH];
  568. char body[MAIL_BODY_LENGTH];
  569. enum mail_inbox_type type;
  570. time_t scheduled_deletion;
  571. mail_status status;
  572. time_t timestamp; // marks when the message was sent
  573. uint32 zeny;
  574. struct item item[MAIL_MAX_ITEM];
  575. };
  576. struct mail_data {
  577. short amount;
  578. bool full;
  579. short unchecked, unread;
  580. struct mail_message msg[MAIL_MAX_INBOX];
  581. };
  582. struct auction_data {
  583. unsigned int auction_id;
  584. int seller_id;
  585. char seller_name[NAME_LENGTH];
  586. int buyer_id;
  587. char buyer_name[NAME_LENGTH];
  588. struct item item;
  589. // This data is required for searching, as itemdb is not read by char server
  590. char item_name[ITEM_NAME_LENGTH];
  591. short type;
  592. unsigned short hours;
  593. int price, buynow;
  594. time_t timestamp; // auction's end time
  595. int auction_end_timer;
  596. };
  597. struct party_member {
  598. uint32 account_id;
  599. uint32 char_id;
  600. char name[NAME_LENGTH];
  601. unsigned short class_;
  602. char map[MAP_NAME_LENGTH_EXT];
  603. unsigned short lv;
  604. unsigned leader : 1,
  605. online : 1;
  606. };
  607. struct party {
  608. int party_id;
  609. char name[NAME_LENGTH];
  610. unsigned char count; //Count of online characters.
  611. unsigned exp : 1,
  612. item : 2; //&1: Party-Share (round-robin), &2: pickup style: shared.
  613. struct party_member member[MAX_PARTY];
  614. };
  615. class map_session_data;
  616. struct guild_member {
  617. uint32 account_id, char_id;
  618. short hair,hair_color,gender,class_,lv;
  619. t_exp exp;
  620. short online,position;
  621. char name[NAME_LENGTH];
  622. map_session_data *sd;
  623. unsigned char modified;
  624. uint32 last_login;
  625. };
  626. struct guild_position {
  627. char name[NAME_LENGTH];
  628. int mode;
  629. int exp_mode;
  630. unsigned char modified;
  631. };
  632. struct guild_alliance {
  633. int opposition;
  634. int guild_id;
  635. char name[NAME_LENGTH];
  636. };
  637. struct guild_expulsion {
  638. char name[NAME_LENGTH];
  639. char mes[40];
  640. uint32 account_id;
  641. };
  642. struct guild_skill {
  643. int id,lv;
  644. };
  645. struct Channel;
  646. struct guild {
  647. int guild_id;
  648. short guild_lv, connect_member, max_member, average_lv;
  649. t_exp exp;
  650. t_exp next_exp;
  651. int skill_point;
  652. char name[NAME_LENGTH],master[NAME_LENGTH];
  653. struct guild_member member[MAX_GUILD];
  654. struct guild_position position[MAX_GUILDPOSITION];
  655. char mes1[MAX_GUILDMES1],mes2[MAX_GUILDMES2];
  656. int emblem_len,emblem_id;
  657. char emblem_data[2048];
  658. struct guild_alliance alliance[MAX_GUILDALLIANCE];
  659. struct guild_expulsion expulsion[MAX_GUILDEXPULSION];
  660. struct guild_skill skill[MAX_GUILDSKILL];
  661. struct Channel *channel;
  662. int instance_id;
  663. time_t last_leader_change;
  664. /* Used by char-server to save events for guilds */
  665. unsigned short save_flag;
  666. int32 chargeshout_flag_id;
  667. };
  668. enum e_woe_type{
  669. WOE_FIRST_EDITION = 1,
  670. WOE_SECOND_EDITION,
  671. WOE_THIRD_EDITION,
  672. WOE_MAX
  673. };
  674. struct guild_castle {
  675. int castle_id;
  676. int mapindex;
  677. char castle_name[NAME_LENGTH];
  678. char castle_event[NPC_NAME_LENGTH];
  679. e_woe_type type;
  680. uint16 client_id;
  681. bool warp_enabled;
  682. uint16 warp_x;
  683. uint16 warp_y;
  684. uint32 zeny;
  685. uint32 zeny_siege;
  686. int guild_id;
  687. int economy;
  688. int defense;
  689. int triggerE;
  690. int triggerD;
  691. int nextTime;
  692. int payTime;
  693. int createTime;
  694. int visibleC;
  695. struct {
  696. unsigned visible : 1;
  697. int id; // object id
  698. } guardian[MAX_GUARDIANS];
  699. int* temp_guardians; // ids of temporary guardians (mobs)
  700. int temp_guardians_max;
  701. };
  702. /// Enum for guild castle data script commands
  703. enum e_castle_data : uint8 {
  704. CD_NONE = 0,
  705. CD_GUILD_ID, ///< Guild ID
  706. CD_CURRENT_ECONOMY, ///< Castle Economy score
  707. CD_CURRENT_DEFENSE, ///< Castle Defense score
  708. CD_INVESTED_ECONOMY, ///< Number of times the economy was invested in today
  709. CD_INVESTED_DEFENSE, ///< Number of times the defense was invested in today
  710. CD_NEXT_TIME, ///< unused
  711. CD_PAY_TIME, ///< unused
  712. CD_CREATE_TIME, ///< unused
  713. CD_ENABLED_KAFRA, ///< Is 1 if a Kafra was hired for this castle, 0 otherwise
  714. CD_ENABLED_GUARDIAN00, ///< Is 1 if the 1st guardian is present (Soldier Guardian)
  715. // The others in between are not needed in src, but are exported for the script engine
  716. CD_MAX = CD_ENABLED_GUARDIAN00 + MAX_GUARDIANS
  717. };
  718. /// Guild Permissions
  719. enum e_guild_permission {
  720. GUILD_PERM_INVITE = 0x001,
  721. GUILD_PERM_EXPEL = 0x010,
  722. GUILD_PERM_STORAGE = 0x100,
  723. #if PACKETVER >= 20140205
  724. GUILD_PERM_ALL = GUILD_PERM_INVITE|GUILD_PERM_EXPEL|GUILD_PERM_STORAGE,
  725. #else
  726. GUILD_PERM_ALL = GUILD_PERM_INVITE|GUILD_PERM_EXPEL,
  727. #endif
  728. GUILD_PERM_DEFAULT = GUILD_PERM_ALL,
  729. };
  730. struct fame_list {
  731. int id;
  732. int fame;
  733. char name[NAME_LENGTH];
  734. };
  735. enum e_guild_info { //Change Guild Infos
  736. GBI_EXP =1, // Guild Experience (EXP)
  737. GBI_GUILDLV, // Guild level
  738. GBI_SKILLPOINT, // Guild skillpoints
  739. GBI_SKILLLV, // Guild skill_lv ?? seem unused
  740. };
  741. enum e_guild_member_info { //Change Member Infos
  742. GMI_POSITION =0,
  743. GMI_EXP,
  744. GMI_HAIR,
  745. GMI_HAIR_COLOR,
  746. GMI_GENDER,
  747. GMI_CLASS,
  748. GMI_LEVEL,
  749. };
  750. enum e_guild_skill {
  751. GD_SKILLBASE = 10000,
  752. GD_APPROVAL = 10000,
  753. GD_KAFRACONTRACT,
  754. GD_GUARDRESEARCH,
  755. GD_GUARDUP,
  756. GD_EXTENSION,
  757. GD_GLORYGUILD,
  758. GD_LEADERSHIP,
  759. GD_GLORYWOUNDS,
  760. GD_SOULCOLD,
  761. GD_HAWKEYES,
  762. GD_BATTLEORDER,
  763. GD_REGENERATION,
  764. GD_RESTORE,
  765. GD_EMERGENCYCALL,
  766. GD_DEVELOPMENT,
  767. GD_ITEMEMERGENCYCALL,
  768. GD_GUILD_STORAGE,
  769. GD_CHARGESHOUT_FLAG,
  770. GD_CHARGESHOUT_BEATING,
  771. GD_EMERGENCY_MOVE,
  772. GD_MAX,
  773. };
  774. #define MAX_SKILL_ID GD_MAX
  775. //These mark the ID of the jobs, as expected by the client. [Skotlex]
  776. enum e_job {
  777. JOB_NOVICE,
  778. JOB_SWORDMAN,
  779. JOB_MAGE,
  780. JOB_ARCHER,
  781. JOB_ACOLYTE,
  782. JOB_MERCHANT,
  783. JOB_THIEF,
  784. JOB_KNIGHT,
  785. JOB_PRIEST,
  786. JOB_WIZARD,
  787. JOB_BLACKSMITH,
  788. JOB_HUNTER,
  789. JOB_ASSASSIN,
  790. JOB_KNIGHT2,
  791. JOB_CRUSADER,
  792. JOB_MONK,
  793. JOB_SAGE,
  794. JOB_ROGUE,
  795. JOB_ALCHEMIST,
  796. JOB_BARD,
  797. JOB_DANCER,
  798. JOB_CRUSADER2,
  799. JOB_WEDDING,
  800. JOB_SUPER_NOVICE,
  801. JOB_GUNSLINGER,
  802. JOB_NINJA,
  803. JOB_XMAS,
  804. JOB_SUMMER,
  805. JOB_HANBOK,
  806. JOB_OKTOBERFEST,
  807. JOB_SUMMER2,
  808. JOB_MAX_BASIC,
  809. JOB_NOVICE_HIGH = 4001,
  810. JOB_SWORDMAN_HIGH,
  811. JOB_MAGE_HIGH,
  812. JOB_ARCHER_HIGH,
  813. JOB_ACOLYTE_HIGH,
  814. JOB_MERCHANT_HIGH,
  815. JOB_THIEF_HIGH,
  816. JOB_LORD_KNIGHT,
  817. JOB_HIGH_PRIEST,
  818. JOB_HIGH_WIZARD,
  819. JOB_WHITESMITH,
  820. JOB_SNIPER,
  821. JOB_ASSASSIN_CROSS,
  822. JOB_LORD_KNIGHT2,
  823. JOB_PALADIN,
  824. JOB_CHAMPION,
  825. JOB_PROFESSOR,
  826. JOB_STALKER,
  827. JOB_CREATOR,
  828. JOB_CLOWN,
  829. JOB_GYPSY,
  830. JOB_PALADIN2,
  831. JOB_BABY,
  832. JOB_BABY_SWORDMAN,
  833. JOB_BABY_MAGE,
  834. JOB_BABY_ARCHER,
  835. JOB_BABY_ACOLYTE,
  836. JOB_BABY_MERCHANT,
  837. JOB_BABY_THIEF,
  838. JOB_BABY_KNIGHT,
  839. JOB_BABY_PRIEST,
  840. JOB_BABY_WIZARD,
  841. JOB_BABY_BLACKSMITH,
  842. JOB_BABY_HUNTER,
  843. JOB_BABY_ASSASSIN,
  844. JOB_BABY_KNIGHT2,
  845. JOB_BABY_CRUSADER,
  846. JOB_BABY_MONK,
  847. JOB_BABY_SAGE,
  848. JOB_BABY_ROGUE,
  849. JOB_BABY_ALCHEMIST,
  850. JOB_BABY_BARD,
  851. JOB_BABY_DANCER,
  852. JOB_BABY_CRUSADER2,
  853. JOB_SUPER_BABY,
  854. JOB_TAEKWON,
  855. JOB_STAR_GLADIATOR,
  856. JOB_STAR_GLADIATOR2,
  857. JOB_SOUL_LINKER,
  858. JOB_GANGSI,
  859. JOB_DEATH_KNIGHT,
  860. JOB_DARK_COLLECTOR,
  861. JOB_RUNE_KNIGHT = 4054,
  862. JOB_WARLOCK,
  863. JOB_RANGER,
  864. JOB_ARCH_BISHOP,
  865. JOB_MECHANIC,
  866. JOB_GUILLOTINE_CROSS,
  867. JOB_RUNE_KNIGHT_T,
  868. JOB_WARLOCK_T,
  869. JOB_RANGER_T,
  870. JOB_ARCH_BISHOP_T,
  871. JOB_MECHANIC_T,
  872. JOB_GUILLOTINE_CROSS_T,
  873. JOB_ROYAL_GUARD,
  874. JOB_SORCERER,
  875. JOB_MINSTREL,
  876. JOB_WANDERER,
  877. JOB_SURA,
  878. JOB_GENETIC,
  879. JOB_SHADOW_CHASER,
  880. JOB_ROYAL_GUARD_T,
  881. JOB_SORCERER_T,
  882. JOB_MINSTREL_T,
  883. JOB_WANDERER_T,
  884. JOB_SURA_T,
  885. JOB_GENETIC_T,
  886. JOB_SHADOW_CHASER_T,
  887. JOB_RUNE_KNIGHT2,
  888. JOB_RUNE_KNIGHT_T2,
  889. JOB_ROYAL_GUARD2,
  890. JOB_ROYAL_GUARD_T2,
  891. JOB_RANGER2,
  892. JOB_RANGER_T2,
  893. JOB_MECHANIC2,
  894. JOB_MECHANIC_T2,
  895. JOB_BABY_RUNE_KNIGHT = 4096,
  896. JOB_BABY_WARLOCK,
  897. JOB_BABY_RANGER,
  898. JOB_BABY_ARCH_BISHOP,
  899. JOB_BABY_MECHANIC,
  900. JOB_BABY_GUILLOTINE_CROSS,
  901. JOB_BABY_ROYAL_GUARD,
  902. JOB_BABY_SORCERER,
  903. JOB_BABY_MINSTREL,
  904. JOB_BABY_WANDERER,
  905. JOB_BABY_SURA,
  906. JOB_BABY_GENETIC,
  907. JOB_BABY_SHADOW_CHASER,
  908. JOB_BABY_RUNE_KNIGHT2,
  909. JOB_BABY_ROYAL_GUARD2,
  910. JOB_BABY_RANGER2,
  911. JOB_BABY_MECHANIC2,
  912. JOB_SUPER_NOVICE_E = 4190,
  913. JOB_SUPER_BABY_E,
  914. JOB_KAGEROU = 4211,
  915. JOB_OBORO,
  916. JOB_REBELLION = 4215,
  917. JOB_SUMMONER = 4218,
  918. JOB_BABY_SUMMONER = 4220,
  919. JOB_BABY_NINJA = 4222,
  920. JOB_BABY_KAGEROU,
  921. JOB_BABY_OBORO,
  922. JOB_BABY_TAEKWON,
  923. JOB_BABY_STAR_GLADIATOR,
  924. JOB_BABY_SOUL_LINKER,
  925. JOB_BABY_GUNSLINGER,
  926. JOB_BABY_REBELLION,
  927. JOB_BABY_STAR_GLADIATOR2 = 4238,
  928. JOB_STAR_EMPEROR,
  929. JOB_SOUL_REAPER,
  930. JOB_BABY_STAR_EMPEROR,
  931. JOB_BABY_SOUL_REAPER,
  932. JOB_STAR_EMPEROR2,
  933. JOB_BABY_STAR_EMPEROR2,
  934. JOB_DRAGON_KNIGHT = 4252,
  935. JOB_MEISTER,
  936. JOB_SHADOW_CROSS,
  937. JOB_ARCH_MAGE,
  938. JOB_CARDINAL,
  939. JOB_WINDHAWK,
  940. JOB_IMPERIAL_GUARD,
  941. JOB_BIOLO,
  942. JOB_ABYSS_CHASER,
  943. JOB_ELEMENTAL_MASTER,
  944. JOB_INQUISITOR,
  945. JOB_TROUBADOUR,
  946. JOB_TROUVERE,
  947. JOB_WINDHAWK2 = 4278,
  948. JOB_MEISTER2,
  949. JOB_DRAGON_KNIGHT2,
  950. JOB_IMPERIAL_GUARD2,
  951. JOB_SKY_EMPEROR = 4302,
  952. JOB_SOUL_ASCETIC,
  953. JOB_SHINKIRO,
  954. JOB_SHIRANUI,
  955. JOB_NIGHT_WATCH,
  956. JOB_HYPER_NOVICE,
  957. JOB_SPIRIT_HANDLER,
  958. JOB_SKY_EMPEROR2 = 4316,
  959. JOB_MAX,
  960. };
  961. enum e_sex : uint8 {
  962. SEX_FEMALE = 0,
  963. SEX_MALE,
  964. SEX_BOTH,
  965. SEX_SERVER
  966. };
  967. /// Item Bound Type
  968. enum bound_type {
  969. BOUND_NONE = 0, /// No bound
  970. BOUND_ACCOUNT, /// 1- Account Bound
  971. BOUND_GUILD, /// 2 - Guild Bound
  972. BOUND_PARTY, /// 3 - Party Bound
  973. BOUND_CHAR, /// 4 - Character Bound
  974. BOUND_MAX,
  975. BOUND_ONEQUIP = 1, ///< Show notification when item will be bound on equip
  976. BOUND_DISPYELLOW = 2, /// Shows the item name in yellow color
  977. };
  978. enum e_pc_reg_loading {
  979. PRL_NONE = 0x0,
  980. PRL_CHAR = 0x1,
  981. PRL_ACCL = 0x2, // local
  982. PRL_ACCG = 0x4, // global
  983. PRL_ALL = 0xFF,
  984. };
  985. enum e_party_member_withdraw {
  986. PARTY_MEMBER_WITHDRAW_LEAVE, ///< /leave
  987. PARTY_MEMBER_WITHDRAW_EXPEL, ///< Kicked
  988. PARTY_MEMBER_WITHDRAW_CANT_LEAVE, ///< TODO: Cannot /leave
  989. PARTY_MEMBER_WITHDRAW_CANT_EXPEL, ///< TODO: Cannot be kicked
  990. };
  991. enum e_rank {
  992. RANK_BLACKSMITH = 0,
  993. RANK_ALCHEMIST = 1,
  994. RANK_TAEKWON = 2,
  995. RANK_KILLER = 3
  996. };
  997. struct clan_alliance {
  998. int opposition;
  999. int clan_id;
  1000. char name[NAME_LENGTH];
  1001. };
  1002. struct clan{
  1003. int id;
  1004. char name[NAME_LENGTH];
  1005. char master[NAME_LENGTH];
  1006. char map[MAP_NAME_LENGTH_EXT];
  1007. short max_member, connect_member;
  1008. map_session_data *members[MAX_CLAN];
  1009. struct clan_alliance alliance[MAX_CLANALLIANCE];
  1010. unsigned short instance_id;
  1011. };
  1012. // Sanity checks...
  1013. #if MAX_ZENY > INT_MAX
  1014. #error MAX_ZENY is too big
  1015. #endif
  1016. // This sanity check is required, because some other places(like skill.cpp) rely on this
  1017. #if MAX_PARTY < 2
  1018. #error MAX_PARTY is too small, you need at least 2 players for a party
  1019. #endif
  1020. #ifndef MIN_CHARS
  1021. #define MIN_CHARS ( MAX_CHARS - MAX_CHAR_VIP - MAX_CHAR_BILLING ) // Default number of characters per account.
  1022. #endif
  1023. #if (MIN_CHARS + MAX_CHAR_VIP + MAX_CHAR_BILLING) > MAX_CHARS
  1024. #error Config of MAX_CHARS is invalid
  1025. #endif
  1026. #if MIN_STORAGE > MAX_STORAGE
  1027. #error Config of MIN_STORAGE is invalid
  1028. #endif
  1029. #ifdef PACKET_OBFUSCATION
  1030. #if PACKETVER < 20110817
  1031. #undef PACKET_OBFUSCATION
  1032. #endif
  1033. #endif
  1034. /* Feb 1st 2012 */
  1035. #if PACKETVER >= 20120201
  1036. #define NEW_CARTS
  1037. #ifndef ENABLE_SC_SAVING
  1038. #warning "Cart won't be able to be saved for relog"
  1039. #endif
  1040. #if PACKETVER >= 20191106
  1041. #define MAX_CARTS 13 // used for another new cart design
  1042. #elif PACKETVER >= 20150826
  1043. #define MAX_CARTS 12 // used for 3 new cart design
  1044. #else
  1045. #define MAX_CARTS 9
  1046. #endif
  1047. #else
  1048. #define MAX_CARTS 5
  1049. #endif
  1050. #endif /* MMO_HPP */