diff --git a/src/map/status.c b/src/map/status.c index ce4d27787b..b65da65c90 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -11156,7 +11156,18 @@ int status_change_clear(struct block_list* bl, int type) sc = status_get_sc(bl); - if (!sc || !sc->count) + if (!sc) + return 0; + + // Cleaning all extras vars + sc->comet_x = 0; + sc->comet_y = 0; +#ifndef RENEWAL + sc->sg_counter = 0; +#endif + sc->bs_counter = 0; + + if (!sc->count) return 0; for(i = 0; i < SC_MAX; i++) { @@ -11308,14 +11319,6 @@ int status_change_clear(struct block_list* bl, int type) sc->opt2 = 0; sc->opt3 = 0; - // Cleaning all extras vars - sc->comet_x = 0; - sc->comet_y = 0; -#ifndef RENEWAL - sc->sg_counter = 0; -#endif - sc->bs_counter = 0; - if( type == 0 || type == 2 ) clif_changeoption(bl);