mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
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:
@@ -149,7 +149,7 @@ class spell_dk_anti_magic_shell : public SpellScriptLoader
|
||||
{
|
||||
// Cannot reduce cooldown by more than 50%
|
||||
int32 val = std::min(glyph->GetAmount(), int32(absorbedAmount) * 100 / maxHealth);
|
||||
player->GetSpellHistory()->ModifyCooldown(GetId(), -int32(player->GetSpellHistory()->GetRemainingCooldown(GetId()) * val / 100));
|
||||
player->GetSpellHistory()->ModifyCooldown(GetId(), -int32(player->GetSpellHistory()->GetRemainingCooldown(GetSpellInfo()) * val / 100));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user