Core/ObjectMgr: Remove GetPlayer function (Remove double use of singletons)
This commit is contained in:
@@ -2065,7 +2065,7 @@ void Guild::BroadcastPacket(WorldPacket* packet) const
|
||||
// Members handling
|
||||
bool Guild::AddMember(const uint64& guid, uint8 rankId)
|
||||
{
|
||||
Player* player = sObjectMgr->GetPlayer(guid);
|
||||
Player* player = ObjectAccessor::FindPlayer(guid);
|
||||
// Player cannot be in guild
|
||||
if (player)
|
||||
{
|
||||
@@ -2135,7 +2135,7 @@ bool Guild::AddMember(const uint64& guid, uint8 rankId)
|
||||
void Guild::DeleteMember(const uint64& guid, bool isDisbanding, bool isKicked)
|
||||
{
|
||||
uint32 lowguid = GUID_LOPART(guid);
|
||||
Player* player = sObjectMgr->GetPlayer(guid);
|
||||
Player* player = ObjectAccessor::FindPlayer(guid);
|
||||
|
||||
// Guild master can be deleted when loading guild and guid doesn't exist in characters table
|
||||
// or when he is removed from guild by gm command
|
||||
|
||||
@@ -288,7 +288,7 @@ private:
|
||||
void ResetTabTimes();
|
||||
void ResetMoneyTime();
|
||||
|
||||
inline Player* FindPlayer() const { return sObjectMgr->GetPlayer(m_guid); }
|
||||
inline Player* FindPlayer() const { return ObjectAccessor::FindPlayer(m_guid); }
|
||||
|
||||
private:
|
||||
uint32 m_guildId;
|
||||
|
||||
Reference in New Issue
Block a user