diff options
-rw-r--r-- | src/emap/init.c | 1 | ||||
-rw-r--r-- | src/emap/script_buildins.c | 10 | ||||
-rw-r--r-- | src/emap/script_buildins.h | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/emap/init.c b/src/emap/init.c index 2a4ac3f..af9d2cd 100644 --- a/src/emap/init.c +++ b/src/emap/init.c @@ -223,6 +223,7 @@ HPExport void plugin_init (void) addScriptCommand("getnpcsubtype", "?", getNpcSubtype); addScriptCommand("kick", "v?", kick); addScriptCommand("getskillname", "i", getskillname); + addScriptCommand("recalcstatus", "", recalcstatus); addScriptCommand("harm", "ii??", harm); // Overrides diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c index 7cea6c3..fdacd9b 100644 --- a/src/emap/script_buildins.c +++ b/src/emap/script_buildins.c @@ -20,6 +20,7 @@ #include "map/pc.h" #include "map/refine.h" #include "map/script.h" +#include "map/status.h" #include "map/skill.h" #include "map/quest.h" @@ -2687,6 +2688,15 @@ BUILDIN(getskillname) return true; } +BUILDIN(recalcstatus) +{ + struct map_session_data *sd = script->rid2sd(st); + status->calc_bl_(&sd->bl, SCB_BASE, SCO_NONE); + + script_pushint(st, 1); + return true; +} + /*========================================== * *------------------------------------------*/ diff --git a/src/emap/script_buildins.h b/src/emap/script_buildins.h index c4c587f..edf7b66 100644 --- a/src/emap/script_buildins.h +++ b/src/emap/script_buildins.h @@ -107,6 +107,7 @@ BUILDIN(getNpcSubtype); BUILDIN(kick); BUILDIN(getCraftRecipe); BUILDIN(getskillname); +BUILDIN(recalcstatus); BUILDIN(harm); // Overrides |