diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-04-11 04:55:36 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-04-11 04:55:36 +0000 |
commit | cf214277634496ff22b20c8b2f44624a0248f211 (patch) | |
tree | adb7369d6ffedcdf34bb1c4134f3f38829fa3e36 /src/map/skill.c | |
parent | 895fd7fd301368cbf21a13cf9a25be37d0256db3 (diff) | |
download | hercules-cf214277634496ff22b20c8b2f44624a0248f211.tar.gz hercules-cf214277634496ff22b20c8b2f44624a0248f211.tar.bz2 hercules-cf214277634496ff22b20c8b2f44624a0248f211.tar.xz hercules-cf214277634496ff22b20c8b2f44624a0248f211.zip |
Fixed bugreport:5556 skill_onskillusage is only triggered if previous skill didn't miss.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15846 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 14ed17c64..dec212257 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1560,10 +1560,6 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, int s } sd->autospell3[i].lock = false; sd->state.autocast = 0; - /** - * bugreport:5324 trigger recursion - **/ - skill_onskillusage(sd, bl, skill, tick); } if( sd && sd->autobonus3[0].rate ) @@ -2566,6 +2562,8 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds status_zap(bl, 0, damage*100/(100*(110-pc_checkskill(sd,WM_LESSON)*10))); break; } + if( sd ) + skill_onskillusage(sd, bl, skillid, tick); } if (!(flag&2) && @@ -4275,8 +4273,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int battle_consume_ammo(sd, skillid, skilllv); } - // perform auto-cast routines and skill requirement consumption - skill_onskillusage(sd, bl, skillid, tick); + // perform skill requirement consumption skill_consume_requirement(sd,skillid,skilllv,2); } @@ -8103,8 +8100,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in battle_consume_ammo(sd, skillid, skilllv); } - // perform auto-cast routines and skill requirement consumption - skill_onskillusage(sd, bl, skillid, tick); + // perform skill requirement consumption skill_consume_requirement(sd,skillid,skilllv,2); } @@ -9150,8 +9146,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, int skillid, int sk battle_consume_ammo(sd, skillid, skilllv); } - // perform auto-cast routines and skill requirement consumption - skill_onskillusage(sd, NULL, skillid, tick); + // perform skill requirement consumption skill_consume_requirement(sd,skillid,skilllv,2); } |