Core/ObjectMgr: Remove GetPlayer function (Remove double use of singletons)
This commit is contained in:
@@ -19274,7 +19274,7 @@ void Player::Whisper(const std::string& text, uint32 language, uint64 receiver)
|
||||
if (!isAddonMessage) // if not addon data
|
||||
language = LANG_UNIVERSAL; // whispers should always be readable
|
||||
|
||||
Player *rPlayer = sObjectMgr->GetPlayer(receiver);
|
||||
Player *rPlayer = ObjectAccessor::FindPlayer(receiver);
|
||||
|
||||
std::string _text(text);
|
||||
sScriptMgr->OnPlayerChat(this, CHAT_MSG_WHISPER, language, _text, rPlayer);
|
||||
@@ -19755,7 +19755,7 @@ void Player::RemovePetitionsAndSigns(uint64 guid, uint32 type)
|
||||
uint64 petitionguid = MAKE_NEW_GUID(fields[1].GetUInt32(), 0, HIGHGUID_ITEM);
|
||||
|
||||
// send update if charter owner in game
|
||||
Player* owner = sObjectMgr->GetPlayer(ownerguid);
|
||||
Player* owner = ObjectAccessor::FindPlayer(ownerguid);
|
||||
if (owner)
|
||||
owner->GetSession()->SendPetitionQueryOpcode(petitionguid);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user