1 | // Copyright (c) Athena Dev Teams - Licensed under GNU GPL |
---|
2 | // For more information, see LICENCE in the main folder |
---|
3 | |
---|
4 | #ifndef _LOG_H_ |
---|
5 | #define _LOG_H_ |
---|
6 | |
---|
7 | //#include "map.h" |
---|
8 | struct map_session_data; |
---|
9 | struct mob_data; |
---|
10 | struct item; |
---|
11 | |
---|
12 | //New logs |
---|
13 | int log_pick_pc(struct map_session_data *sd, const char *type, int nameid, int amount, struct item *itm); |
---|
14 | int log_pick_mob(struct mob_data *md, const char *type, int nameid, int amount, struct item *itm); |
---|
15 | int log_zeny(struct map_session_data *sd, char *type, struct map_session_data *src_sd, int amount); |
---|
16 | |
---|
17 | int log_npc(struct map_session_data *sd, const char *message); |
---|
18 | int log_chat(const char* type, int type_id, int src_charid, int src_accid, const char* map, int x, int y, const char* dst_charname, const char* message); |
---|
19 | int log_atcommand(struct map_session_data *sd, const char *message); |
---|
20 | |
---|
21 | //Old, but useful logs |
---|
22 | int log_branch(struct map_session_data *sd); |
---|
23 | int log_mvpdrop(struct map_session_data *sd, int monster_id, int *log_mvp); |
---|
24 | |
---|
25 | int log_config_read(char *cfgName); |
---|
26 | |
---|
27 | typedef enum log_what { |
---|
28 | LOG_ALL = 0xFFFF, |
---|
29 | LOG_TRADES = 0x0002, |
---|
30 | LOG_VENDING = 0x0004, |
---|
31 | LOG_PLAYER_ITEMS = 0x0008, // dropped/picked |
---|
32 | LOG_MONSTER_ITEMS = 0x0010, // dropped/looted |
---|
33 | LOG_NPC_TRANSACTIONS = 0x0020, // npc shops? |
---|
34 | LOG_SCRIPT_TRANSACTIONS = 0x0040, |
---|
35 | LOG_STOLEN_ITEMS = 0x0080, // stolen from mobs |
---|
36 | LOG_USED_ITEMS = 0x0100, // used by player |
---|
37 | LOG_MVP_PRIZE = 0x0200, |
---|
38 | LOG_COMMAND_ITEMS = 0x0400, // created/deleted through @/# commands |
---|
39 | LOG_STORAGE_ITEMS = 0x0800, // placed/retrieved from storage |
---|
40 | LOG_GSTORAGE_ITEMS = 0x1000, // placed/retrieved from guild storage |
---|
41 | LOG_MAILS = 0x2000 // mail system transactions |
---|
42 | } log_what; |
---|
43 | |
---|
44 | extern struct Log_Config { |
---|
45 | enum log_what enable_logs; |
---|
46 | int filter; |
---|
47 | bool sql_logs; |
---|
48 | int rare_items_log,refine_items_log,price_items_log,amount_items_log; //for filter |
---|
49 | int branch, drop, mvpdrop, zeny, gm, npc, chat; |
---|
50 | char log_branch[64], log_pick[64], log_zeny[64], log_mvpdrop[64], log_gm[64], log_npc[64], log_chat[64]; |
---|
51 | char log_branch_db[32], log_pick_db[32], log_zeny_db[32], log_mvpdrop_db[32], log_gm_db[32], log_npc_db[32], log_chat_db[32]; |
---|
52 | } log_config; |
---|
53 | |
---|
54 | #endif /* _LOG_H_ */ |
---|