mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-19 08:30:34 +01:00
Core/Misc: Moved CharacterInfo out of world to separate class
Closes #19030
(cherrypicked from 59ce3d6c9b)
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "Group.h"
|
||||
#include "Battleground.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "CharacterCache.h"
|
||||
#include "Common.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Stores.h"
|
||||
@@ -186,7 +187,7 @@ void Group::LoadGroupFromDB(Field* fields)
|
||||
m_leaderGuid = ObjectGuid::Create<HighGuid::Player>(fields[0].GetUInt64());
|
||||
|
||||
// group leader not exist
|
||||
if (!ObjectMgr::GetPlayerNameByGUID(m_leaderGuid, m_leaderName))
|
||||
if (!sCharacterCache->GetCharacterNameByGuid(m_leaderGuid, m_leaderName))
|
||||
return;
|
||||
|
||||
m_lootMethod = LootMethod(fields[1].GetUInt8());
|
||||
@@ -216,7 +217,7 @@ void Group::LoadMemberFromDB(ObjectGuid::LowType guidLow, uint8 memberFlags, uin
|
||||
member.guid = ObjectGuid::Create<HighGuid::Player>(guidLow);
|
||||
|
||||
// skip non-existed member
|
||||
if (!ObjectMgr::GetPlayerNameAndClassByGUID(member.guid, member.name, member._class))
|
||||
if (!sCharacterCache->GetCharacterNameAndClassByGUID(member.guid, member.name, member._class))
|
||||
{
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GROUP_MEMBER);
|
||||
stmt->setUInt64(0, guidLow);
|
||||
|
||||
Reference in New Issue
Block a user