mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 13:16:39 +00:00
[Databuckets] Move Databuckets to Common (#4918)
* [Databuckets] Move Databuckets to Common * Fix linking issue
This commit is contained in:
+21
-1
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user