mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Performance] Store Player Title Sets in Client Memory (#4836)
* [Performance] Store Player Title Sets in Zone Memory * Move to client memory * Update client_packet.cpp * Update zonedb.cpp * Save only when necessary * Single Insert * Add optional insert flag * Update client.h * Consolidation
This commit is contained in:
@@ -4272,3 +4272,28 @@ void ZoneDatabase::SaveCharacterEXPModifier(Client* c)
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
void ZoneDatabase::LoadCharacterTitleSets(Client* c)
|
||||
{
|
||||
if (!zone || !c) {
|
||||
return;
|
||||
}
|
||||
|
||||
const auto& l = PlayerTitlesetsRepository::GetWhere(
|
||||
*this,
|
||||
fmt::format(
|
||||
"`char_id` = {}",
|
||||
c->CharacterID()
|
||||
)
|
||||
);
|
||||
|
||||
if (l.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const uint32 character_id = c->CharacterID();
|
||||
|
||||
for (const auto& e : l) {
|
||||
c->EnableTitle(e.title_set, false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user