ore/Spells: Autorepeat casting fixes

* Fixed cast bars of ranged spells not disappearing when canceled while autoshooting
* Replaced hacky 500ms delay on non auto shot autorepeat spells with native spell cast time (wands have 500ms cast time)
* Update cooldowns before attempting to cast autorepeat spells (for cases when cooldown ends on the same server tick as cast attempt)
This commit is contained in:
Shauren authored and Ovahlord committed 2022-09-30 11:08:20 +02:00
1 parent dfc6fe6450
commit c78371f321
4 files changed
+35 -35

No files matched your search

-5
View File
@@ -294,11 +294,6 @@ void SpellHistory::StartCooldown(SpellInfo const* spellInfo, uint32 itemId, Spel
}
else
{
// shoot spells used equipped item cooldown values already assigned in GetAttackTime(RANGED_ATTACK)
// prevent 0 cooldowns set by another way
if (cooldown <= 0 && categoryCooldown <= 0 && (categoryId == 76 || (spellInfo->IsAutoRepeatRangedSpell() && spellInfo->Id != 75)))
cooldown = _owner->GetAttackTime(RANGED_ATTACK);
// Now we have cooldown data (if found any), time to apply mods
if (Player* modOwner = _owner->GetSpellModOwner())
{