[Fix] Fix Spell Cast Time reduction issues (#1369)

Remove the overloads that don't make sense (bots probably doesn't make
sense either, but too lazy)

Fix the formulas

Removed the Spells:MaxCastTimeReduction rule since this is HARDCODED in
the client so it doesn't really make sense to have it as a customization
point. If you want to hack the client, change the hardcode as well I
guess.
This commit is contained in:
Michael Cook (mackal)
2021-05-24 21:21:39 -04:00
committed by GitHub
parent 93329b4b06
commit e5b9d72b81
7 changed files with 17 additions and 65 deletions
+9 -17
View File
@@ -3112,26 +3112,18 @@ uint32 Mob::GetLevelHP(uint8 tlevel)
return multiplier;
}
int32 Mob::GetActSpellCasttime(uint16 spell_id, int32 casttime) {
int32 Mob::GetActSpellCasttime(uint16 spell_id, int32 casttime)
{
int32 cast_reducer = GetFocusEffect(focusSpellHaste, spell_id);
int32 cast_reducer = 0;
cast_reducer += GetFocusEffect(focusSpellHaste, spell_id);
if (level >= 60 && casttime > 1000)
{
casttime = casttime / 2;
if (casttime < 1000)
casttime = 1000;
} else if (level >= 50 && casttime > 1000) {
int32 cast_deduction = (casttime*(level - 49))/5;
if (cast_deduction > casttime/2)
casttime /= 2;
else
casttime -= cast_deduction;
if (level > 50 && casttime >= 3000 && !spells[spell_id].goodEffect &&
(GetClass() == RANGER || GetClass() == SHADOWKNIGHT || GetClass() == PALADIN || GetClass() == BEASTLORD)) {
int level_mod = std::min(15, GetLevel() - 50);
cast_reducer += level_mod * 3;
}
casttime = (casttime*(100 - cast_reducer)/100);
return casttime;
casttime = casttime * (100 - cast_reducer) / 100;
return std::max(casttime, casttime / 2);
}
void Mob::ExecWeaponProc(const EQ::ItemInstance *inst, uint16 spell_id, Mob *on, int level_override) {