mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 05:11:55 +01:00
Core/Misc: Moved CharacterInfo out of world to separate class
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user