mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 15:46:24 +00:00
refactor(Core/Cache): move the GlobalPlayerCache to its own class (#9166)
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "ArenaTeam.h"
|
||||
#include "Battleground.h"
|
||||
#include "CharacterCache.h"
|
||||
#include "DatabaseEnvFwd.h"
|
||||
#include "DBCStores.h"
|
||||
#include "GroupReference.h"
|
||||
@@ -1500,7 +1501,6 @@ public:
|
||||
static uint32 GetUInt32ValueFromArray(Tokenizer const& data, uint16 index);
|
||||
static float GetFloatValueFromArray(Tokenizer const& data, uint16 index);
|
||||
static uint32 GetZoneIdFromDB(ObjectGuid guid);
|
||||
static uint32 GetLevelFromStorage(ObjectGuid::LowType guid);
|
||||
static bool LoadPositionFromDB(uint32& mapid, float& x, float& y, float& z, float& o, bool& in_flight, ObjectGuid::LowType guid);
|
||||
|
||||
static bool IsValidGender(uint8 Gender) { return Gender <= GENDER_FEMALE; }
|
||||
@@ -1832,16 +1832,13 @@ public:
|
||||
{
|
||||
SetUInt32Value(PLAYER_GUILDID, GuildId);
|
||||
// xinef: update global storage
|
||||
sWorld->UpdateGlobalPlayerGuild(GetGUID().GetCounter(), GuildId);
|
||||
sCharacterCache->UpdateCharacterGuildId(GetGUID(), GetGuildId());
|
||||
}
|
||||
void SetRank(uint8 rankId) { SetUInt32Value(PLAYER_GUILDRANK, rankId); }
|
||||
[[nodiscard]] uint8 GetRank() const { return uint8(GetUInt32Value(PLAYER_GUILDRANK)); }
|
||||
void SetGuildIdInvited(uint32 GuildId) { m_GuildIdInvited = GuildId; }
|
||||
[[nodiscard]] uint32 GetGuildId() const { return GetUInt32Value(PLAYER_GUILDID); }
|
||||
[[nodiscard]] Guild* GetGuild() const;
|
||||
static uint32 GetGuildIdFromStorage(ObjectGuid::LowType guid);
|
||||
static uint32 GetGroupIdFromStorage(ObjectGuid::LowType guid);
|
||||
static uint32 GetArenaTeamIdFromStorage(ObjectGuid::LowType guid, uint8 slot);
|
||||
uint32 GetGuildIdInvited() { return m_GuildIdInvited; }
|
||||
static void RemovePetitionsAndSigns(ObjectGuid guid, uint32 type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user