Spell cast time calculation

This commit is contained in:
Yunfan Li
2024-02-07 21:37:19 +08:00
parent 1a11ec0717
commit 5e2497bf7e
4 changed files with 15 additions and 20 deletions

View File

@@ -2963,8 +2963,8 @@ bool PlayerbotAI::IsInVehicle(bool canControl, bool canCast, bool canAttack, boo
void PlayerbotAI::WaitForSpellCast(Spell* spell)
{
SpellInfo const* spellInfo = spell->GetSpellInfo();
float castTime = spell->GetCastTime();
uint32 castTime = spellInfo->CalcCastTime(bot, spell);
// float castTime = spell->GetCastTime();
// if (spellInfo->IsChanneled())
// {
// int32 duration = spellInfo->GetDuration();
@@ -2973,9 +2973,9 @@ void PlayerbotAI::WaitForSpellCast(Spell* spell)
// castTime += duration;
// }
castTime = ceil(castTime);
// castTime = ceil(castTime);
uint32 globalCooldown = CalculateGlobalCooldown(spellInfo->Id);
// uint32 globalCooldown = CalculateGlobalCooldown(spellInfo->Id);
// if (castTime < globalCooldown)
// castTime = globalCooldown;