Core/Misc: Moved CharacterInfo out of world to separate class

Closes #19030

(cherrypicked from 59ce3d6c9b)
This commit is contained in:
xinef1
2017-02-05 23:14:19 +01:00
committed by Shauren
parent 241e79f434
commit ad4e63bae1
41 changed files with 540 additions and 415 deletions

View File

@@ -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);