mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
fix(Core/Mail): load mails on login instead of when requested (#8065)
This commit is contained in:
@@ -842,9 +842,8 @@ enum PlayerLoginQueryIndex
|
||||
PLAYER_LOGIN_QUERY_LOAD_REPUTATION = 7,
|
||||
PLAYER_LOGIN_QUERY_LOAD_INVENTORY = 8,
|
||||
PLAYER_LOGIN_QUERY_LOAD_ACTIONS = 9,
|
||||
PLAYER_LOGIN_QUERY_LOAD_MAIL_COUNT = 10,
|
||||
PLAYER_LOGIN_QUERY_LOAD_MAIL_UNREAD_COUNT = 11,
|
||||
PLAYER_LOGIN_QUERY_LOAD_MAIL_DATE = 12,
|
||||
PLAYER_LOGIN_QUERY_LOAD_MAILS = 10,
|
||||
PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS = 11,
|
||||
PLAYER_LOGIN_QUERY_LOAD_SOCIAL_LIST = 13,
|
||||
PLAYER_LOGIN_QUERY_LOAD_HOME_BIND = 14,
|
||||
PLAYER_LOGIN_QUERY_LOAD_SPELL_COOLDOWNS = 15,
|
||||
@@ -1576,19 +1575,17 @@ public:
|
||||
|
||||
void RemoveMail(uint32 id);
|
||||
|
||||
void AddMail(Mail* mail) { totalMailCount++; m_mailCache.push_front(mail); }// for call from WorldSession::SendMailTo
|
||||
uint32 GetMailSize() { return totalMailCount; }
|
||||
uint32 GetMailCacheSize() { return m_mailCache.size();}
|
||||
void AddMail(Mail* mail) { m_mail.push_front(mail); }// for call from WorldSession::SendMailTo
|
||||
uint32 GetMailSize() { return m_mail.size();}
|
||||
Mail* GetMail(uint32 id);
|
||||
|
||||
PlayerMails const& GetMails() const { return m_mailCache; }
|
||||
PlayerMails const& GetMails() const { return m_mail; }
|
||||
|
||||
/*********************************************************/
|
||||
/*** MAILED ITEMS SYSTEM ***/
|
||||
/*********************************************************/
|
||||
|
||||
uint8 unReadMails;
|
||||
uint32 totalMailCount;
|
||||
time_t m_nextMailDelivereTime;
|
||||
|
||||
typedef std::unordered_map<ObjectGuid::LowType, Item*> ItemMap;
|
||||
@@ -2642,9 +2639,8 @@ public:
|
||||
void _LoadAuras(PreparedQueryResult result, uint32 timediff);
|
||||
void _LoadGlyphAuras();
|
||||
void _LoadInventory(PreparedQueryResult result, uint32 timeDiff);
|
||||
void _LoadMailInit(PreparedQueryResult resultMailCount, PreparedQueryResult resultUnread, PreparedQueryResult resultDelivery);
|
||||
void _LoadMail();
|
||||
void _LoadMailedItems(Mail* mail);
|
||||
void _LoadMail(PreparedQueryResult mailsResult, PreparedQueryResult mailItemsResult);
|
||||
static Item* _LoadMailedItem(ObjectGuid const& playerGuid, Player* player, uint32 mailId, Mail* mail, Field* fields);
|
||||
void _LoadQuestStatus(PreparedQueryResult result);
|
||||
void _LoadQuestStatusRewarded(PreparedQueryResult result);
|
||||
void _LoadDailyQuestStatus(PreparedQueryResult result);
|
||||
@@ -2741,7 +2737,7 @@ public:
|
||||
uint32 m_GuildIdInvited;
|
||||
uint32 m_ArenaTeamIdInvited;
|
||||
|
||||
PlayerMails m_mailCache;
|
||||
PlayerMails m_mail;
|
||||
PlayerSpellMap m_spells;
|
||||
PlayerTalentMap m_talents;
|
||||
uint32 m_lastPotionId; // last used health/mana potion in combat, that block next potion use
|
||||
|
||||
Reference in New Issue
Block a user