mmo.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  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. // for produce
  48. #define MIN_ATTRIBUTE 0
  49. #define MAX_ATTRIBUTE 4
  50. #define ATTRIBUTE_NORMAL 0
  51. #define MIN_STAR 0
  52. #define MAX_STAR 3
  53. #define MIN_PORTAL_MEMO 0
  54. #define MAX_PORTAL_MEMO 2
  55. #define MAX_STATUS_TYPE 5
  56. #define WEDDING_RING_M 2634
  57. #define WEDDING_RING_F 2635
  58. #define CHAR_CONF_NAME "conf/char_athena.conf"
  59. struct item {
  60. int id;
  61. short nameid;
  62. short amount;
  63. unsigned short equip;
  64. char identify;
  65. char refine;
  66. char attribute;
  67. short card[4];
  68. };
  69. struct point{
  70. char map[24];
  71. short x,y;
  72. };
  73. struct skill {
  74. unsigned short id,lv,flag;
  75. };
  76. struct global_reg {
  77. char str[32];
  78. int value;
  79. };
  80. struct s_pet {
  81. int account_id;
  82. int char_id;
  83. int pet_id;
  84. short class;
  85. short level;
  86. short egg_id;//pet egg id
  87. short equip;//pet equip name_id
  88. short intimate;//pet friendly
  89. short hungry;//pet hungry
  90. char name[24];
  91. char rename_flag;
  92. char incuvate;
  93. };
  94. struct mmo_charstatus {
  95. int char_id;
  96. int account_id;
  97. int partner_id;
  98. int base_exp,job_exp,zeny;
  99. short class;
  100. short status_point,skill_point;
  101. int hp,max_hp,sp,max_sp;
  102. short option,karma,manner;
  103. short hair,hair_color,clothes_color;
  104. int party_id,guild_id,pet_id;
  105. short weapon,shield;
  106. short head_top,head_mid,head_bottom;
  107. char name[24];
  108. unsigned char base_level,job_level;
  109. short str,agi,vit,int_,dex,luk;
  110. unsigned char char_num,sex;
  111. unsigned long mapip;
  112. unsigned int mapport;
  113. struct point last_point,save_point,memo_point[10];
  114. struct item inventory[MAX_INVENTORY],cart[MAX_CART];
  115. struct skill skill[MAX_SKILL];
  116. int global_reg_num;
  117. struct global_reg global_reg[GLOBAL_REG_NUM];
  118. int account_reg_num;
  119. struct global_reg account_reg[ACCOUNT_REG_NUM];
  120. int account_reg2_num;
  121. struct global_reg account_reg2[ACCOUNT_REG2_NUM];
  122. // Friends list vars
  123. int friend_id[20];
  124. char friend_name[20][24];
  125. };
  126. struct storage {
  127. int account_id;
  128. short storage_status;
  129. short storage_amount;
  130. struct item storage[MAX_STORAGE];
  131. };
  132. struct guild_storage {
  133. int guild_id;
  134. short storage_status;
  135. short storage_amount;
  136. struct item storage[MAX_GUILD_STORAGE];
  137. };
  138. struct map_session_data;
  139. struct gm_account {
  140. int account_id;
  141. int level;
  142. };
  143. struct party_member {
  144. int account_id;
  145. char name[24],map[24];
  146. int leader,online,lv;
  147. struct map_session_data *sd;
  148. };
  149. struct party {
  150. int party_id;
  151. char name[24];
  152. int exp;
  153. int item;
  154. struct party_member member[MAX_PARTY];
  155. };
  156. struct guild_member {
  157. int account_id, char_id;
  158. short hair,hair_color,gender,class,lv;
  159. int exp,exp_payper;
  160. short online,position;
  161. int rsv1,rsv2;
  162. char name[24];
  163. struct map_session_data *sd;
  164. };
  165. struct guild_position {
  166. char name[24];
  167. int mode;
  168. int exp_mode;
  169. };
  170. struct guild_alliance {
  171. int opposition;
  172. int guild_id;
  173. char name[24];
  174. };
  175. struct guild_explusion {
  176. char name[24];
  177. char mes[40];
  178. char acc[40];
  179. int account_id;
  180. int rsv1,rsv2,rsv3;
  181. };
  182. struct guild_skill {
  183. int id,lv;
  184. };
  185. struct guild {
  186. int guild_id;
  187. short guild_lv, connect_member, max_member, average_lv;
  188. int exp,next_exp,skill_point,castle_id;
  189. char name[24],master[24];
  190. struct guild_member member[MAX_GUILD];
  191. struct guild_position position[MAX_GUILDPOSITION];
  192. char mes1[60],mes2[120];
  193. int emblem_len,emblem_id;
  194. char emblem_data[2048];
  195. struct guild_alliance alliance[MAX_GUILDALLIANCE];
  196. struct guild_explusion explusion[MAX_GUILDEXPLUSION];
  197. struct guild_skill skill[MAX_GUILDSKILL];
  198. };
  199. struct guild_castle {
  200. int castle_id;
  201. char map_name[24];
  202. char castle_name[24];
  203. char castle_event[24];
  204. int guild_id;
  205. int economy;
  206. int defense;
  207. int triggerE;
  208. int triggerD;
  209. int nextTime;
  210. int payTime;
  211. int createTime;
  212. int visibleC;
  213. int visibleG0;
  214. int visibleG1;
  215. int visibleG2;
  216. int visibleG3;
  217. int visibleG4;
  218. int visibleG5;
  219. int visibleG6;
  220. int visibleG7;
  221. int Ghp0; // added Guardian HP [Valaris]
  222. int Ghp1;
  223. int Ghp2;
  224. int Ghp3;
  225. int Ghp4;
  226. int Ghp5;
  227. int Ghp6;
  228. int Ghp7;
  229. int GID0;
  230. int GID1;
  231. int GID2;
  232. int GID3;
  233. int GID4;
  234. int GID5;
  235. int GID6;
  236. int GID7; // end addition [Valaris]
  237. };
  238. struct square {
  239. int val1[5];
  240. int val2[5];
  241. };
  242. enum {
  243. GBI_EXP =1, // ギルドのEXP
  244. GBI_GUILDLV =2, // ギルドのLv
  245. GBI_SKILLPOINT =3, // ギルドのスキルポイント
  246. GBI_SKILLLV =4, // ギルドスキルLv
  247. GMI_POSITION =0, // メンバーの役職変更
  248. GMI_EXP =1, // メンバーのEXP
  249. };
  250. #ifndef _WIN32
  251. #ifndef strcmpi
  252. #define strcmpi strcasecmp
  253. #endif
  254. #ifndef stricmp
  255. #define stricmp strcasecmp
  256. #endif
  257. #ifndef strncmpi
  258. #define strncmpi strncasecmp
  259. #endif
  260. #ifndef strnicmp
  261. #define strnicmp strncasecmp
  262. #endif
  263. #ifndef strrchr
  264. #define strrchr rindex
  265. #endif
  266. #endif
  267. #endif // _MMO_H_