Cleaned up status_change_end (#7211)
* Removed leftover old debug info that made it necessary to the hide the real function behind a define. * Introduced a C++ default argument for timer id, as the timer id is only needed a single time, when the status expires naturally. * Replaced all currently existing calls that had INVALID_TIMER as argument and made use of the new default argument.
This commit is contained in:
@@ -12170,7 +12170,7 @@ BUILDIN_FUNC(sc_end)
|
||||
|
||||
//This should help status_change_end force disabling the SC in case it has no limit.
|
||||
sce->val1 = sce->val2 = sce->val3 = sce->val4 = 0;
|
||||
status_change_end(bl, (sc_type)type, INVALID_TIMER);
|
||||
status_change_end(bl, (sc_type)type);
|
||||
} else
|
||||
status_change_clear(bl, 3); // remove all effects
|
||||
|
||||
@@ -22201,7 +22201,7 @@ BUILDIN_FUNC(setmounting) {
|
||||
script_pushint(st, 0); // Silent failure
|
||||
} else {
|
||||
if( sd->sc.data[SC_ALL_RIDING] )
|
||||
status_change_end(&sd->bl, SC_ALL_RIDING, INVALID_TIMER); //release mount
|
||||
status_change_end(&sd->bl, SC_ALL_RIDING); //release mount
|
||||
else
|
||||
sc_start(NULL, &sd->bl, SC_ALL_RIDING, 10000, 1, INFINITE_TICK); //mount
|
||||
script_pushint(st,1);//in both cases, return 1.
|
||||
@@ -23107,10 +23107,10 @@ BUILDIN_FUNC(montransform) {
|
||||
}
|
||||
|
||||
if (!strcmp(script_getfuncname(st), "active_transform")) {
|
||||
status_change_end(&sd->bl, SC_ACTIVE_MONSTER_TRANSFORM, INVALID_TIMER); // Clear previous
|
||||
status_change_end(&sd->bl, SC_ACTIVE_MONSTER_TRANSFORM); // Clear previous
|
||||
sc_start2(NULL, &sd->bl, SC_ACTIVE_MONSTER_TRANSFORM, 100, mob_id, type, tick);
|
||||
} else {
|
||||
status_change_end(&sd->bl, SC_MONSTER_TRANSFORM, INVALID_TIMER); // Clear previous
|
||||
status_change_end(&sd->bl, SC_MONSTER_TRANSFORM); // Clear previous
|
||||
sc_start2(NULL, &sd->bl, SC_MONSTER_TRANSFORM, 100, mob_id, type, tick);
|
||||
}
|
||||
if (type != SC_NONE)
|
||||
|
||||
Reference in New Issue
Block a user