summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-01-12 20:29:39 +0100
committerGitHub <noreply@github.com>2020-01-12 20:29:39 +0100
commit7391e5d257587ec92b96f6ebbdc77f82072ee23d (patch)
tree16d15357ca2073eb37eca7e02d57ea149a9c65cb /src/map/script.c
parent5ee3fcc3fc89304b8be221a9cb1406002ce0b0e3 (diff)
parente6199edca8ad4eee32b7e34318f99f365d8520db (diff)
downloadhercules-7391e5d257587ec92b96f6ebbdc77f82072ee23d.tar.gz
hercules-7391e5d257587ec92b96f6ebbdc77f82072ee23d.tar.bz2
hercules-7391e5d257587ec92b96f6ebbdc77f82072ee23d.tar.xz
hercules-7391e5d257587ec92b96f6ebbdc77f82072ee23d.zip
Merge pull request #2606 from Ridley8819/pcblocknpc
Adding PCBLOCK_NPC to setpcblock script command
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index ffccd3b59..4319506d3 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -19126,6 +19126,9 @@ static BUILDIN(setpcblock)
if ((type & PCBLOCK_COMMANDS) != 0)
sd->block_action.commands = state;
+ if ((type & PCBLOCK_NPC) != 0)
+ sd->block_action.npc = state;
+
return true;
}
@@ -19163,6 +19166,9 @@ static BUILDIN(checkpcblock)
if (sd->block_action.commands != 0)
retval |= PCBLOCK_COMMANDS;
+ if (sd->block_action.npc != 0)
+ retval |= PCBLOCK_NPC;
+
script_pushint(st, retval);
return true;
}
@@ -27262,6 +27268,7 @@ static void script_hardcoded_constants(void)
script->set_constant("PCBLOCK_IMMUNE", PCBLOCK_IMMUNE, false, false);
script->set_constant("PCBLOCK_SITSTAND", PCBLOCK_SITSTAND, false, false);
script->set_constant("PCBLOCK_COMMANDS", PCBLOCK_COMMANDS, false, false);
+ script->set_constant("PCBLOCK_NPC", PCBLOCK_NPC, false, false);
script->constdb_comment("private airship responds");
script->set_constant("P_AIRSHIP_NONE", P_AIRSHIP_NONE, false, false);