Corrected autospell bonuses (fixes #1593)
* Resolves the range check when the config is enabled not checking the proper distance between the two targets. * Updated the item bonus documentation. Thanks to @chriser-!
This commit is contained in:
parent
78d9e2a245
commit
cbc365d0f2
@ -329,7 +329,8 @@ bonus2 bWeaponComaRace,r,n; Adds a n/100% chance to cause Coma when attacking
|
||||
| 5. AutoSpell Bonuses |
|
||||
========================
|
||||
NOTES:
|
||||
- For all AutoSpell bonuses, target must be within the spell's range to go off.
|
||||
- For all AutoSpell bonuses, target does not have be within the spell's range to go off.
|
||||
-- Enable conf/battle/battle.conf::autospell_check_range to force a range check.
|
||||
- By default, AutoSpell skills are casted on target unless it is a self or support skill (inf = 4/16).
|
||||
|
||||
bonus3 bAutoSpell,sk,y,n; Adds a n/10% chance to cast skill sk of level y when attacking
|
||||
|
@ -2043,7 +2043,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
|
||||
}
|
||||
}
|
||||
if (battle_config.autospell_check_range &&
|
||||
!battle_check_range(src, tbl, skill_get_range2(src, skill, autospl_skill_lv, true)))
|
||||
!battle_check_range(bl, tbl, skill_get_range2(src, skill, autospl_skill_lv, true)))
|
||||
continue;
|
||||
|
||||
if (skill == AS_SONICBLOW)
|
||||
@ -2172,7 +2172,7 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, uint1
|
||||
}
|
||||
}
|
||||
if (battle_config.autospell_check_range &&
|
||||
!battle_check_range(&sd->bl, tbl, skill_get_range2(&sd->bl, skill, skill_lv, true)))
|
||||
!battle_check_range(bl, tbl, skill_get_range2(&sd->bl, skill, skill_lv, true)))
|
||||
continue;
|
||||
|
||||
sd->state.autocast = 1;
|
||||
@ -2383,7 +2383,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
|
||||
}
|
||||
}
|
||||
|
||||
if (!battle_check_range(src, tbl, skill_get_range2(src, autospl_skill_id, autospl_skill_lv, true)) && battle_config.autospell_check_range)
|
||||
if (!battle_check_range(bl, tbl, skill_get_range2(src, autospl_skill_id, autospl_skill_lv, true)) && battle_config.autospell_check_range)
|
||||
continue;
|
||||
|
||||
dstsd->state.autocast = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user