Core/Players: Partial port of baebb2d602 (just packet sending function)

(cherry picked from commit baebb2d602)
This commit is contained in:
Shauren
2018-12-30 18:47:17 +01:00
parent c1a144da45
commit f8dc4da282
2 changed files with 8 additions and 1 deletions

View File

@@ -2649,6 +2649,12 @@ void Player::SendKnownSpells()
SendDirectMessage(knownSpells.Write());
}
void Player::SendUnlearnSpells()
{
WorldPackets::Spells::SendUnlearnSpells sendUnlearnSpells;
SendDirectMessage(sendUnlearnSpells.Write());
}
void Player::RemoveMail(uint32 id)
{
for (PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); ++itr)
@@ -24266,7 +24272,7 @@ void Player::SendInitialPacketsBeforeAddToMap()
SendKnownSpells();
/// SMSG_SEND_UNLEARN_SPELLS
SendDirectMessage(WorldPackets::Spells::SendUnlearnSpells().Write());
SendUnlearnSpells();
/// SMSG_SEND_SPELL_HISTORY
WorldPackets::Spells::SendSpellHistory sendSpellHistory;

View File

@@ -1746,6 +1746,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
void SendProficiency(ItemClass itemClass, uint32 itemSubclassMask) const;
void SendKnownSpells();
void SendUnlearnSpells();
bool AddSpell(uint32 spellId, bool active, bool learning, bool dependent, bool disabled, bool loading = false, int32 fromSkill = 0);
void LearnSpell(uint32 spell_id, bool dependent, int32 fromSkill = 0, bool suppressMessaging = false);
void RemoveSpell(uint32 spell_id, bool disabled = false, bool learn_low_rank = true, bool suppressMessaging = false);