aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-10 14:51:51 -0500
committermegamage <none@none>2009-05-10 14:51:51 -0500
commitff3332f0661e0f19a2afa34a96997066bf99cc8a (patch)
treee5c66472dab00375935255adda802d2250606150 /src/game/Player.cpp
parentb8e82a23a6ddfd5ee506745bb04dbfd654112cdc (diff)
[7809] Replace repeating "remove cooldown and send update to client" code by function call. Author: VladimirMangos
--HG-- branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 4185e18ee47..b3aad430b32 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -3289,6 +3289,20 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool update_action_bar_
}
}
+
+void Player::RemoveSpellCooldown( uint32 spell_id, bool update /* = false */ )
+{
+ m_spellCooldowns.erase(spell_id);
+
+ if(update)
+ {
+ WorldPacket data(SMSG_CLEAR_COOLDOWN, (4+8));
+ data << uint32(spell_id);
+ data << uint64(GetGUID());
+ SendDirectMessage(&data);
+ }
+}
+
void Player::RemoveArenaSpellCooldowns()
{
// remove cooldowns on spells that has < 15 min CD