[8887] Fixed lost auras at login from spells learned at skill load.

This is mostly buffs form profession skill levels.
This commit is contained in:
VladimirMangos 2009-11-29 13:38:56 +03:00
parent 4c328f4b0c
commit ce104f6281
2 changed files with 5 additions and 2 deletions

View file

@ -14503,6 +14503,9 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
SetUInt32Value(PLAYER_TRACK_CREATURES, 0 ); SetUInt32Value(PLAYER_TRACK_CREATURES, 0 );
SetUInt32Value(PLAYER_TRACK_RESOURCES, 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)); _LoadSkills(holder->GetResult(PLAYER_LOGIN_QUERY_LOADSKILLS));
// make sure the unit is considered out of combat for proper loading // make sure the unit is considered out of combat for proper loading
@ -14761,7 +14764,7 @@ void Player::_LoadActions(QueryResult *result)
void Player::_LoadAuras(QueryResult *result, uint32 timediff) 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()); //QueryResult *result = CharacterDatabase.PQuery("SELECT caster_guid,spell,effect_index,stackcount,amount,maxduration,remaintime,remaincharges FROM character_aura WHERE guid = '%u'",GetGUIDLow());

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "8886" #define REVISION_NR "8887"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__