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

Closes #15349
This commit is contained in:
Shauren
2015-09-10 19:39:30 +02:00
parent b194595c07
commit 1efb3f08e2
12 changed files with 137 additions and 111 deletions

View File

@@ -0,0 +1,7 @@
ALTER TABLE `character_spell_cooldown`
ADD `categoryId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell category Id' AFTER `time`,
ADD `categoryEnd` int(10) unsigned NOT NULL DEFAULT '0' AFTER `categoryId`;
ALTER TABLE `pet_spell_cooldown`
ADD `categoryId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell category Id' AFTER `time`,
ADD `categoryEnd` int(10) unsigned NOT NULL DEFAULT '0' AFTER `categoryId`;