summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/script.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/map/script.c b/src/map/script.c
index d9350081a..f74debabb 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -8597,7 +8597,8 @@ BUILDIN(disableitemuse)
* return the basic stats of sd
* chk pc->readparam for available type
*------------------------------------------*/
-BUILDIN(readparam) {
+BUILDIN(readparam)
+{
int type;
struct map_session_data *sd;
struct script_data *data = script_getdata(st, 2);
@@ -8609,7 +8610,11 @@ BUILDIN(readparam) {
}
if (script_hasdata(st, 3)) {
- sd = script->nick2sd(st, script_getstr(st, 3));
+ if (script_isstringtype(st, 3)) {
+ sd = script->nick2sd(st, script_getstr(st, 3));
+ } else {
+ sd = script->id2sd(st, script_getnum(st, 3));
+ }
} else {
sd = script->rid2sd(st);
}
@@ -18157,7 +18162,7 @@ BUILDIN(setpcblock)
if ((type & PCBLOCK_IMMUNE) != 0)
sd->block_action.immune = state;
- if ((type & PCBLOCK_SITSTAND) != 0)
+ if ((type & PCBLOCK_SITSTAND) != 0)
sd->block_action.sitstand = state;
if ((type & PCBLOCK_COMMANDS) != 0)
@@ -25263,7 +25268,7 @@ void script_hardcoded_constants(void)
script->set_constant("MST_AROUND3", MST_AROUND3, false, false);
script->set_constant("MST_AROUND4", MST_AROUND4, false, false);
script->set_constant("MST_AROUND", MST_AROUND , false, false);
-
+
script->constdb_comment("pc block constants, use with *setpcblock* and *checkpcblock*");
script->set_constant("PCBLOCK_NONE", PCBLOCK_NONE, false, false);
script->set_constant("PCBLOCK_MOVE", PCBLOCK_MOVE, false, false);