summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 089a5520e..5568ec1de 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1040,6 +1040,9 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
target_id = sc->data[SC_COMBO]->val2;
else
target_id = ud->target;
+
+ if( skill_get_inf(skill_num)&INF_SELF_SKILL && skill_get_nk(skill_num)&NK_NO_DAMAGE )// exploit fix
+ target_id = src->id;
temp = 1;
} else
if ( target_id == src->id &&
@@ -1250,8 +1253,13 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
}
// moved here to prevent Suffragium from ending if skill fails
- if (!(skill_get_castnodex(skill_num, skill_lv)&2))
- casttime = skill_castfix_sc(src, casttime, skill_num, skill_lv);
+#ifndef RENEWAL_CAST
+ if (!(skill_get_castnodex(skill_num, skill_lv)&2))
+ casttime = skill_castfix_sc(src, casttime);
+#else
+ casttime = skill_vfcastfix(src, casttime, skill_num, skill_lv);
+#endif
+
// in official this is triggered even if no cast time.
clif_skillcasting(src, src->id, target_id, 0,0, skill_num, skill_get_ele(skill_num, skill_lv), casttime);
if( casttime > 0 || temp )
@@ -1408,8 +1416,13 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, sh
unit_stop_attack(src);
// moved here to prevent Suffragium from ending if skill fails
+#ifndef RENEWAL_CAST
if (!(skill_get_castnodex(skill_num, skill_lv)&2))
- casttime = skill_castfix_sc(src, casttime, skill_num, skill_lv);
+ casttime = skill_castfix_sc(src, casttime);
+#else
+ casttime = skill_vfcastfix(src, casttime, skill_num, skill_lv );
+#endif
+
ud->state.skillcastcancel = castcancel&&casttime>0?1:0;
if( !sd || sd->skillitem != skill_num || skill_get_cast(skill_num,skill_lv) )