Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sc counters not being reset when a mob unit dies #3255

Merged
merged 1 commit into from
Dec 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions src/map/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -10596,7 +10596,19 @@ static int status_change_clear(struct block_list *bl, int type)

sc = status->get_sc(bl);

if (!sc || !sc->count)
if (sc == NULL)
return 0;

sc->opt1 = 0;
sc->opt2 = 0;
sc->opt3 = 0;
sc->bs_counter = 0;
sc->fv_counter = 0;
#ifndef RENEWAL
sc->sg_counter = 0;
#endif

if (sc->count == 0)
return 0;

for(i = 0; i < SC_MAX; i++) {
Expand Down Expand Up @@ -10630,15 +10642,6 @@ static int status_change_clear(struct block_list *bl, int type)
}
}

sc->opt1 = 0;
sc->opt2 = 0;
sc->opt3 = 0;
sc->bs_counter = 0;
sc->fv_counter = 0;
#ifndef RENEWAL
sc->sg_counter = 0;
#endif

if( type == 0 || type == 2 )
clif->changeoption(bl);

Expand Down
Loading