From ec12f70e64fdd12235f74d9708332be0ff8c2683 Mon Sep 17 00:00:00 2001 From: zephyrus Date: Wed, 29 Jul 2009 09:10:51 +0000 Subject: - 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 --- src/map/skill.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/map/skill.c') 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); -- cgit v1.2.3-70-g09d2