Skip to content

Commit

Permalink
[8887] Fixed lost auras at login from spells learned at skill load.
Browse files Browse the repository at this point in the history
This is mostly buffs form profession skill levels.
  • Loading branch information
VladimirMangos committed Nov 29, 2009
1 parent 67a9a2f commit 941281a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/game/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14503,6 +14503,9 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
SetUInt32Value(PLAYER_TRACK_CREATURES, 0 );
SetUInt32Value(PLAYER_TRACK_RESOURCES, 0 );

// cleanup aura list explicitly before skill load wher some spells can be applied
RemoveAllAuras();

_LoadSkills(holder->GetResult(PLAYER_LOGIN_QUERY_LOADSKILLS));

// make sure the unit is considered out of combat for proper loading
Expand Down Expand Up @@ -14761,7 +14764,7 @@ void Player::_LoadActions(QueryResult *result)

void Player::_LoadAuras(QueryResult *result, uint32 timediff)
{
RemoveAllAuras();
//RemoveAllAuras(); -- some spells casted before aura load, for example in LoadSkills, aura list explcitly cleaned early

//QueryResult *result = CharacterDatabase.PQuery("SELECT caster_guid,spell,effect_index,stackcount,amount,maxduration,remaintime,remaincharges FROM character_aura WHERE guid = '%u'",GetGUIDLow());

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 "8886"
#define REVISION_NR "8887"
#endif // __REVISION_NR_H__

0 comments on commit 941281a

Please sign in to comment.