mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Databuckets] Improved Reliability and Performance of Databuckets (#4562)
* [Databuckets] Don't broadcast client-scoped updates * Remove temp feature flag * Remove distributed caching, only cache for character scoped data, simplify * Update bot.cpp * Cleanup * Update data_bucket.cpp * Cleanup * Cleanup * Remove BulkLoadEntities from LoadNPCTypes * Update data_bucket.cpp * Cleanup * More cleanup * More cleanup * BulkLoadEntities to BulkLoadEntitiesToCache * Add CanCache in DeleteData to gate an unnecessary call
This commit is contained in:
@@ -572,6 +572,8 @@ Mob::~Mob()
|
||||
|
||||
m_close_mobs.clear();
|
||||
|
||||
ClearDataBucketCache();
|
||||
|
||||
LeaveHealRotationTargetPool();
|
||||
}
|
||||
|
||||
@@ -8606,3 +8608,21 @@ std::unordered_map<uint16, Mob *> &Mob::GetCloseMobList(float distance)
|
||||
{
|
||||
return entity_list.GetCloseMobList(this, distance);
|
||||
}
|
||||
|
||||
void Mob::ClearDataBucketCache()
|
||||
{
|
||||
if (IsOfClientBot()) {
|
||||
uint64 id = 0;
|
||||
DataBucketLoadType::Type t{};
|
||||
if (IsBot()) {
|
||||
id = CastToBot()->GetBotID();
|
||||
t = DataBucketLoadType::Bot;
|
||||
}
|
||||
else if (IsClient()) {
|
||||
id = CastToClient()->CharacterID();
|
||||
t = DataBucketLoadType::Client;
|
||||
}
|
||||
|
||||
DataBucket::DeleteFromCache(id, t);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user