diff options
author | Haru <haru@dotalux.com> | 2020-01-12 20:15:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-12 20:15:09 +0100 |
commit | 5ee3fcc3fc89304b8be221a9cb1406002ce0b0e3 (patch) | |
tree | 46191ecdb7720407eacd36d41ea528767fa9a178 /src/map/script.c | |
parent | 8ebb6c6f16aeca5ccd5c2aa9c1b40cbb6e6c82a8 (diff) | |
parent | b2ded23fcbf914b8ca26b270b197aad0598971b9 (diff) | |
download | hercules-5ee3fcc3fc89304b8be221a9cb1406002ce0b0e3.tar.gz hercules-5ee3fcc3fc89304b8be221a9cb1406002ce0b0e3.tar.bz2 hercules-5ee3fcc3fc89304b8be221a9cb1406002ce0b0e3.tar.xz hercules-5ee3fcc3fc89304b8be221a9cb1406002ce0b0e3.zip |
Merge pull request #2285 from bWolfie/hatereset
Adds buildin_resetfeel, buildin_resethate and acmd_hatereset.
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c index 396d084a3..ffccd3b59 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -25968,6 +25968,38 @@ static BUILDIN(openlapineddukddakboxui) return true; } +// Reset 'Feeling' maps. +BUILDIN(resetfeel) +{ + struct map_session_data *sd; + + if (script_hasdata(st, 2)) + sd = script->id2sd(st, script_getnum(st, 2)); + else + sd = script->rid2sd(st); + + if (sd != NULL) + pc->resetfeel(sd); + + return true; +} + +// Reset hatred target marks. +BUILDIN(resethate) +{ + struct map_session_data *sd; + + if (script_hasdata(st, 2)) + sd = script->id2sd(st, script_getnum(st, 2)); + else + sd = script->rid2sd(st); + + if (sd != NULL) + pc->resethate(sd); + + return true; +} + /** * Adds a built-in script function. * @@ -26349,6 +26381,8 @@ static void script_parse_builtin(void) BUILDIN_DEF(resetlvl,"i"), BUILDIN_DEF(resetstatus,""), BUILDIN_DEF(resetskill,""), + BUILDIN_DEF(resetfeel, "?"), + BUILDIN_DEF(resethate, "?"), BUILDIN_DEF(skillpointcount,""), BUILDIN_DEF(changebase,"i?"), BUILDIN_DEF(changesex,""), |