[Databuckets] Move Databuckets to Common (#4918)

* [Databuckets] Move Databuckets to Common

* Fix linking issue
This commit is contained in:
Chris Miles
2025-06-16 16:48:29 -05:00
committed by GitHub
parent a0ff9d67a1
commit 1be7e56b86
23 changed files with 62 additions and 60 deletions
+21 -1
View File
@@ -24,7 +24,7 @@
#include "../common/repositories/bot_data_repository.h"
#include "../common/repositories/character_data_repository.h"
#include "data_bucket.h"
#include "../common/data_bucket.h"
#include "quest_parser_collection.h"
#include "string_ids.h"
#include "worldserver.h"
@@ -8772,3 +8772,23 @@ bool Mob::IsGuildmaster() const {
return false;
}
}
bool Mob::LoadDataBucketsCache()
{
const uint32 id = GetMobTypeIdentifier();
if (!id) {
return false;
}
if (IsBot()) {
DataBucket::BulkLoadEntitiesToCache(DataBucketLoadType::Bot, {id});
}
else if (IsClient()) {
uint32 account_id = CastToClient()->AccountID();
DataBucket::BulkLoadEntitiesToCache(DataBucketLoadType::Account, {account_id});
DataBucket::BulkLoadEntitiesToCache(DataBucketLoadType::Client, {id});
}
return true;
}