diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-04-11 14:21:09 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-04-11 14:21:09 +0000 |
commit | 3381a5ea9a482409d361f2b36d3aff7a72dcb0c2 (patch) | |
tree | 5d4adce5708fd808261c4c2ae3f60f963c70e162 /src/map/skill.c | |
parent | 6b820eae6a9b9944be8e7d2b179e9337a25306e9 (diff) | |
download | hercules-3381a5ea9a482409d361f2b36d3aff7a72dcb0c2.tar.gz hercules-3381a5ea9a482409d361f2b36d3aff7a72dcb0c2.tar.bz2 hercules-3381a5ea9a482409d361f2b36d3aff7a72dcb0c2.tar.xz hercules-3381a5ea9a482409d361f2b36d3aff7a72dcb0c2.zip |
- Some cleaning of the castend_map code to prevent the menuskill variable from not being cleared if you made a choice but the skill was not triggered (due to silence, stun or whatever).
- Cleaned up a bit the Charge Attack casttime equation, should prevent infinite casttime when the distance is 0.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10213 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 022da6ec7..4c3559b9f 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6327,9 +6327,13 @@ int skill_castend_map (struct map_session_data *sd, int skill_num, const char *m //Simplify skill_failed code. #define skill_failed(sd) { sd->menuskill_id = sd->menuskill_lv = 0; } + if(skill_num != sd->menuskill_id) + return 0; - if( sd->bl.prev == NULL || pc_isdead(sd) ) + if( sd->bl.prev == NULL || pc_isdead(sd) ) { + skill_failed(sd); return 0; + } if(sd->sc.opt1 || sd->sc.option&OPTION_HIDE ) { skill_failed(sd); @@ -6343,11 +6347,10 @@ int skill_castend_map (struct map_session_data *sd, int skill_num, const char *m sd->sc.data[SC_DANCING].timer!=-1 || sd->sc.data[SC_BERSERK].timer != -1 || sd->sc.data[SC_MARIONETTE].timer != -1 - )) - return 0; - - if( skill_num != sd->menuskill_id) + )) { + skill_failed(sd); return 0; + } if (strlen(map) > MAP_NAME_LENGTH_EXT-1) { //Map_length check, as it is sent by the client and we shouldn't trust it [Skotlex] |