summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-09-20 21:00:38 -0300
committershennetsind <ind@henn.et>2014-09-20 21:00:38 -0300
commit7a76d8f3ce4f9cd54289c34c6dbc73cdce6e6496 (patch)
treea93967f9d3fba6dcad2507c0a786cf4965ddaa16
parentb29098c74c2e67674a30a1f411e81e4cf5db8798 (diff)
downloadhercules-7a76d8f3ce4f9cd54289c34c6dbc73cdce6e6496.tar.gz
hercules-7a76d8f3ce4f9cd54289c34c6dbc73cdce6e6496.tar.bz2
hercules-7a76d8f3ce4f9cd54289c34c6dbc73cdce6e6496.tar.xz
hercules-7a76d8f3ce4f9cd54289c34c6dbc73cdce6e6496.zip
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 <ind@henn.et>
-rw-r--r--src/map/unit.c15
1 files changed, 15 insertions, 0 deletions
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)