summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 e1ecd37..e8e526a 100644
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -3550,7 +3550,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 f62b137..010b095 100644
--- a/src/map/script-fun.cpp
+++ b/src/map/script-fun.cpp
@@ -967,31 +967,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取得
*------------------------------------------
*/
@@ -1183,20 +1158,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);
-
-}
-
-/*==========================================
* 装備品による能力値ボーナス
*------------------------------------------
*/
@@ -3120,12 +3081,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'),