summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorpanikon <panikon@zoho.com>2014-07-02 15:09:36 -0300
committerpanikon <panikon@zoho.com>2014-07-02 15:09:36 -0300
commit6a5386d1085d3e1333bcb6281f604efbd10e01aa (patch)
tree2008e68d7bc66746bf992575fea41671c217775d /src/map/skill.c
parent1e492e343fa3581790503a96a847d717976e375f (diff)
downloadhercules-6a5386d1085d3e1333bcb6281f604efbd10e01aa.tar.gz
hercules-6a5386d1085d3e1333bcb6281f604efbd10e01aa.tar.bz2
hercules-6a5386d1085d3e1333bcb6281f604efbd10e01aa.tar.xz
hercules-6a5386d1085d3e1333bcb6281f604efbd10e01aa.zip
Fixed issue where 'reflect' skills would bypass disable_pvm and disable_pvp, issue: 8203 http://hercules.ws/board/tracker/issue-8203-disable-pvm-true/
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index e6032394b..b960ef119 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2141,6 +2141,14 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
sd = BL_CAST(BL_PC, src);
tsd = BL_CAST(BL_PC, bl);
+ // To block skills that aren't called via battle_check_target [Panikon]
+ // issue: 8203
+ if( sd
+ && ( (bl->type == BL_MOB && pc_has_permission(sd, PC_PERM_DISABLE_PVM))
+ || (bl->type == BL_PC && pc_has_permission(sd, PC_PERM_DISABLE_PVP)) )
+ )
+ return 0;
+
sstatus = status->get_status_data(src);
tstatus = status->get_status_data(bl);
sc = status->get_sc(bl);