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

This commit is contained in:
Aokromes
2017-10-27 17:52:30 +02:00
parent 5373e2bd3b
commit 5e1a7bcfbb
43 changed files with 520 additions and 391 deletions

View File

@@ -16,6 +16,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "CharacterCache.h"
#include "Common.h"
#include "Opcodes.h"
#include "WorldPacket.h"
@@ -166,7 +167,7 @@ void Group::LoadGroupFromDB(Field* fields)
m_leaderGuid = ObjectGuid(HighGuid::Player, fields[0].GetUInt32());
// group leader not exist
if (!sObjectMgr->GetPlayerNameByGUID(m_leaderGuid, m_leaderName))
if (!sCharacterCache->GetCharacterNameByGuid(m_leaderGuid, m_leaderName))
return;
m_lootMethod = LootMethod(fields[1].GetUInt8());
@@ -204,7 +205,7 @@ void Group::LoadMemberFromDB(ObjectGuid::LowType guidLow, uint8 memberFlags, uin
member.guid = ObjectGuid(HighGuid::Player, guidLow);
// skip non-existed member
if (!sObjectMgr->GetPlayerNameByGUID(member.guid, member.name))
if (!sCharacterCache->GetCharacterNameByGuid(member.guid, member.name))
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GROUP_MEMBER);
stmt->setUInt32(0, guidLow);