From ea9895e5261a1496bc8ac8e0c7be5fab3d6d4ef9 Mon Sep 17 00:00:00 2001 From: Dastgir Date: Sat, 12 Oct 2019 14:09:10 +0530 Subject: Seperated LOG_TYPE_LOOT to new ID --- src/map/log.c | 2 +- src/map/log.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src/map') diff --git a/src/map/log.c b/src/map/log.c index aa2f5f8f3..e4b5667e1 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -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 diff --git a/src/map/log.h b/src/map/log.h index 116d99bfd..80835645f 100644 --- a/src/map/log.h +++ b/src/map/log.h @@ -87,9 +87,8 @@ typedef enum e_log_pick_type { LOG_TYPE_QUEST = 0x02000000, LOG_TYPE_SKILL = 0x04000000, LOG_TYPE_REFINE = 0x08000000, + LOG_TYPE_LOOT = 0x10000000, - // combinations - LOG_TYPE_LOOT = LOG_TYPE_PICKDROP_MONSTER|LOG_TYPE_CONSUME, // all LOG_TYPE_ALL = 0xFFFFFFFF, } e_log_pick_type; -- cgit v1.2.3-70-g09d2 From 227c4416b86549364a3cfaac55295dd29fafed46 Mon Sep 17 00:00:00 2001 From: Dastgir Date: Sat, 12 Oct 2019 14:19:15 +0530 Subject: Added Achievement Logs --- conf/map/logs.conf | 1 + src/map/achievement.c | 4 ++-- src/map/log.c | 1 + src/map/log.h | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/map') diff --git a/conf/map/logs.conf b/conf/map/logs.conf index f9654da09..18450b2fe 100644 --- a/conf/map/logs.conf +++ b/conf/map/logs.conf @@ -64,6 +64,7 @@ map_log: { // 0x04000000 - (1) Skill // 0x08000000 - (2) Refine // 0x10000000 - (L) Log items looted by monsters + // 0x20000000 - (3) Achievements // Example: Log trades+vending+script items+created items: 1+2+32+1024 = 1059 // Please note that moving items from inventory to cart and back is not logged by design. enable: 0xFFFFFFFF diff --git a/src/map/achievement.c b/src/map/achievement.c index c2ebb5fdd..5215526a9 100644 --- a/src/map/achievement.c +++ b/src/map/achievement.c @@ -1051,10 +1051,10 @@ static void achievement_get_rewards_items(struct map_session_data *sd, const str if (!itemdb->isstackable(it.nameid)) { it.amount = 1; for (int j = 0; j < total; ++j) - pc->additem(sd, &it, 1, LOG_TYPE_SCRIPT); + pc->additem(sd, &it, 1, LOG_TYPE_ACHIEVEMENT); } else { it.amount = total; - pc->additem(sd, &it, total, LOG_TYPE_SCRIPT); + pc->additem(sd, &it, total, LOG_TYPE_ACHIEVEMENT); } } } diff --git a/src/map/log.c b/src/map/log.c index e4b5667e1..45335b16a 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -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 diff --git a/src/map/log.h b/src/map/log.h index 80835645f..5035e9526 100644 --- a/src/map/log.h +++ b/src/map/log.h @@ -88,6 +88,7 @@ typedef enum e_log_pick_type { LOG_TYPE_SKILL = 0x04000000, LOG_TYPE_REFINE = 0x08000000, LOG_TYPE_LOOT = 0x10000000, + LOG_TYPE_ACHIEVEMENT = 0x20000000, // all LOG_TYPE_ALL = 0xFFFFFFFF, -- cgit v1.2.3-70-g09d2