Port relevant cooldown category handling and Duel Cooldown reset script

Core/Spells: Cooldown updates
Core/Player: implement ResetCoolDownAfterDuel configurable feature
Core/Player rewritten duel CD reset system
Core/Spells: fixed some rare stealth/prowl visual bugs after duel cd reset
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

Core/Misc: Warning fix
Scripts/DuelReset:

- impemented health and mana reset
- do not reset anything when duel is interrupted

Scripts/DuelReset:

- fixed druid mana restoration
- fixed bug when a player accepts duel with a spel on onHold true (like when stealth of rogue/druid is active)

Core/Spells: Fixed Raise Dead cooldown
Core/Spells: Fixed typo in ecbbcc8972
Core/Spell: fixed possible exploit in Duel Reset script

- thanks @Runico for reporting it

Scripts/DuelReset:

- do not reset when duel is fled
- minor improvement to SpellHistory::RestoreCooldonStateAfter duel method
This commit is contained in:
ariel-
2016-01-11 14:16:28 -03:00
parent e25514f0f8
commit 446cb1e5c5
19 changed files with 421 additions and 172 deletions

View File

@@ -1203,6 +1203,8 @@ CREATE TABLE `character_spell_cooldown` (
`spell` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell Identifier',
`item` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Item Identifier',
`time` int(10) unsigned NOT NULL DEFAULT '0',
`categoryId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell category Id',
`categoryEnd` int(10) unsigned NOT NULL DEFAULT '0';
PRIMARY KEY (`guid`,`spell`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -2533,6 +2535,8 @@ CREATE TABLE `pet_spell_cooldown` (
`guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier, Low part',
`spell` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell Identifier',
`time` int(10) unsigned NOT NULL DEFAULT '0',
`categoryId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell category Id',
`categoryEnd` int(10) unsigned NOT NULL DEFAULT '0';
PRIMARY KEY (`guid`,`spell`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;