Skip to content

item log #2414

@AnnieRuru

Description

@AnnieRuru

no. 1

Hercules/src/map/log.c

Lines 48 to 52 in d452c74

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_MONSTER: return 'M'; // (M)onster

// Enable Logs? (Note 3)
// 0x0000000 - Don't log at all
// 0x0000001 - (T) Log trades
// 0x0000002 - (V) Log vending transactions
// 0x0000004 - (P) Log items drop/picked by players
// 0x0000008 - (L) Log items drop/looted by monsters

why the log.c says its 'M', but logs.conf says 'L' ?
also 'L' is actually LOG_TYPE_LOOT

no.2

Hercules/src/map/achievement.c

Lines 1031 to 1054 in d452c74

// TODO: kro send items by rodex
static void achievement_get_rewards_items(struct map_session_data *sd, const struct achievement_data *ad)
{
nullpo_retv(sd);
nullpo_retv(ad);
struct item it = { 0 };
it.identify = 1;
for (int i = 0; i < VECTOR_LENGTH(ad->rewards.item); i++) {
it.nameid = VECTOR_INDEX(ad->rewards.item, i).id;
int total = VECTOR_INDEX(ad->rewards.item, i).amount;
//Check if it's stackable.
if (!itemdb->isstackable(it.nameid)) {
it.amount = 1;
for (int j = 0; j < total; ++j)
pc->additem(sd, &it, 1, LOG_TYPE_SCRIPT);
} else {
it.amount = total;
pc->additem(sd, &it, total, LOG_TYPE_SCRIPT);
}
}
}

are you sure don't want to make another log type ... '3' or something ?
so make it sent by achievement system LOG_TYPE_MAIL ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    component:coreAffecting the Hercules core (i.e. not the game mechanics directly)type:enhancementIssue describes an enhancement or feature that should be implemented

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions