summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/status.c16
-rw-r--r--src/map/status.h1
2 files changed, 14 insertions, 3 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 2f6fd9c40..7836b414d 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -9500,9 +9500,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
val3 = 25 * val1; // Move speed reduction
break;
default:
- if (calc_flag == SCB_NONE && status->dbs->SkillChangeTable[type] == 0 && status->dbs->IconChangeTable[type] == 0) {
- //Status change with no calc, no icon, and no skill associated...?
- ShowError("UnknownStatusChange [%d]\n", type);
+ if (status->change_start_unknown_sc(src, bl, type, calc_flag, rate, val1, val2, val3, val4, tick, flag)) {
return 0;
}
}
@@ -9702,6 +9700,17 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
return 1;
}
+bool status_change_start_unknown_sc(struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int tick, int flag)
+{
+ Assert_retr(false, type >= SC_NONE && type < SC_MAX);
+ if (calc_flag == SCB_NONE && status->dbs->SkillChangeTable[type] == 0 && status->dbs->IconChangeTable[type] == 0) {
+ //Status change with no calc, no icon, and no skill associated...?
+ ShowError("UnknownStatusChange [%d]\n", type);
+ return true;
+ }
+ return false;
+}
+
void status_change_start_display(struct map_session_data *sd, enum sc_type type, int val1, int val2, int val3, int val4)
{
Assert_retv(type >= SC_NONE && type < SC_MAX);
@@ -13669,6 +13678,7 @@ void status_defaults(void)
status->calc_bl_main = status_calc_bl_main;
status->display_add = status_display_add;
status->change_start_display = status_change_start_display;
+ status->change_start_unknown_sc = status_change_start_unknown_sc;
status->display_remove = status_display_remove;
status->natural_heal = status_natural_heal;
status->natural_heal_timer = status_natural_heal_timer;
diff --git a/src/map/status.h b/src/map/status.h
index 5a5635492..3c0a87175 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -2338,6 +2338,7 @@ struct status_interface {
int (*change_start_set_option) (struct block_list *bl, struct status_change* sc, enum sc_type type, int val1, int val2, int val3, int val4);
int (*get_val_flag) (enum sc_type type);
void (*change_start_display) (struct map_session_data *sd, enum sc_type type, int val1, int val2, int val3, int val4);
+ bool (*change_start_unknown_sc) (struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int tick, int flag);
int (*kaahi_heal_timer) (int tid, int64 tick, int id, intptr_t data);
int (*change_timer) (int tid, int64 tick, int id, intptr_t data);
int (*change_timer_sub) (struct block_list* bl, va_list ap);