Core/Spells: fixed sending cooldown data in SMSG_SEND_KNOWN_SPELLS
This commit is contained in:
1 parent
e34c38cef4
commit
fe7816bb71
4 files changed
+24
-30
No files matched your search
@@ -2627,16 +2627,10 @@ void Player::SendKnownSpells()
|
||||
|
||||
knownSpells.KnownSpells.push_back(spell.first);
|
||||
|
||||
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell.first))
|
||||
{
|
||||
uint32 cooldown = GetSpellHistory()->GetRemainingCooldown(spellInfo, false);
|
||||
uint32 categoryCooldown = GetSpellHistory()->GetRemainingCategoryCooldown(spellInfo);
|
||||
|
||||
if (cooldown || categoryCooldown)
|
||||
knownSpells.SpellHistoryEntries.push_back({ spellInfo->Id, 0, uint16(spellInfo->GetCategory()), int32(cooldown), int32(categoryCooldown) });
|
||||
}
|
||||
}
|
||||
|
||||
GetSpellHistory()->WriteSpellHistoryEntries<Player>(knownSpells.SpellHistoryEntries);
|
||||
|
||||
SendDirectMessage(knownSpells.Write());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user