From 90be2a7937e7552a72d1e7eb632e6bc2d01443ef Mon Sep 17 00:00:00 2001 From: AnnieRuru Date: Fri, 4 May 2018 15:11:44 +0800 Subject: Add setpcblock & checkpcblock script commands thanks to @MishimaHaruna for the updated syntax --- src/map/pc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/map/pc.c') 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; -- cgit v1.2.3-60-g2f50