char.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #include "../common/core.h"
  2. #include "../common/socket.h"
  3. #include "../common/timer.h"
  4. #include "../common/mmo.h"
  5. #include "../common/version.h"
  6. #include "../common/db.h"
  7. #ifndef _CHAR_H_
  8. #define _CHAR_H_
  9. #define MAX_MAP_SERVERS 30
  10. #define LAN_CONF_NAME "conf/lan_support.conf"
  11. #define DEFAULT_AUTOSAVE_INTERVAL 300*1000
  12. struct mmo_map_server{
  13. long ip;
  14. short port;
  15. int users;
  16. char map[MAX_MAP_PER_SERVER][16];
  17. };
  18. struct itemtmp {
  19. int flag;//checked = 1 else 0
  20. int id;
  21. short nameid;
  22. short amount;
  23. unsigned short equip;
  24. char identify;
  25. char refine;
  26. char attribute;
  27. short card[4];
  28. };
  29. enum {
  30. TABLE_INVENTORY,
  31. TABLE_CART,
  32. TABLE_STORAGE,
  33. TABLE_GUILD_STORAGE,
  34. };
  35. struct itemtemp{
  36. struct itemtmp equip[MAX_GUILD_STORAGE],notequip[MAX_GUILD_STORAGE];
  37. };
  38. int memitemdata_to_sql(struct itemtemp mapitem, int eqcount, int noteqcount, int char_id,int tableswitch);
  39. int mapif_sendall(char *buf,unsigned int len);
  40. int mapif_sendallwos(int fd,char *buf,unsigned int len);
  41. int mapif_send(int fd,char *buf,unsigned int len);
  42. extern int autosave_interval;
  43. extern char db_path[];
  44. extern char char_db[256];
  45. extern char cart_db[256];
  46. extern char inventory_db[256];
  47. extern char charlog_db[256];
  48. extern char storage_db[256];
  49. extern char interlog_db[256];
  50. extern char reg_db[256];
  51. extern char skill_db[256];
  52. extern char memo_db[256];
  53. extern char guild_db[256];
  54. extern char guild_alliance_db[256];
  55. extern char guild_castle_db[256];
  56. extern char guild_expulsion_db[256];
  57. extern char guild_member_db[256];
  58. extern char guild_position_db[256];
  59. extern char guild_skill_db[256];
  60. extern char guild_storage_db[256];
  61. extern char party_db[256];
  62. extern char pet_db[256];
  63. int db_use_sqldbs; // added for sql item_db read for char server [Valaris]
  64. extern char login_db_level[32];
  65. extern char login_db_account_id[32];
  66. extern int lowest_gm_level;
  67. extern int debug_mysql_query(char *file, int line, void *mysql, const char *q);
  68. #endif
  69. #include "inter.h"
  70. #include "int_pet.h"
  71. #include "int_guild.h"
  72. #include "int_party.h"
  73. #include "int_storage.h"