char.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
  2. // For more information, see LICENCE in the main folder
  3. #ifndef _CHAR_H_
  4. #define _CHAR_H_
  5. #include "../common/core.h" // CORE_ST_LAST
  6. #include "../common/mmo.h"
  7. #ifndef TXT_SQL_CONVERT
  8. enum E_CHARSERVER_ST
  9. {
  10. CHARSERVER_ST_RUNNING = CORE_ST_LAST,
  11. CHARSERVER_ST_SHUTDOWN,
  12. CHARSERVER_ST_LAST
  13. };
  14. #endif
  15. #define MAX_MAP_SERVERS 30
  16. #define DEFAULT_AUTOSAVE_INTERVAL 300*1000
  17. struct character_data {
  18. struct mmo_charstatus status;
  19. int global_num;
  20. struct global_reg global[GLOBAL_REG_NUM];
  21. };
  22. struct mmo_charstatus* search_character(int aid, int cid);
  23. struct mmo_charstatus* search_character_byname(char* character_name);
  24. int search_character_index(char* character_name);
  25. char* search_character_name(int index);
  26. int search_character_online(int aid, int cid);
  27. int mapif_sendall(unsigned char *buf, unsigned int len);
  28. int mapif_sendallwos(int fd,unsigned char *buf, unsigned int len);
  29. int mapif_send(int fd,unsigned char *buf, unsigned int len);
  30. int char_married(int pl1,int pl2);
  31. int char_child(int parent_id, int child_id);
  32. int char_family(int cid1, int cid2, int cid3);
  33. int char_log(char *fmt, ...);
  34. int request_accreg2(int account_id, int char_id);
  35. int char_parse_Registry(int account_id, int char_id, unsigned char *buf, int len);
  36. int save_accreg2(unsigned char *buf, int len);
  37. int char_account_reg_reply(int fd,int account_id,int char_id);
  38. extern int char_name_option;
  39. extern char char_name_letters[];
  40. extern int autosave_interval;
  41. extern char db_path[];
  42. extern int guild_exp_rate;
  43. extern int log_inter;
  44. //Exported for use in the TXT-SQL converter.
  45. extern char char_txt[];
  46. int char_config_read(const char *cfgName);
  47. int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg, int *reg_num);
  48. int parse_friend_txt(struct mmo_charstatus *p);
  49. #endif /* _CHAR_H_ */