diff options
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 8bedeb669..0781cb44c 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1369,8 +1369,9 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) // custom merchant shop exp bonus if( battle_config.shop_exp > 0 && z > 0 && (skill = pc_checkskill(sd,MC_DISCOUNT)) > 0 ) { - if( sd->status.skill[MC_DISCOUNT].flag != 0 ) - skill = sd->status.skill[MC_DISCOUNT].flag - 2; + if( sd->status.skill[MC_DISCOUNT].flag >= SKILL_FLAG_REPLACED_LV_0 ) + skill = sd->status.skill[MC_DISCOUNT].flag - SKILL_FLAG_REPLACED_LV_0; + if( skill > 0 ) { z = z * (double)skill * (double)battle_config.shop_exp/10000.; @@ -1505,8 +1506,9 @@ int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list) // custom merchant shop exp bonus if( battle_config.shop_exp > 0 && z > 0 && ( skill = pc_checkskill(sd,MC_OVERCHARGE) ) > 0) { - if( sd->status.skill[MC_OVERCHARGE].flag != 0 ) - skill = sd->status.skill[MC_OVERCHARGE].flag - 2; + if( sd->status.skill[MC_OVERCHARGE].flag >= SKILL_FLAG_REPLACED_LV_0 ) + skill = sd->status.skill[MC_OVERCHARGE].flag - SKILL_FLAG_REPLACED_LV_0; + if( skill > 0 ) { z = z * (double)skill * (double)battle_config.shop_exp/10000.; |