From 083e1e7f223ca36cdda5bf02940dcbb59a18c466 Mon Sep 17 00:00:00 2001 From: Inkfish Date: Wed, 27 May 2009 14:11:08 +0000 Subject: * skill_check_condition clean up (bugreport:2770, bugreport:2957, bugreport:3010) - Weapon, SP, HP and state are checked at the beginning of cast. - Required items and ammos are checked at the end of cast. - SP and status change required are removed at the end of cast without checking again. - Required items are removed only if the skill is successfully used. - Autocasts won't check for requirements but will remove them if you have them(except for SP/HP). Hope won't cause any problems... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13815 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/unit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/map/unit.c') diff --git a/src/map/unit.c b/src/map/unit.c index 44dbaf741..05bfa1b50 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -948,7 +948,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh } break; } - if (!skill_check_condition(sd, skill_num, skill_lv, 0)) + if (!skill_check_condition_castbegin(sd, skill_num, skill_lv)) return 0; } //TODO: Add type-independant skill_check_condition function. @@ -1145,7 +1145,7 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, sh if( sd ) { - if( skillnotok(skill_num, sd) || !skill_check_condition(sd, skill_num, skill_lv,0) ) + if( skillnotok(skill_num, sd) || !skill_check_condition_castbegin(sd, skill_num, skill_lv) ) return 0; } -- cgit v1.2.3-60-g2f50