Update to SE_Fc_CastTimeMod2

Update to SE_Fc_CastTimeMod2
Found sources that show it can reduce cast time to instant. Rewrote formulas to account for such.
This commit is contained in:
KayenEQ
2021-07-21 21:05:54 -04:00
parent 9712202cbf
commit e387c2bb44
2 changed files with 9 additions and 9 deletions
+7 -7
View File
@@ -3120,8 +3120,8 @@ uint32 Mob::GetLevelHP(uint8 tlevel)
int32 Mob::GetActSpellCasttime(uint16 spell_id, int32 casttime)
{
int32 cast_reducer = GetFocusEffect(focusSpellHaste, spell_id);
cast_reducer += GetFocusEffect(focusFcCastTimeMod2, spell_id);
auto min_cap = casttime / 2;
int32 cast_reducer_amt = GetFocusEffect(focusFcCastTimeAmt, spell_id);
int32 cast_reducer_no_limit = GetFocusEffect(focusFcCastTimeMod2, spell_id);
if (level > 50 && casttime >= 3000 && !spells[spell_id].goodEffect &&
(GetClass() == RANGER || GetClass() == SHADOWKNIGHT || GetClass() == PALADIN || GetClass() == BEASTLORD)) {
@@ -3129,13 +3129,13 @@ int32 Mob::GetActSpellCasttime(uint16 spell_id, int32 casttime)
cast_reducer += level_mod * 3;
}
cast_reducer = std::min(cast_reducer, 50); //Max cast time with focusSpellHaste and level reducer is 50% of cast time.
cast_reducer += cast_reducer_no_limit;
casttime = casttime * (100 - cast_reducer) / 100;
int32 cast_reducer_amt = GetFocusEffect(focusFcCastTimeAmt, spell_id);
casttime = std::max(casttime, min_cap) - cast_reducer_amt;
casttime -= cast_reducer_amt;
return std::max(casttime, 0);
}
void Mob::ExecWeaponProc(const EQ::ItemInstance *inst, uint16 spell_id, Mob *on, int level_override) {