mmo.h 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. // $Id: mmo.h,v 1.3 2004/09/25 20:12:25 PoW Exp $
  2. // Original : mmo.h 2003/03/14 12:07:02 Rev.1.7
  3. #ifndef _MMO_H_
  4. #define _MMO_H_
  5. #include <time.h>
  6. #include "utils.h" // _WIN32
  7. #ifdef CYGWIN
  8. // txtやlogなどの書き出すファイルの改行コード
  9. #define RETCODE "\r\n" // (CR/LF:Windows系)
  10. #else
  11. #define RETCODE "\n" // (LF:Unix系)
  12. #endif
  13. #define RET RETCODE
  14. #define FIFOSIZE_SERVERLINK 128*1024
  15. // set to 0 to not check IP of player between each server.
  16. // set to another value if you want to check (1)
  17. #define CMP_AUTHFIFO_IP 1
  18. #define CMP_AUTHFIFO_LOGIN2 1
  19. #define MAX_MAP_PER_SERVER 512
  20. #define MAX_INVENTORY 100
  21. #define MAX_AMOUNT 30000
  22. #define MAX_ZENY 1000000000 // 1G zeny
  23. #define MAX_CART 100
  24. #define MAX_SKILL 450
  25. #define GLOBAL_REG_NUM 96
  26. #define ACCOUNT_REG_NUM 16
  27. #define ACCOUNT_REG2_NUM 16
  28. #define DEFAULT_WALK_SPEED 150
  29. #define MIN_WALK_SPEED 0
  30. #define MAX_WALK_SPEED 1000
  31. #define MAX_STORAGE 300
  32. #define MAX_GUILD_STORAGE 1000
  33. #define MAX_PARTY 12
  34. #define MAX_GUILD 36 // increased max guild members to accomodate for +2 increase for extension levels [Valaris] (removed) [PoW]
  35. #define MAX_GUILDPOSITION 20 // increased max guild positions to accomodate for all members [Valaris] (removed) [PoW]
  36. #define MAX_GUILDEXPLUSION 32
  37. #define MAX_GUILDALLIANCE 16
  38. #define MAX_GUILDSKILL 15 // increased max guild skills because of new skills [Sara-chan]
  39. #define MAX_GUILDCASTLE 24 // increased to include novice castles [Valaris]
  40. #define MAX_GUILDLEVEL 50
  41. #define MIN_HAIR_STYLE battle_config.min_hair_style
  42. #define MAX_HAIR_STYLE battle_config.max_hair_style
  43. #define MIN_HAIR_COLOR battle_config.min_hair_color
  44. #define MAX_HAIR_COLOR battle_config.max_hair_color
  45. #define MIN_CLOTH_COLOR battle_config.min_cloth_color
  46. #define MAX_CLOTH_COLOR battle_config.max_cloth_color
  47. #define MIN_CHAR_ID 150000 // shouldn't ever be changed, the client requires this min value [Ajarn]
  48. // for produce
  49. #define MIN_ATTRIBUTE 0
  50. #define MAX_ATTRIBUTE 4
  51. #define ATTRIBUTE_NORMAL 0
  52. #define MIN_STAR 0
  53. #define MAX_STAR 3
  54. #define MIN_PORTAL_MEMO 0
  55. #define MAX_PORTAL_MEMO 2
  56. #define MAX_STATUS_TYPE 5
  57. #define WEDDING_RING_M 2634
  58. #define WEDDING_RING_F 2635
  59. #define CHAR_CONF_NAME "conf/char_athena.conf"
  60. struct item {
  61. int id;
  62. short nameid;
  63. short amount;
  64. unsigned short equip;
  65. char identify;
  66. char refine;
  67. char attribute;
  68. short card[4];
  69. };
  70. struct point{
  71. char map[24];
  72. short x,y;
  73. };
  74. struct skill {
  75. unsigned short id,lv,flag;
  76. };
  77. struct global_reg {
  78. char str[32];
  79. int value;
  80. };
  81. struct s_pet {
  82. int account_id;
  83. int char_id;
  84. int pet_id;
  85. short class;
  86. short level;
  87. short egg_id;//pet egg id
  88. short equip;//pet equip name_id
  89. short intimate;//pet friendly
  90. short hungry;//pet hungry
  91. char name[24];
  92. char rename_flag;
  93. char incuvate;
  94. };
  95. struct mmo_charstatus {
  96. int char_id;
  97. int account_id;
  98. int partner_id;
  99. int base_exp,job_exp,zeny;
  100. short class;
  101. short status_point,skill_point;
  102. int hp,max_hp,sp,max_sp;
  103. short option,karma,manner;
  104. short hair,hair_color,clothes_color;
  105. int party_id,guild_id,pet_id;
  106. short weapon,shield;
  107. short head_top,head_mid,head_bottom;
  108. char name[24];
  109. unsigned char base_level,job_level;
  110. short str,agi,vit,int_,dex,luk;
  111. unsigned char char_num,sex;
  112. unsigned long mapip;
  113. unsigned int mapport;
  114. struct point last_point,save_point,memo_point[10];
  115. struct item inventory[MAX_INVENTORY],cart[MAX_CART];
  116. struct skill skill[MAX_SKILL];
  117. int global_reg_num;
  118. struct global_reg global_reg[GLOBAL_REG_NUM];
  119. int account_reg_num;
  120. struct global_reg account_reg[ACCOUNT_REG_NUM];
  121. int account_reg2_num;
  122. struct global_reg account_reg2[ACCOUNT_REG2_NUM];
  123. // Friends list vars
  124. int friend_id[20];
  125. char friend_name[20][24];
  126. };
  127. struct storage {
  128. int account_id;
  129. short storage_status;
  130. short storage_amount;
  131. struct item storage[MAX_STORAGE];
  132. };
  133. struct guild_storage {
  134. int guild_id;
  135. short storage_status;
  136. short storage_amount;
  137. struct item storage[MAX_GUILD_STORAGE];
  138. };
  139. struct map_session_data;
  140. struct gm_account {
  141. int account_id;
  142. int level;
  143. };
  144. struct party_member {
  145. int account_id;
  146. char name[24],map[24];
  147. int leader,online,lv;
  148. struct map_session_data *sd;
  149. };
  150. struct party {
  151. int party_id;
  152. char name[24];
  153. int exp;
  154. int item;
  155. struct party_member member[MAX_PARTY];
  156. };
  157. struct guild_member {
  158. int account_id, char_id;
  159. short hair,hair_color,gender,class,lv;
  160. int exp,exp_payper;
  161. short online,position;
  162. int rsv1,rsv2;
  163. char name[24];
  164. struct map_session_data *sd;
  165. };
  166. struct guild_position {
  167. char name[24];
  168. int mode;
  169. int exp_mode;
  170. };
  171. struct guild_alliance {
  172. int opposition;
  173. int guild_id;
  174. char name[24];
  175. };
  176. struct guild_explusion {
  177. char name[24];
  178. char mes[40];
  179. char acc[40];
  180. int account_id;
  181. int rsv1,rsv2,rsv3;
  182. };
  183. struct guild_skill {
  184. int id,lv;
  185. };
  186. struct guild {
  187. int guild_id;
  188. short guild_lv, connect_member, max_member, average_lv;
  189. int exp,next_exp,skill_point,castle_id;
  190. char name[24],master[24];
  191. struct guild_member member[MAX_GUILD];
  192. struct guild_position position[MAX_GUILDPOSITION];
  193. char mes1[60],mes2[120];
  194. int emblem_len,emblem_id;
  195. char emblem_data[2048];
  196. struct guild_alliance alliance[MAX_GUILDALLIANCE];
  197. struct guild_explusion explusion[MAX_GUILDEXPLUSION];
  198. struct guild_skill skill[MAX_GUILDSKILL];
  199. };
  200. struct guild_castle {
  201. int castle_id;
  202. char map_name[24];
  203. char castle_name[24];
  204. char castle_event[24];
  205. int guild_id;
  206. int economy;
  207. int defense;
  208. int triggerE;
  209. int triggerD;
  210. int nextTime;
  211. int payTime;
  212. int createTime;
  213. int visibleC;
  214. int visibleG0;
  215. int visibleG1;
  216. int visibleG2;
  217. int visibleG3;
  218. int visibleG4;
  219. int visibleG5;
  220. int visibleG6;
  221. int visibleG7;
  222. int Ghp0; // added Guardian HP [Valaris]
  223. int Ghp1;
  224. int Ghp2;
  225. int Ghp3;
  226. int Ghp4;
  227. int Ghp5;
  228. int Ghp6;
  229. int Ghp7;
  230. int GID0;
  231. int GID1;
  232. int GID2;
  233. int GID3;
  234. int GID4;
  235. int GID5;
  236. int GID6;
  237. int GID7; // end addition [Valaris]
  238. };
  239. struct square {
  240. int val1[5];
  241. int val2[5];
  242. };
  243. enum {
  244. GBI_EXP =1, // ギルドのEXP
  245. GBI_GUILDLV =2, // ギルドのLv
  246. GBI_SKILLPOINT =3, // ギルドのスキルポイント
  247. GBI_SKILLLV =4, // ギルドスキルLv
  248. GMI_POSITION =0, // メンバーの役職変更
  249. GMI_EXP =1, // メンバーのEXP
  250. };
  251. enum {
  252. GD_SKILLBASE=10000,
  253. GD_APPROVAL=10000,
  254. GD_KAFRACONTACT=10001,
  255. GD_GUARDIANRESEARCH=10002,
  256. GD_CHARISMA=10003,
  257. GD_GUARDUP=10003,
  258. GD_EXTENSION=10004,
  259. GD_GLORYGUILD=10005,
  260. GD_LEADERSHIP=10006,
  261. GD_GLORYWOUNDS=10007,
  262. GD_SOULCOLD=10008,
  263. GD_HAWKEYES=10009,
  264. GD_BATTLEORDER=10010,
  265. GD_REGENERATION=10011,
  266. GD_RESTORE=10012,
  267. GD_EMERGENCYCALL=10013,
  268. GD_DEVELOPMENT=10014,
  269. };
  270. #ifndef _WIN32
  271. #ifndef strcmpi
  272. #define strcmpi strcasecmp
  273. #endif
  274. #ifndef stricmp
  275. #define stricmp strcasecmp
  276. #endif
  277. #ifndef strncmpi
  278. #define strncmpi strncasecmp
  279. #endif
  280. #ifndef strnicmp
  281. #define strnicmp strncasecmp
  282. #endif
  283. #ifndef strrchr
  284. #define strrchr rindex
  285. #endif
  286. #endif
  287. #endif // _MMO_H_