summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authormekolat <mekolat@gmail.com>2015-04-16 21:19:43 -0400
committermekolat <mekolat@gmail.com>2015-04-20 22:41:32 -0400
commitb77ac5278cae8ed970eae7763ace93e9b039a6de (patch)
tree10a7368f96c3e189afb2d0e008b8ec6a72309058 /src/map
parente6ee7b3f99935a594e6462472fdc9d075408da0f (diff)
downloadtmwa-b77ac5278cae8ed970eae7763ace93e9b039a6de.tar.gz
tmwa-b77ac5278cae8ed970eae7763ace93e9b039a6de.tar.bz2
tmwa-b77ac5278cae8ed970eae7763ace93e9b039a6de.tar.xz
tmwa-b77ac5278cae8ed970eae7763ace93e9b039a6de.zip
deprecate builtin readparam & statusup2
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pc.cpp2
-rw-r--r--src/map/script-fun.cpp41
2 files changed, 1 insertions, 42 deletions
diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index 1e840ea..00acadf 100644
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -3547,7 +3547,7 @@ int pc_setparam(dumb_ptr<map_session_data> sd, SP type, int val)
case SP::INT:
case SP::DEX:
case SP::LUK:
- sd->status.attrs[sp_to_attr(type)] = val;
+ pc_statusup2(sd, type, (val - sd->status.attrs[sp_to_attr(type)]));
break;
}
clif_updatestatus(sd, type);
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp
index 3b814aa..a7f9fcc 100644
--- a/src/map/script-fun.cpp
+++ b/src/map/script-fun.cpp
@@ -949,31 +949,6 @@ void builtin_delitem(ScriptState *st)
}
/*==========================================
- *キャラ関係のパラメータ取得
- *------------------------------------------
- */
-static
-void builtin_readparam(ScriptState *st)
-{
- dumb_ptr<map_session_data> sd;
-
- SP type = SP(conv_num(st, &AARG(0)));
- if (HARG(1))
- sd = map_nick2sd(stringish<CharName>(ZString(conv_str(st, &AARG(1)))));
- else
- sd = script_rid2sd(st);
-
- if (sd == nullptr)
- {
- push_int<ScriptDataInt>(st->stack, -1);
- return;
- }
-
- push_int<ScriptDataInt>(st->stack, pc_readparam(sd, type));
-
-}
-
-/*==========================================
*キャラ関係のID取得
*------------------------------------------
*/
@@ -1165,20 +1140,6 @@ void builtin_getequipname(ScriptState *st)
}
/*==========================================
- *
- *------------------------------------------
- */
-static
-void builtin_statusup2(ScriptState *st)
-{
- SP type = SP(conv_num(st, &AARG(0)));
- int val = conv_num(st, &AARG(1));
- dumb_ptr<map_session_data> sd = script_rid2sd(st);
- pc_statusup2(sd, type, val);
-
-}
-
-/*==========================================
* 装備品による能力値ボーナス
*------------------------------------------
*/
@@ -3124,12 +3085,10 @@ BuiltinFunction builtin_functions[] =
BUILTIN(getitem, "Ii??"_s, '\0'),
BUILTIN(makeitem, "IiMxy"_s, '\0'),
BUILTIN(delitem, "Ii"_s, '\0'),
- BUILTIN(readparam, "i?"_s, 'i'),
BUILTIN(getcharid, "i?"_s, 'i'),
BUILTIN(strcharinfo, "i"_s, 's'),
BUILTIN(getequipid, "i"_s, 'i'),
BUILTIN(getequipname, "i"_s, 's'),
- BUILTIN(statusup2, "ii"_s, '\0'),
BUILTIN(bonus, "ii"_s, '\0'),
BUILTIN(bonus2, "iii"_s, '\0'),
BUILTIN(skill, "ii?"_s, '\0'),