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:
@@ -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);
|
||||
|
||||
@@ -1676,7 +1676,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
}
|
||||
void AddSpellAndCategoryCooldowns(SpellEntry const* spellInfo, uint32 itemId, Spell* spell = NULL, bool infinityCooldown = false);
|
||||
void AddSpellCooldown(uint32 spell_id, uint32 itemid, time_t end_time);
|
||||
void SendCooldownEvent(SpellEntry const *spellInfo, uint32 itemId = 0, Spell* spell = NULL);
|
||||
void SendCooldownEvent(SpellEntry const* spellInfo, uint32 itemId = 0, Spell* spell = NULL, bool setCooldown = true);
|
||||
void ProhibitSpellScholl(SpellSchoolMask idSchoolMask, uint32 unTimeMs);
|
||||
void RemoveSpellCooldown(uint32 spell_id, bool update = false);
|
||||
void RemoveSpellCategoryCooldown(uint32 cat, bool update = false);
|
||||
|
||||
Reference in New Issue
Block a user