From 6a5386d1085d3e1333bcb6281f604efbd10e01aa Mon Sep 17 00:00:00 2001 From: panikon Date: Wed, 2 Jul 2014 15:09:36 -0300 Subject: Fixed issue where 'reflect' skills would bypass disable_pvm and disable_pvp, issue: 8203 http://hercules.ws/board/tracker/issue-8203-disable-pvm-true/ --- src/map/skill.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') 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); -- cgit v1.2.3-60-g2f50