summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-06-02 16:19:59 +0200
committerGitHub <noreply@github.com>2018-06-02 16:19:59 +0200
commitb8cdb8e191f17cb0c8798e0379be9d68c72d6368 (patch)
treed177ea2eccf2207423c8deae85021ef7e5949512 /src/map/pc.c
parente6596534654e7ca395c34db5a8d589ebbcaa0a7d (diff)
parent90be2a7937e7552a72d1e7eb632e6bc2d01443ef (diff)
downloadhercules-b8cdb8e191f17cb0c8798e0379be9d68c72d6368.tar.gz
hercules-b8cdb8e191f17cb0c8798e0379be9d68c72d6368.tar.bz2
hercules-b8cdb8e191f17cb0c8798e0379be9d68c72d6368.tar.xz
hercules-b8cdb8e191f17cb0c8798e0379be9d68c72d6368.zip
Merge pull request #842 from AnnieRuru/request_6
Add new *pcblock script command
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 cb56aec77..f2bf042eb 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5181,6 +5181,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;
@@ -9344,7 +9347,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;
@@ -9360,7 +9364,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;