diff options
author | Haru <haru@dotalux.com> | 2016-12-02 20:42:22 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-12-03 15:38:57 +0100 |
commit | 8a9e589446058b33972aff2c054f8c300b3fd1b7 (patch) | |
tree | 8e33ef34efc82403409265f6332c32aae801b6a6 /src/map/status.c | |
parent | 0f5fdca8945ec3afd5ba2e67a9d414f1ef5565c3 (diff) | |
download | hercules-8a9e589446058b33972aff2c054f8c300b3fd1b7.tar.gz hercules-8a9e589446058b33972aff2c054f8c300b3fd1b7.tar.bz2 hercules-8a9e589446058b33972aff2c054f8c300b3fd1b7.tar.xz hercules-8a9e589446058b33972aff2c054f8c300b3fd1b7.zip |
Change the argument to pc->famerank() to a rank type (instead of job mapid)
For consistency with `pc->addfame()`, the argument to pc->famerank() is
now an enum fame_list_type.
The function was renamed to `pc->fame_rank()` to avoid silently
compiling old non-compliant code.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/map/status.c b/src/map/status.c index fe412dce7..c0ce1ac38 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2276,7 +2276,7 @@ unsigned int status_get_base_maxsp(const struct map_session_data *sd, const stru val += val * 25 / 100; else if ((sd->job & JOBL_BABY) != 0) val = val * 70 / 100; - if ((sd->job & MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc->famerank(sd->status.char_id, MAPID_TAEKWON)) + if ((sd->job & MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc->fame_rank(sd->status.char_id, RANKTYPE_TAEKWON) > 0) val *= 3; //Triple max SP for top ranking Taekwons over level 90. val += val * st->int_ / 100; @@ -2303,7 +2303,7 @@ unsigned int status_get_base_maxhp(const struct map_session_data *sd, const stru else if ((sd->job & JOBL_BABY) != 0) val = val * 70 / 100; //Baby classes get a 30% hp penalty - if ((sd->job & MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc->famerank(sd->status.char_id, MAPID_TAEKWON)) + if ((sd->job & MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc->fame_rank(sd->status.char_id, RANKTYPE_TAEKWON)) val *= 3; //Triple max HP for top ranking Taekwons over level 90. val += val * st->vit / 100; // +1% per each point of VIT @@ -2510,8 +2510,9 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) if (sd->status.inventory[index].card[0]==CARD0_FORGE) { // Forged weapon wd->star += (sd->status.inventory[index].card[1]>>8); - if(wd->star >= 15) wd->star = 40; // 3 Star Crumbs now give +40 dmg - if(pc->famerank(MakeDWord(sd->status.inventory[index].card[2],sd->status.inventory[index].card[3]) ,MAPID_BLACKSMITH)) + if (wd->star >= 15) + wd->star = 40; // 3 Star Crumbs now give +40 dmg + if (pc->fame_rank(MakeDWord(sd->status.inventory[index].card[2],sd->status.inventory[index].card[3]), RANKTYPE_BLACKSMITH) > 0) wd->star += 10; if (!wa->ele) //Do not overwrite element from previous bonuses. |