Skip to content

Commit

Permalink
[10209] Output leaned before disabled ranks at talent re-learn or spe…
Browse files Browse the repository at this point in the history
…c swith in proper order.
  • Loading branch information
VladimirMangos committed Jul 17, 2010
1 parent e8c8f58 commit f18ddaf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions src/game/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10208"
#define REVISION_NR "10209"
#endif // __REVISION_NR_H__

3 comments on commit f18ddaf

@BuloZB
Copy link

@BuloZB BuloZB commented on f18ddaf Jul 17, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

´´but it is soon´´

fail

@VladimirMangos
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what you meaning?

@PatSmuk
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O_o

Please sign in to comment.