diff options
author | mekolat <mekolat@gmail.com> | 2015-04-06 22:42:15 -0400 |
---|---|---|
committer | mekolat <mekolat@gmail.com> | 2015-04-06 22:42:15 -0400 |
commit | 92c2232a9e0160aff8d087086a4e14ec1e322c56 (patch) | |
tree | ae1de19d41124d5aff76ab2d6e730867670a429e /src/map | |
parent | 6f4699ff0c6400a2adc5e4008b2e289737f4a303 (diff) | |
download | tmwa-92c2232a9e0160aff8d087086a4e14ec1e322c56.tar.gz tmwa-92c2232a9e0160aff8d087086a4e14ec1e322c56.tar.bz2 tmwa-92c2232a9e0160aff8d087086a4e14ec1e322c56.tar.xz tmwa-92c2232a9e0160aff8d087086a4e14ec1e322c56.zip |
remove deprecated percentheal
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/pc.cpp | 69 | ||||
-rw-r--r-- | src/map/pc.hpp | 1 | ||||
-rw-r--r-- | src/map/script-fun.cpp | 15 |
3 files changed, 0 insertions, 85 deletions
diff --git a/src/map/pc.cpp b/src/map/pc.cpp index 7d04785..95fabde 100644 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -3690,75 +3690,6 @@ int pc_itemheal_effect(dumb_ptr<map_session_data> sd, int hp, int sp) } /*========================================== - * HP/SP回復 - *------------------------------------------ - */ -int pc_percentheal(dumb_ptr<map_session_data> sd, int hp, int sp) -{ - nullpo_retz(sd); - - if (pc_checkoverhp(sd)) - { - if (hp > 0) - hp = 0; - } - if (pc_checkoversp(sd)) - { - if (sp > 0) - sp = 0; - } - if (hp) - { - if (hp >= 100) - { - sd->status.hp = sd->status.max_hp; - } - else if (hp <= -100) - { - sd->status.hp = 0; - pc_damage(nullptr, sd, 1); - } - else - { - sd->status.hp += sd->status.max_hp * hp / 100; - if (sd->status.hp > sd->status.max_hp) - sd->status.hp = sd->status.max_hp; - if (sd->status.hp <= 0) - { - sd->status.hp = 0; - pc_damage(nullptr, sd, 1); - hp = 0; - } - } - } - if (sp) - { - if (sp >= 100) - { - sd->status.sp = sd->status.max_sp; - } - else if (sp <= -100) - { - sd->status.sp = 0; - } - else - { - sd->status.sp += sd->status.max_sp * sp / 100; - if (sd->status.sp > sd->status.max_sp) - sd->status.sp = sd->status.max_sp; - if (sd->status.sp < 0) - sd->status.sp = 0; - } - } - if (hp) - clif_updatestatus(sd, SP::HP); - if (sp) - clif_updatestatus(sd, SP::SP); - - return 0; -} - -/*========================================== * 見た目変更 *------------------------------------------ */ diff --git a/src/map/pc.hpp b/src/map/pc.hpp index ba0a46f..4bca255 100644 --- a/src/map/pc.hpp +++ b/src/map/pc.hpp @@ -138,7 +138,6 @@ int pc_useitem(dumb_ptr<map_session_data>, IOff0); int pc_damage(dumb_ptr<block_list>, dumb_ptr<map_session_data>, int); int pc_heal(dumb_ptr<map_session_data>, int, int); int pc_itemheal(dumb_ptr<map_session_data> sd, int hp, int sp); -int pc_percentheal(dumb_ptr<map_session_data> sd, int, int); int pc_changelook(dumb_ptr<map_session_data>, LOOK, int); int pc_readparam(dumb_ptr<map_session_data>, SP); diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index 8c25266..52b425a 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -427,20 +427,6 @@ void builtin_itemheal(ScriptState *st) *------------------------------------------ */ static -void builtin_percentheal(ScriptState *st) -{ - int hp, sp; - - hp = conv_num(st, &AARG(0)); - sp = conv_num(st, &AARG(1)); - pc_percentheal(script_rid2sd(st), hp, sp); -} - -/*========================================== - * - *------------------------------------------ - */ -static void builtin_input(ScriptState *st) { dumb_ptr<map_session_data> sd = nullptr; @@ -3011,7 +2997,6 @@ BuiltinFunction builtin_functions[] = BUILTIN(areawarp, "MxyxyMxy"_s, '\0'), BUILTIN(heal, "ii"_s, '\0'), BUILTIN(itemheal, "ii"_s, '\0'), - BUILTIN(percentheal, "ii"_s, '\0'), BUILTIN(input, "N"_s, '\0'), BUILTIN(if, "iF*"_s, '\0'), BUILTIN(set, "Ne"_s, '\0'), |