Core/Spells: Fixed totem summoning behavior (summoning new totem while old is still active will not prevent new one from spawning) and fixed totem cooldowns

Closes #1609
Closes #1615
This commit is contained in:
Shauren
2011-05-21 10:58:32 +02:00
parent 463f831b29
commit c3778487f0
3 changed files with 18 additions and 17 deletions
+3 -2
View File
@@ -20574,10 +20574,11 @@ void Player::AddSpellCooldown(uint32 spellid, uint32 itemid, time_t end_time)
m_spellCooldowns[spellid] = sc;
}
void Player::SendCooldownEvent(SpellEntry const *spellInfo, uint32 itemId, Spell* spell)
void Player::SendCooldownEvent(SpellEntry const* spellInfo, uint32 itemId /*= 0*/, Spell* spell /*= NULL*/, bool setCooldown /*= true*/)
{
// start cooldowns at server side, if any
AddSpellAndCategoryCooldowns(spellInfo, itemId, spell);
if (setCooldown)
AddSpellAndCategoryCooldowns(spellInfo, itemId, spell);
// Send activate cooldown timer (possible 0) at client side
WorldPacket data(SMSG_COOLDOWN_EVENT, 4 + 8);