[Performance] Mail key is now cached during player load (#3339)

* [Performance] Mail key is now cached during player load

* More refactoring
This commit is contained in:
Chris Miles
2023-05-09 13:22:43 -05:00
committed by GitHub
parent 93a4153a4b
commit dbc6346fe8
7 changed files with 62 additions and 38 deletions
+7 -1
View File
@@ -1267,6 +1267,12 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
database.LoadCharacterLeadershipAA(cid, &m_pp); /* Load Character Leadership AA's */
database.LoadCharacterTribute(cid, &m_pp); /* Load CharacterTribute */
// this pattern is strange
// this is remnants of the old way of doing things
auto mail_keys = database.GetMailKey(CharacterID());
m_mail_key_full = mail_keys.mail_key_full;
m_mail_key = mail_keys.mail_key;
/* Load AdventureStats */
AdventureStats_Struct as;
if (database.GetAdventureStats(cid, &as))
@@ -11677,7 +11683,7 @@ void Client::Handle_OP_QueryUCSServerStatus(const EQApplicationPacket *app)
EQApplicationPacket* outapp = nullptr;
std::string buffer;
std::string MailKey = database.GetMailKey(CharacterID(), true);
std::string MailKey = GetMailKey();
EQ::versions::UCSVersion ConnectionType = EQ::versions::ucsUnknown;
// chat server packet