Core/Spells: Improved spell category cooldown handling

* Category cooldown is stored with the spell that started the cooldown (and only resetting cooldown on that spell will clear cooldowns on entire category - this fully mirrors client behavior)
* This significantly reduces the amount of data saved to database for cooldowns
* Spell casts from items that have a different category specified than on spell will now check for cooldown during the cast

(cherry picked from commit 1efb3f08e278530f59d681f676b031a7fc6db3ac)

Closes #15766
Closes #15137
Closes #14837
This commit is contained in:
Shauren committed 2015-10-29 17:56:18 +01:00
1 parent 3f32307d37
commit 7dcddd90be
12 files changed
+155 -139

No files matched your search

+1 -1
View File
@@ -4668,7 +4668,7 @@ SpellCastResult Spell::CheckCast(bool strict)
return SPELL_FAILED_NOT_READY;
}
if (!m_caster->GetSpellHistory()->IsReady(m_spellInfo))
if (!m_caster->GetSpellHistory()->IsReady(m_spellInfo, m_castItemEntry))
{
if (m_triggeredByAuraSpell)
return SPELL_FAILED_DONT_REPORT;