summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorAnnieRuru <jeankof@ymail.com>2018-05-04 15:11:44 +0800
committerAnnieRuru <jeankof@ymail.com>2018-05-04 15:11:44 +0800
commit90be2a7937e7552a72d1e7eb632e6bc2d01443ef (patch)
treea620df93dbac0e1e1a210cce677c1d7046ad51dd /src/map/pc.c
parent0622261073b6f4f0160cb0df150d3e07483d9b1b (diff)
downloadhercules-90be2a7937e7552a72d1e7eb632e6bc2d01443ef.tar.gz
hercules-90be2a7937e7552a72d1e7eb632e6bc2d01443ef.tar.bz2
hercules-90be2a7937e7552a72d1e7eb632e6bc2d01443ef.tar.xz
hercules-90be2a7937e7552a72d1e7eb632e6bc2d01443ef.zip
Add setpcblock & checkpcblock script commands
thanks to @MishimaHaruna for the updated syntax
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 8dd216f55..1a26ef0d3 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5162,6 +5162,9 @@ int pc_useitem(struct map_session_data *sd,int n) {
if( sd->status.inventory[n].nameid <= 0 || sd->status.inventory[n].amount <= 0 )
return 0;
+ if (sd->block_action.useitem) // *pcblock script command
+ return 0;
+
if( !pc->isUseitem(sd,n) )
return 0;
@@ -9321,7 +9324,8 @@ bool pc_can_attack( struct map_session_data *sd, int target_id ) {
(sd->sc.data[SC_SIREN] && sd->sc.data[SC_SIREN]->val2 == target_id) ||
sd->sc.data[SC_BLADESTOP] ||
sd->sc.data[SC_DEEP_SLEEP] ||
- sd->sc.data[SC_FALLENEMPIRE] )
+ sd->sc.data[SC_FALLENEMPIRE] ||
+ sd->block_action.attack)
return false;
return true;
@@ -9337,7 +9341,8 @@ bool pc_can_talk( struct map_session_data *sd ) {
if( sd->sc.data[SC_BERSERK] ||
(sd->sc.data[SC_DEEP_SLEEP] && sd->sc.data[SC_DEEP_SLEEP]->val2) ||
- pc_ismuted(&sd->sc, MANNER_NOCHAT) )
+ pc_ismuted(&sd->sc, MANNER_NOCHAT) ||
+ sd->block_action.chat)
return false;
return true;