summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-27 14:11:08 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-27 14:11:08 +0000
commit083e1e7f223ca36cdda5bf02940dcbb59a18c466 (patch)
tree03f499f66c3fe432c5badf738859564a7f959b1e /src/map/unit.c
parenta688b3155af430cc703f7d40548bbbf5e3a5addf (diff)
downloadhercules-083e1e7f223ca36cdda5bf02940dcbb59a18c466.tar.gz
hercules-083e1e7f223ca36cdda5bf02940dcbb59a18c466.tar.bz2
hercules-083e1e7f223ca36cdda5bf02940dcbb59a18c466.tar.xz
hercules-083e1e7f223ca36cdda5bf02940dcbb59a18c466.zip
* 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
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c4
1 files changed, 2 insertions, 2 deletions
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;
}