summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-01-08 12:25:59 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-01-08 12:25:59 +0000
commit5b24315ae353c051415fd878c4a2817c94b6a245 (patch)
treefb21d4e15cbd1fd99c0e9c8c6cd223de846bcc79
parent5666e2aeec32ec097aec558738d837e8c5bb941f (diff)
downloadhercules-5b24315ae353c051415fd878c4a2817c94b6a245.tar.gz
hercules-5b24315ae353c051415fd878c4a2817c94b6a245.tar.bz2
hercules-5b24315ae353c051415fd878c4a2817c94b6a245.tar.xz
hercules-5b24315ae353c051415fd878c4a2817c94b6a245.zip
* Fixed kill steal protection result in skill casting (unit_skilluse_id2) not getting evaluated (bugreport:1808, since r12203).
- Moved kill steal protection in skill casting to be only executed, after the actual target has been determined and validated (since r12203). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14658 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/unit.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 64bdeef6c..9b53bb6c2 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -1,6 +1,8 @@
Date Added
2011/01/08
+ * Fixed kill steal protection result in skill casting (unit_skilluse_id2) not getting evaluated (bugreport:1808, since r12203). [Ai4rei]
+ - Moved kill steal protection in skill casting to be only executed, after the actual target has been determined and validated (since r12203).
* Applied fix provided by Valaris to make /pvpinfo actually work. (bugreport:1785, since r1602). [Ai4rei]
- Filled-in missing packet fields and documented the packet. Note, that this command does not show anything outside of PvP maps (client-side limitation).
* Fixed @homlevel usage message stating, that deleveling is possible, although it is not (bugreport:1485, since r10272). [Ai4rei]
diff --git a/src/map/unit.c b/src/map/unit.c
index df4efef8e..3b3dd0e5f 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -939,8 +939,6 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
if(skillnotok(skill_num, sd)) // [MouseJstr]
return 0;
- mob_ksprotected(src, map_id2bl(target_id));
-
switch(skill_num)
{ //Check for skills that auto-select target
case MO_CHAINCOMBO:
@@ -987,6 +985,9 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
if( !target || src->m != target->m || !src->prev || !target->prev )
return 0;
+ if( mob_ksprotected(src, target) )
+ return 0;
+
//Normally not needed because clif.c checks for it, but the at/char/script commands don't! [Skotlex]
if(ud->skilltimer != -1 && skill_num != SA_CASTCANCEL)
return 0;