[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:
Chris Miles
2024-12-12 01:17:08 -06:00
committed by GitHub
parent 5c6e7a8b09
commit 66a7dd0143
10 changed files with 181 additions and 323 deletions
+20
View File
@@ -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);
}
}