aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2015-09-10 19:39:30 +0200
committerShauren <shauren.trinity@gmail.com>2015-09-10 19:39:30 +0200
commit1efb3f08e278530f59d681f676b031a7fc6db3ac (patch)
treedbf88a94966ccc2f6f5f91896fb2962bc5bcf715 /src/server/scripts
parentb194595c07762e0be0475b7e9f86be9de6f76a06 (diff)
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
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index 98c6781e866..c1aecf6ed4d 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -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));
}
}