log.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
  2. // For more information, see LICENCE in the main folder
  3. #ifndef _LOG_H_
  4. #define _LOG_H_
  5. //#include "map.h"
  6. struct map_session_data;
  7. struct block_list;
  8. struct mob_data;
  9. struct item;
  10. typedef enum e_log_chat_type
  11. {
  12. LOG_CHAT_GLOBAL = 0x01,
  13. LOG_CHAT_WHISPER = 0x02,
  14. LOG_CHAT_PARTY = 0x04,
  15. LOG_CHAT_GUILD = 0x08,
  16. LOG_CHAT_MAINCHAT = 0x10,
  17. // all
  18. LOG_CHAT_ALL = 0xFF,
  19. }
  20. e_log_chat_type;
  21. typedef enum e_log_pick_type
  22. {
  23. LOG_TYPE_TRADE = 0x0001,
  24. LOG_TYPE_VENDING = 0x0002,
  25. LOG_TYPE_PICKDROP_PLAYER = 0x0004,
  26. LOG_TYPE_PICKDROP_MONSTER = 0x0008,
  27. LOG_TYPE_NPC = 0x0010,
  28. LOG_TYPE_SCRIPT = 0x0020,
  29. //LOG_TYPE_STEAL = 0x0040,
  30. LOG_TYPE_CONSUME = 0x0080,
  31. //LOG_TYPE_PRODUCE = 0x0100,
  32. //LOG_TYPE_MVP = 0x0200,
  33. LOG_TYPE_COMMAND = 0x0400,
  34. LOG_TYPE_STORAGE = 0x0800,
  35. LOG_TYPE_GSTORAGE = 0x1000,
  36. LOG_TYPE_MAIL = 0x2000,
  37. //LOG_TYPE_AUCTION = 0x4000,
  38. LOG_TYPE_BUYING_STORE = 0x8000,
  39. // combinations
  40. LOG_TYPE_LOOT = LOG_TYPE_PICKDROP_MONSTER|LOG_TYPE_CONSUME,
  41. // all
  42. LOG_TYPE_ALL = 0xFFFF,
  43. }
  44. e_log_pick_type;
  45. //New logs
  46. void log_pick_pc(struct map_session_data *sd, e_log_pick_type type, int nameid, int amount, struct item *itm);
  47. void log_pick_mob(struct mob_data *md, e_log_pick_type type, int nameid, int amount, struct item *itm);
  48. void log_pick(struct block_list* bl, e_log_pick_type type, int nameid, int amount, struct item* itm);
  49. void log_zeny(struct map_session_data *sd, e_log_pick_type type, struct map_session_data *src_sd, int amount);
  50. void log_npc(struct map_session_data *sd, const char *message);
  51. void log_chat(e_log_chat_type type, int type_id, int src_charid, int src_accid, const char* map, int x, int y, const char* dst_charname, const char* message);
  52. void log_atcommand(struct map_session_data *sd, int cmdlvl, const char *message);
  53. //Old, but useful logs
  54. void log_branch(struct map_session_data *sd);
  55. void log_mvpdrop(struct map_session_data *sd, int monster_id, int *log_mvp);
  56. int log_config_read(char *cfgName);
  57. extern struct Log_Config
  58. {
  59. e_log_pick_type enable_logs;
  60. int filter;
  61. bool sql_logs;
  62. bool log_chat_woe_disable;
  63. int rare_items_log,refine_items_log,price_items_log,amount_items_log; //for filter
  64. int branch, mvpdrop, zeny, gm, npc, chat;
  65. char log_branch[64], log_pick[64], log_zeny[64], log_mvpdrop[64], log_gm[64], log_npc[64], log_chat[64];
  66. }
  67. log_config;
  68. #endif /* _LOG_H_ */