diff options
author | Haru <haru@dotalux.com> | 2019-10-18 16:38:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-18 16:38:55 +0200 |
commit | 29b587ae936fc76828cb3982de8c43caaea5fe86 (patch) | |
tree | a4f08a758dbd52bc53eb1a0b87cc20b5953b78f5 /src | |
parent | 9ccfb2defb07670b4f350ed5853ae1a997d917d2 (diff) | |
parent | cf7ae9dc524231c41bbdc806451c928a24e146fa (diff) | |
download | hercules-29b587ae936fc76828cb3982de8c43caaea5fe86.tar.gz hercules-29b587ae936fc76828cb3982de8c43caaea5fe86.tar.bz2 hercules-29b587ae936fc76828cb3982de8c43caaea5fe86.tar.xz hercules-29b587ae936fc76828cb3982de8c43caaea5fe86.zip |
Merge pull request #2549 from skyleo/party_invis_hpbar_fix
Fix HP bar not showing when unhiding in a party
Diffstat (limited to 'src')
-rw-r--r-- | src/map/status.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/map/status.c b/src/map/status.c index 71cce28c5..6d37032c0 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -10189,7 +10189,7 @@ static void status_change_start_stop_action(struct block_list *bl, enum sc_type switch (type) { case SC_VACUUM_EXTREME: if (!map_flag_gvg(bl->m)) - unit->stop_walking(bl,1); + unit->stop_walking(bl, STOPWALKING_FLAG_FIXPOS); break; case SC_FREEZE: case SC_STUN: @@ -10742,9 +10742,7 @@ static int status_change_end_(struct block_list *bl, enum sc_type type, int tid, struct status_data *st; struct view_data *vd; int opt_flag=0, calc_flag; -#ifdef ANTI_MAYAP_CHEAT bool invisible = false; -#endif nullpo_ret(bl); @@ -10799,10 +10797,8 @@ static int status_change_end_(struct block_list *bl, enum sc_type type, int tid, status->display_remove(sd,type); } -#ifdef ANTI_MAYAP_CHEAT - if (sc->option&(OPTION_HIDE|OPTION_CLOAK|OPTION_INVISIBLE)) + if ((sc->option & (OPTION_HIDE | OPTION_CLOAK | OPTION_INVISIBLE)) != 0) invisible = true; -#endif vd = status->get_viewdata(bl); calc_flag = status->dbs->ChangeFlagTable[type]; @@ -11429,6 +11425,12 @@ static int status_change_end_(struct block_list *bl, enum sc_type type, int tid, } #endif + // update HP bar when becoming visible again + if (invisible && (sc->option & (OPTION_HIDE | OPTION_CLOAK | OPTION_INVISIBLE)) == 0) { + if (sd != NULL && battle_config.party_hp_mode == 0 && sd->status.party_id != 0) + clif->party_hp(sd); + } + if (calc_flag&SCB_DYE) { //Restore DYE color if (vd && !vd->cloth_color && sce->val4) clif->changelook(bl,LOOK_CLOTHES_COLOR,sce->val4); |