Removed useless code. Mail loading triggered at login by client anyway.

This commit is contained in:
tomrus88 2009-12-18 00:10:48 +03:00
parent 57126880cf
commit 7d285c5ed4
4 changed files with 31 additions and 50 deletions

View file

@ -412,7 +412,6 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa
rest_type=REST_TYPE_NO;
////////////////////Rest System/////////////////////
m_mailsLoaded = false;
m_mailsUpdated = false;
unReadMails = 0;
m_nextMailDelivereTime = 0;
@ -14891,8 +14890,8 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
// apply original stats mods before spell loading or item equipment that call before equip _RemoveStatsMods()
//mails are loaded only when needed ;-) - when player in game click on mailbox.
//_LoadMail();
// Mail
_LoadMail();
_LoadAuras(holder->GetResult(PLAYER_LOGIN_QUERY_LOADAURAS), time_diff);
_LoadGlyphAuras();
@ -15514,7 +15513,6 @@ void Player::_LoadMail()
} while( result->NextRow() );
delete result;
}
m_mailsLoaded = true;
}
void Player::LoadPet()
@ -16333,9 +16331,6 @@ void Player::_SaveInventory()
void Player::_SaveMail()
{
if (!m_mailsLoaded)
return;
for (PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); ++itr)
{
Mail *m = (*itr);