mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-18 14:10:18 -04:00
Merge pull request #13963 from tkrokli/3.3.5
Fix Cooldown for Raise Dead (Ghoul)
This commit is contained in:
@@ -22138,6 +22138,34 @@ void Player::SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId /*= 0*/
|
||||
data << uint32(spellInfo->Id);
|
||||
data << uint64(GetGUID());
|
||||
SendDirectMessage(&data);
|
||||
|
||||
uint32 cat = spellInfo->GetCategory();
|
||||
if (cat && spellInfo->CategoryRecoveryTime)
|
||||
{
|
||||
SpellCategoryStore::const_iterator ct = sSpellsByCategoryStore.find(cat);
|
||||
if (ct != sSpellsByCategoryStore.end())
|
||||
{
|
||||
SpellCategorySet const& catSet = ct->second;
|
||||
for (SpellCooldowns::const_iterator i = m_spellCooldowns.begin(); i != m_spellCooldowns.end(); ++i)
|
||||
{
|
||||
if (i->first == spellInfo->Id) // skip main spell, already handled above
|
||||
continue;
|
||||
|
||||
SpellInfo const* spellInfo2 = sSpellMgr->GetSpellInfo(i->first);
|
||||
if (!spellInfo2 || !spellInfo2->IsCooldownStartedOnEvent())
|
||||
continue;
|
||||
|
||||
if (catSet.find(i->first) != catSet.end())
|
||||
{
|
||||
// Send activate cooldown timer (possible 0) at client side
|
||||
WorldPacket data(SMSG_COOLDOWN_EVENT, 4 + 8);
|
||||
data << uint32(i->first);
|
||||
data << uint64(GetGUID());
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Player::UpdatePotionCooldown(Spell* spell)
|
||||
|
||||
Reference in New Issue
Block a user