summaryrefslogtreecommitdiff
path: root/src/map/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/log.c')
-rw-r--r--src/map/log.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/map/log.c b/src/map/log.c
index efb7fefbc..61679089b 100644
--- a/src/map/log.c
+++ b/src/map/log.c
@@ -2,8 +2,8 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2018 Hercules Dev Team
- * Copyright (C) Athena Dev Teams
+ * Copyright (C) 2012-2020 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -48,7 +48,7 @@ static char log_picktype2char(e_log_pick_type type)
switch( type ) {
case LOG_TYPE_TRADE: return 'T'; // (T)rade
case LOG_TYPE_VENDING: return 'V'; // (V)ending
- case LOG_TYPE_PICKDROP_PLAYER: return 'P'; // (P)player
+ case LOG_TYPE_PICKDROP_PLAYER: return 'P'; // (P)layer
case LOG_TYPE_PICKDROP_MONSTER: return 'M'; // (M)onster
case LOG_TYPE_NPC: return 'S'; // NPC (S)hop
case LOG_TYPE_SCRIPT: return 'N'; // (N)PC Script
@@ -75,6 +75,7 @@ static char log_picktype2char(e_log_pick_type type)
case LOG_TYPE_SKILL: return '1'; // Skill
case LOG_TYPE_REFINE: return '2'; // Refine
case LOG_TYPE_OTHER: return 'X'; // Other
+ case LOG_TYPE_ACHIEVEMENT: return '3'; // Achievement
}
// should not get here, fallback
@@ -106,7 +107,7 @@ static char log_chattype2char(e_log_chat_type type)
}
/// check if this item should be logged according the settings
-static bool should_log_item(int nameid, int amount, int refine, struct item_data *id)
+static bool should_log_item(int nameid, int amount, int refine_level, struct item_data *id)
{
int filter = logs->config.filter;
@@ -123,7 +124,7 @@ static bool should_log_item(int nameid, int amount, int refine, struct item_data
( filter&LOG_FILTER_PETITEM && ( id->type == IT_PETEGG || id->type == IT_PETARMOR ) ) ||
( filter&LOG_FILTER_PRICE && id->value_buy >= logs->config.price_items_log ) ||
( filter&LOG_FILTER_AMOUNT && abs(amount) >= logs->config.amount_items_log ) ||
- ( filter&LOG_FILTER_REFINE && refine >= logs->config.refine_items_log ) ||
+ ( filter&LOG_FILTER_REFINE && refine_level >= logs->config.refine_items_log ) ||
( filter&LOG_FILTER_CHANCE && ( ( id->maxchance != -1 && id->maxchance <= logs->config.rare_items_log ) || id->nameid == ITEMID_EMPERIUM ) )
)
return true;
@@ -511,7 +512,7 @@ static void log_sql_final(void)
/**
* Initializes logs->config variables
*/
-void log_set_defaults(void)
+static void log_set_defaults(void)
{
memset(&logs->config, 0, sizeof(logs->config));
@@ -540,7 +541,7 @@ void log_set_defaults(void)
*
* @retval false in case of error.
*/
-bool log_config_read_database(const char *filename, struct config_t *config, bool imported)
+static bool log_config_read_database(const char *filename, struct config_t *config, bool imported)
{
struct config_setting_t *setting = NULL;
@@ -596,7 +597,7 @@ bool log_config_read_database(const char *filename, struct config_t *config, boo
*
* @retval false in case of error.
*/
-bool log_config_read_filter_item(const char *filename, struct config_t *config, bool imported)
+static bool log_config_read_filter_item(const char *filename, struct config_t *config, bool imported)
{
struct config_setting_t *setting = NULL;
@@ -625,7 +626,7 @@ bool log_config_read_filter_item(const char *filename, struct config_t *config,
*
* @retval false in case of error.
*/
-bool log_config_read_filter_chat(const char *filename, struct config_t *config, bool imported)
+static bool log_config_read_filter_chat(const char *filename, struct config_t *config, bool imported)
{
struct config_setting_t *setting = NULL;
@@ -651,7 +652,7 @@ bool log_config_read_filter_chat(const char *filename, struct config_t *config,
*
* @retval false in case of error.
*/
-bool log_config_read_filter(const char *filename, struct config_t *config, bool imported)
+static bool log_config_read_filter(const char *filename, struct config_t *config, bool imported)
{
bool retval = true;
@@ -674,7 +675,7 @@ bool log_config_read_filter(const char *filename, struct config_t *config, bool
*
* @retval false in case of error.
*/
-bool log_config_read(const char *filename, bool imported)
+static bool log_config_read(const char *filename, bool imported)
{
struct config_t config;
struct config_setting_t *setting = NULL;
@@ -755,7 +756,7 @@ bool log_config_read(const char *filename, bool imported)
return retval;
}
-void log_config_complete(void)
+static void log_config_complete(void)
{
if( logs->config.sql_logs ) {
logs->pick_sub = log_pick_sub_sql;