SG counter and other status variables (bugreport:7449)
- Fixed extra status variables not being cleared correctly when the killed unit did not have any status change (e.g. SG counter will now be set back to 0 when a monster dies) Reference: https://rathena.org/board/tracker/issue-7449-storm-gust-counter-does-not-get-reset-on-mob-dead/
This commit is contained in:
parent
644d809ddb
commit
9a130fa0e8
@ -11156,7 +11156,18 @@ int status_change_clear(struct block_list* bl, int type)
|
|||||||
|
|
||||||
sc = status_get_sc(bl);
|
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;
|
return 0;
|
||||||
|
|
||||||
for(i = 0; i < SC_MAX; i++) {
|
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->opt2 = 0;
|
||||||
sc->opt3 = 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 )
|
if( type == 0 || type == 2 )
|
||||||
clif_changeoption(bl);
|
clif_changeoption(bl);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user