summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-07-29 09:10:51 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-07-29 09:10:51 +0000
commitec12f70e64fdd12235f74d9708332be0ff8c2683 (patch)
treeaec85700e214fed923b3b0c5755a5fcf789193b4 /src/map/skill.c
parent94f3da9dd8cb31ab928b62c44e076080ade23b8b (diff)
downloadhercules-ec12f70e64fdd12235f74d9708332be0ff8c2683.tar.gz
hercules-ec12f70e64fdd12235f74d9708332be0ff8c2683.tar.bz2
hercules-ec12f70e64fdd12235f74d9708332be0ff8c2683.tar.xz
hercules-ec12f70e64fdd12235f74d9708332be0ff8c2683.zip
- Fixed a bug cleaning instance variable on party when instance is destroy.
- Fixed a bug on Yuno Castle 2 and 3, not killing guardians. - Moved battleground team leave on unit remove map to prevent a crash on multimap servers. - Fixed a bug on checking range with the wrong target. Fix a crash on Item 2002 at refine >= 9. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13979 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 4e4cf1734..4629e9f6e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1112,13 +1112,10 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, int s
continue; // No target
if( rand()%1000 > sd->autospell3[i].rate )
continue;
- if( !battle_check_range(&sd->bl, bl, skill_get_range2(&sd->bl, skill,skilllv) + (skill == RG_CLOSECONFINE?0:1)) )
- continue;
+ tbl = (sd->autospell3[i].id < 0) ? &sd->bl : bl;
- if( sd->autospell3[i].id < 0 )
- tbl = &sd->bl;
- else
- tbl = bl;
+ if( !battle_check_range(&sd->bl, tbl, skill_get_range2(&sd->bl, skill,skilllv) + (skill == RG_CLOSECONFINE?0:1)) )
+ continue;
sd->state.autocast = 1;
skill_consume_requirement(sd,skill,skilllv,1);