diff options
author | mekolat <mekolat@gmail.com> | 2015-04-06 22:55:25 -0400 |
---|---|---|
committer | mekolat <mekolat@gmail.com> | 2015-04-06 22:55:55 -0400 |
commit | da8a9751c6277e6f936bf57b367ea9c78ce0ba4f (patch) | |
tree | b1a2ee398356e25b5b425ce1d23536c15e78cfea | |
parent | 34deaf57bed37f5a43f28e039ed7caa8bde65bb4 (diff) | |
download | tmwa-da8a9751c6277e6f936bf57b367ea9c78ce0ba4f.tar.gz tmwa-da8a9751c6277e6f936bf57b367ea9c78ce0ba4f.tar.bz2 tmwa-da8a9751c6277e6f936bf57b367ea9c78ce0ba4f.tar.xz tmwa-da8a9751c6277e6f936bf57b367ea9c78ce0ba4f.zip |
add 3rd param to heal
-rw-r--r-- | src/map/script-fun.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index b8cca26..3d699e2 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -401,11 +401,16 @@ void builtin_areawarp(ScriptState *st) static void builtin_heal(ScriptState *st) { - int hp, sp; + int hp, sp, item; hp = conv_num(st, &AARG(0)); sp = conv_num(st, &AARG(1)); - pc_heal(script_rid2sd(st), hp, sp); + item = conv_num(st, &AARG(2)); + + if(item) + pc_itemheal(script_rid2sd(st), hp, sp); + else + pc_heal(script_rid2sd(st), hp, sp); } /*========================================== @@ -2981,7 +2986,7 @@ BuiltinFunction builtin_functions[] = BUILTIN(isat, "Mxy"_s, 'i'), BUILTIN(warp, "Mxy"_s, '\0'), BUILTIN(areawarp, "MxyxyMxy"_s, '\0'), - BUILTIN(heal, "ii"_s, '\0'), + BUILTIN(heal, "ii?"_s, '\0'), BUILTIN(input, "N"_s, '\0'), BUILTIN(if, "iF*"_s, '\0'), BUILTIN(set, "Ne"_s, '\0'), |