From 4e1ad8189f05a36b297d42e2d5ac24a76ae30f5f Mon Sep 17 00:00:00 2001 From: Kenpachi Developer Date: Sun, 28 Jun 2020 09:15:27 +0200 Subject: Call clif_status_change() instead of clif_status_change2() to re-apply status changes in clif_spawn() --- src/map/clif.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/map/clif.c b/src/map/clif.c index 649df3e33..43ac848d0 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1596,10 +1596,33 @@ static bool clif_spawn(struct block_list *bl) clif->specialeffect(bl,421,AREA); if (sd->bg_id != 0 && map->list[sd->bl.m].flag.battleground) clif->sendbgemblem_area(sd); - for (i = 0; i < sd->sc_display_count; i++) { - clif->sc_continue(&sd->bl, sd->bl.id, AREA, status->get_sc_icon(sd->sc_display[i]->type), sd->sc_display[i]->val1, sd->sc_display[i]->val2, sd->sc_display[i]->val3); + struct status_change *sc = status->get_sc(bl); + + if (sd->sc_display_count > 0 && sc != NULL) { + for (i = 0; i < sd->sc_display_count; i++) { + enum sc_type type = sd->sc_display[i]->type; + + if (sc->data[type] == NULL) + continue; + + int tick = 0; + int tid = sc->data[type]->timer; + const struct TimerData *td = (tid > 0) ? timer->get(tid) : NULL; + + if (td != NULL) + tick = DIFF_TICK32(td->tick, timer->gettick()); + + int sc_icon = status->get_sc_icon(type); + int sc_types = status->get_sc_relevant_bl_types(type); + int val1 = sd->sc_display[i]->val1; + int val2 = sd->sc_display[i]->val2; + int val3 = sd->sc_display[i]->val3; + + clif->status_change(&sd->bl, sc_icon, sc_types, 1, tick, val1, val2, val3); + } } + if (sd->charm_type != CHARM_TYPE_NONE && sd->charm_count > 0) clif->spiritcharm(sd); if (sd->status.look.robe != 0) -- cgit v1.2.3-70-g09d2