diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-06-16 08:25:49 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-06-16 08:25:49 -0300 |
commit | 651b304904aec8ed8db8657c927939605ab326d1 (patch) | |
tree | 1dd307e874f43aa1271fb9e2d05faacba9992f0a /src/emap | |
parent | 6e13a2fe8874689b1f6523fdd63517cc03ac4542 (diff) | |
download | evol-hercules-651b304904aec8ed8db8657c927939605ab326d1.tar.gz evol-hercules-651b304904aec8ed8db8657c927939605ab326d1.tar.bz2 evol-hercules-651b304904aec8ed8db8657c927939605ab326d1.tar.xz evol-hercules-651b304904aec8ed8db8657c927939605ab326d1.zip |
Add recalcstats() wrapper for Focus.
Diffstat (limited to 'src/emap')
-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 |