Send SMSG_LEARNED_SPELL before relearning or respeccing disabled spells/talents (fix by Vladimir)
(Ensures proper ordering when attempting to learn higher ranked/disabled spells/talents) --HG-- branch : trunk
This commit is contained in:
@@ -3536,6 +3536,15 @@ void Player::learnSpell(uint32 spell_id, bool dependent)
|
|||||||
|
|
||||||
bool learning = addSpell(spell_id,active,true,dependent,false);
|
bool learning = addSpell(spell_id,active,true,dependent,false);
|
||||||
|
|
||||||
|
// prevent duplicated entires in spell book, also not send if not in world (loading)
|
||||||
|
if (learning || IsInWorld())
|
||||||
|
{
|
||||||
|
WorldPacket data(SMSG_LEARNED_SPELL, 6);
|
||||||
|
data << uint32(spell_id);
|
||||||
|
data << uint16(0);
|
||||||
|
GetSession()->SendPacket(&data);
|
||||||
|
}
|
||||||
|
|
||||||
// learn all disabled higher ranks and required spells (recursive)
|
// learn all disabled higher ranks and required spells (recursive)
|
||||||
if (disabled)
|
if (disabled)
|
||||||
{
|
{
|
||||||
@@ -3555,15 +3564,6 @@ void Player::learnSpell(uint32 spell_id, bool dependent)
|
|||||||
learnSpell(itr2->second, false);
|
learnSpell(itr2->second, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// prevent duplicated entires in spell book, also not send if not in world (loading)
|
|
||||||
if (!learning || !IsInWorld())
|
|
||||||
return;
|
|
||||||
|
|
||||||
WorldPacket data(SMSG_LEARNED_SPELL, 6);
|
|
||||||
data << uint32(spell_id);
|
|
||||||
data << uint16(0);
|
|
||||||
GetSession()->SendPacket(&data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
|
void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
|
||||||
|
|||||||
Reference in New Issue
Block a user