[10209] Output leaned before disabled ranks at talent re-learn or spec swith in proper order.

This commit is contained in:
VladimirMangos 2010-07-17 20:43:31 +04:00
parent 624b45f333
commit d6a3347245
2 changed files with 10 additions and 10 deletions

View file

@ -3364,6 +3364,15 @@ void Player::learnSpell(uint32 spell_id, bool dependent)
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); // 3.3.3 unk
GetSession()->SendPacket(&data);
}
// learn all disabled higher ranks (recursive)
if(disabled)
{
@ -3375,15 +3384,6 @@ void Player::learnSpell(uint32 spell_id, bool dependent)
learnSpell(i->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); // 3.3.3 unk
GetSession()->SendPacket(&data);
}
void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank, bool sendUpdate)