Merge pull request #13963 from tkrokli/3.3.5

Fix Cooldown for Raise Dead (Ghoul)
This commit is contained in:
Duarte Duarte
2015-02-11 15:17:01 +00:00
@@ -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)