bonus bVariableCast and bonus2 bSkillVariableCast for Pre-renewal (#4268)

* `bonus bVariableCast,t;` now works in pre-renewal to increase casting time
* `bonus2 bSkillVariableCast,sk,t;` now works in pre-renewal to increase casting time by skill name
* Item bonus documentation update
This commit is contained in:
Cydh Ramdh
2019-11-04 08:03:15 +07:00
committed by GitHub
parent 930f52e31f
commit e6bf2d18f9
3 changed files with 28 additions and 20 deletions

View File

@@ -16526,8 +16526,12 @@ int skill_castfix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) {
// Calculate cast time reduced by item/card bonuses
if (sd) {
if (!(flag&4) && sd->castrate != 100)
reduce_cast_rate += 100 - sd->castrate;
if (!(flag&4)) {
if (sd->castrate != 100)
reduce_cast_rate += 100 - sd->castrate;
if (sd->bonus.add_varcast != 0)
time += sd->bonus.add_varcast; // bonus bVariableCast
}
// Skill-specific reductions work regardless of flag
for (const auto &it : sd->skillcastrate) {
if (it.id == skill_id) {
@@ -16535,6 +16539,12 @@ int skill_castfix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) {
break;
}
}
for (const auto &it : sd->skillvarcast) {
if (it.id == skill_id) { // bonus2 bSkillVariableCast
time += it.val;
break;
}
}
}
// These cast time reductions are processed even if the skill fails