From 7a76d8f3ce4f9cd54289c34c6dbc73cdce6e6496 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 20 Sep 2014 21:00:38 -0300 Subject: Fixed Bug 7932 It is no longer possible to cast skills on the dead (unless they're predetermined, e.g. resurrection) Special Thanks to kyeme! http://hercules.ws/board/tracker/issue-7932-casting-on-dead-player/ Signed-off-by: shennetsind --- src/map/unit.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/map/unit.c') diff --git a/src/map/unit.c b/src/map/unit.c index 12df6ab1f..1f81e0d2f 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1137,6 +1137,21 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui if(!status->check_skilluse(src, target, skill_id, 0)) return 0; + + if( src != target && status->isdead(target) ) { + /** + * Skills that may be cast on dead targets + **/ + switch( skill_id ) { + case NPC_WIDESOULDRAIN: + case PR_REDEMPTIO: + case ALL_RESURRECTION: + case WM_DEADHILLHERE: + break; + default: + return 1; + } + } tstatus = status->get_status_data(target); // Record the status of the previous skill) -- cgit v1.2.3-70-g09d2