Core/ObjectMgr: Remove GetPlayer function (Remove double use of singletons)

This commit is contained in:
Spp-
2011-07-27 12:14:27 +02:00
parent fa50c0a464
commit b2a84d9f1e
47 changed files with 166 additions and 168 deletions
+2 -2
View File
@@ -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);