diff options
author | shennetsind <ind@henn.et> | 2013-04-22 18:28:18 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-04-22 18:28:18 -0300 |
commit | 19b8cbb835e867febb597b34187f6bbca48cbe7b (patch) | |
tree | 02ffe058dc91d2b79c81783cbd50afc295c25d76 /src/map/log.h | |
parent | d8d392b0a37c122b303d04e92ebc7fb826e53bce (diff) | |
download | hercules-19b8cbb835e867febb597b34187f6bbca48cbe7b.tar.gz hercules-19b8cbb835e867febb597b34187f6bbca48cbe7b.tar.bz2 hercules-19b8cbb835e867febb597b34187f6bbca48cbe7b.tar.xz hercules-19b8cbb835e867febb597b34187f6bbca48cbe7b.zip |
Hercules April 22 MEGA-ULTRA-LONG Patch~!
http://hercules.ws/board/topic/470-hercules-april-22-patch/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/log.h')
-rw-r--r-- | src/map/log.h | 84 |
1 files changed, 41 insertions, 43 deletions
diff --git a/src/map/log.h b/src/map/log.h index a40a3fcf4..462a12ff5 100644 --- a/src/map/log.h +++ b/src/map/log.h @@ -1,18 +1,18 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena Dev Teams #ifndef _LOG_H_ #define _LOG_H_ -//#include "map.h" struct block_list; struct map_session_data; struct mob_data; struct item; +struct item_data; -typedef enum e_log_chat_type -{ +typedef enum e_log_chat_type { LOG_CHAT_GLOBAL = 0x01, LOG_CHAT_WHISPER = 0x02, LOG_CHAT_PARTY = 0x04, @@ -20,12 +20,10 @@ typedef enum e_log_chat_type LOG_CHAT_MAINCHAT = 0x10, // all LOG_CHAT_ALL = 0xFF, -} -e_log_chat_type; +} e_log_chat_type; -typedef enum e_log_pick_type -{ +typedef enum e_log_pick_type { LOG_TYPE_NONE = 0, LOG_TYPE_TRADE = 0x00001, LOG_TYPE_VENDING = 0x00002, @@ -48,42 +46,42 @@ typedef enum e_log_pick_type LOG_TYPE_LOOT = LOG_TYPE_PICKDROP_MONSTER|LOG_TYPE_CONSUME, // all LOG_TYPE_ALL = 0xFFFFF, -} -e_log_pick_type; +} e_log_pick_type; +struct log_interface { + struct { + e_log_pick_type enable_logs; + int filter; + bool sql_logs; + bool log_chat_woe_disable; + int rare_items_log,refine_items_log,price_items_log,amount_items_log; + int branch, mvpdrop, zeny, commands, npc, chat; + char log_branch[64], log_pick[64], log_zeny[64], log_mvpdrop[64], log_gm[64], log_npc[64], log_chat[64]; + } config; + /* */ + void (*pick_pc) (struct map_session_data* sd, e_log_pick_type type, int amount, struct item* itm, struct item_data *data); + void (*pick_mob) (struct mob_data* md, e_log_pick_type type, int amount, struct item* itm, struct item_data *data); + void (*zeny) (struct map_session_data* sd, e_log_pick_type type, struct map_session_data* src_sd, int amount); + void (*npc) (struct map_session_data* sd, const char *message); + void (*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); + void (*atcommand) (struct map_session_data* sd, const char* message); + void (*branch) (struct map_session_data* sd); + void (*mvpdrop) (struct map_session_data* sd, int monster_id, int* log_mvp); + + void (*pick_sub) (int id, int16 m, e_log_pick_type type, int amount, struct item* itm, struct item_data *data); + void (*zeny_sub) (struct map_session_data* sd, e_log_pick_type type, struct map_session_data* src_sd, int amount); + void (*npc_sub) (struct map_session_data* sd, const char *message); + void (*chat_sub) (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); + void (*atcommand_sub) (struct map_session_data* sd, const char* message); + void (*branch_sub) (struct map_session_data* sd); + void (*mvpdrop_sub) (struct map_session_data* sd, int monster_id, int* log_mvp); + + int (*config_read) (const char* cfgName); + void (*config_done) (void); +} log_s; -/// new logs -void log_pick_pc(struct map_session_data* sd, e_log_pick_type type, int amount, struct item* itm); -void log_pick_mob(struct mob_data* md, e_log_pick_type type, int amount, struct item* itm); -void log_zeny(struct map_session_data* sd, e_log_pick_type type, struct map_session_data* src_sd, int amount); - -void log_npc(struct map_session_data* sd, const char *message); -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); -void log_atcommand(struct map_session_data* sd, const char* message); - -/// old, but useful logs -void log_branch(struct map_session_data* sd); -void log_mvpdrop(struct map_session_data* sd, int monster_id, int* log_mvp); - -int log_config_read(const char* cfgName); - -extern struct Log_Config -{ - e_log_pick_type enable_logs; - int filter; - bool sql_logs; - bool log_chat_woe_disable; - int rare_items_log,refine_items_log,price_items_log,amount_items_log; //for filter - int branch, mvpdrop, zeny, commands, npc, chat; - char log_branch[64], log_pick[64], log_zeny[64], log_mvpdrop[64], log_gm[64], log_npc[64], log_chat[64]; -} -log_config; +struct log_interface *logs; -#ifdef BETA_THREAD_TEST - struct { - char** entry; - int count; - } logThreadData; -#endif +void log_defaults(void); #endif /* _LOG_H_ */ |