Conflicts fix after cherry pick of previous commit from master branch.
This commit is contained in:
1 parent
524cc6c2d9
commit
3be239ca41
2 files changed
+12
-23
No files matched your search
@@ -3694,13 +3694,7 @@ bool Player::AddSpell(uint32 spellId, bool active, bool learning, bool dependent
|
||||
else if (IsInWorld())
|
||||
{
|
||||
if (next_active_spell_id)
|
||||
{
|
||||
// update spell ranks in spellbook and action bar
|
||||
WorldPacket data(SMSG_SUPERCEDED_SPELL, 4 + 4);
|
||||
data << uint32(spellId);
|
||||
data << uint32(next_active_spell_id);
|
||||
GetSession()->SendPacket(&data);
|
||||
}
|
||||
SendSupercededSpell(spellId, next_active_spell_id);
|
||||
else
|
||||
{
|
||||
WorldPacket data(SMSG_REMOVED_SPELL, 4);
|
||||
@@ -3797,12 +3791,7 @@ bool Player::AddSpell(uint32 spellId, bool active, bool learning, bool dependent
|
||||
if (spellInfo->IsHighRankOf(i_spellInfo))
|
||||
{
|
||||
if (IsInWorld()) // not send spell (re-/over-)learn packets at loading
|
||||
{
|
||||
WorldPacket data(SMSG_SUPERCEDED_SPELL, 4 + 4);
|
||||
data << uint32(itr2->first);
|
||||
data << uint32(spellId);
|
||||
GetSession()->SendPacket(&data);
|
||||
}
|
||||
SendSupercededSpell(itr2->first, spellId);
|
||||
|
||||
// mark old spell as disable (SMSG_SUPERCEDED_SPELL replace it in client by new)
|
||||
itr2->second->active = false;
|
||||
@@ -3813,12 +3802,7 @@ bool Player::AddSpell(uint32 spellId, bool active, bool learning, bool dependent
|
||||
else
|
||||
{
|
||||
if (IsInWorld()) // not send spell (re-/over-)learn packets at loading
|
||||
{
|
||||
WorldPacket data(SMSG_SUPERCEDED_SPELL, 4 + 4);
|
||||
data << uint32(spellId);
|
||||
data << uint32(itr2->first);
|
||||
GetSession()->SendPacket(&data);
|
||||
}
|
||||
SendSupercededSpell(spellId, itr2->first);
|
||||
|
||||
// mark new spell as disable (not learned yet for client and will not learned)
|
||||
newspell->active = false;
|
||||
@@ -4170,10 +4154,7 @@ void Player::RemoveSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
|
||||
if (AddSpell(prev_id, true, false, prev_itr->second->dependent, prev_itr->second->disabled))
|
||||
{
|
||||
// downgrade spell ranks in spellbook and action bar
|
||||
WorldPacket data(SMSG_SUPERCEDED_SPELL, 4 + 4);
|
||||
data << uint32(spell_id);
|
||||
data << uint32(prev_id);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendSupercededSpell(spell_id, prev_id);
|
||||
prev_activate = true;
|
||||
}
|
||||
}
|
||||
@@ -27912,3 +27893,10 @@ void Player::UpdatePhasing()
|
||||
|
||||
GetSession()->SendSetPhaseShift(GetPhases(), terrainswaps, worldAreaSwaps);
|
||||
}
|
||||
|
||||
void Player::SendSupercededSpell(uint32 oldSpell, uint32 newSpell)
|
||||
{
|
||||
WorldPacket data(SMSG_SUPERCEDED_SPELL, 8);
|
||||
data << uint32(oldSpell) << uint32(newSpell);
|
||||
GetSession()->SendPacket(&data);
|
||||
}
|
||||
@@ -1264,6 +1264,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
|
||||
void SendInitialPacketsBeforeAddToMap();
|
||||
void SendInitialPacketsAfterAddToMap();
|
||||
void SendSupercededSpell(uint32 oldSpell, uint32 newSpell);
|
||||
void SendTransferAborted(uint32 mapid, TransferAbortReason reason, uint8 arg = 0);
|
||||
void SendInstanceResetWarning(uint32 mapid, Difficulty difficulty, uint32 time);
|
||||
|
||||
|
||||
Reference in new issue
Block a user