Core/Misc: Moved CharacterInfo out of world to separate class
This commit is contained in:
1 parent
5373e2bd3b
commit
5e1a7bcfbb
43 files changed
+520
-391
No files matched your search
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "CharacterCache.h"
|
||||
#include "Chat.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "AccountMgr.h"
|
||||
@@ -175,7 +176,7 @@ public:
|
||||
{
|
||||
case HighGuid::Player:
|
||||
{
|
||||
object = sObjectMgr->GetPlayerByLowGUID(guidLow);
|
||||
object = ObjectAccessor::FindPlayerByLowGUID(guidLow);
|
||||
if (!object)
|
||||
{
|
||||
handler->SendSysMessage(LANG_PLAYER_NOT_FOUND);
|
||||
@@ -810,7 +811,7 @@ public:
|
||||
{
|
||||
case HighGuid::Player:
|
||||
{
|
||||
object = sObjectMgr->GetPlayerByLowGUID(guidLow);
|
||||
object = ObjectAccessor::FindPlayerByLowGUID(guidLow);
|
||||
if (!object)
|
||||
{
|
||||
handler->SendSysMessage(LANG_PLAYER_NOT_FOUND);
|
||||
@@ -1529,7 +1530,7 @@ public:
|
||||
ObjectGuid parseGUID(HighGuid::Player, uint32(atoul(args)));
|
||||
|
||||
// ... and make sure we get a target, somehow.
|
||||
if (sObjectMgr->GetPlayerNameByGUID(parseGUID, targetName))
|
||||
if (sCharacterCache->GetCharacterNameByGuid(parseGUID, targetName))
|
||||
{
|
||||
target = ObjectAccessor::FindPlayer(parseGUID);
|
||||
targetGuid = parseGUID;
|
||||
@@ -1936,7 +1937,7 @@ public:
|
||||
if (!handler->extractPlayerTarget(nameStr, &target, &targetGuid, &targetName))
|
||||
return false;
|
||||
|
||||
uint32 accountId = target ? target->GetSession()->GetAccountId() : sObjectMgr->GetPlayerAccountIdByGUID(targetGuid);
|
||||
uint32 accountId = target ? target->GetSession()->GetAccountId() : sCharacterCache->GetCharacterAccountIdByGuid(targetGuid);
|
||||
|
||||
// find only player from same account if any
|
||||
if (!target)
|
||||
@@ -2005,7 +2006,7 @@ public:
|
||||
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName))
|
||||
return false;
|
||||
|
||||
uint32 accountId = target ? target->GetSession()->GetAccountId() : sObjectMgr->GetPlayerAccountIdByGUID(targetGuid);
|
||||
uint32 accountId = target ? target->GetSession()->GetAccountId() : sCharacterCache->GetCharacterAccountIdByGuid(targetGuid);
|
||||
|
||||
// find only player from same account if any
|
||||
if (!target)
|
||||
@@ -2562,7 +2563,7 @@ public:
|
||||
if (targetName)
|
||||
{
|
||||
// Check for offline players
|
||||
ObjectGuid guid = sWorld->GetCharacterGuidByName(name);
|
||||
ObjectGuid guid = sCharacterCache->GetCharacterGuidByName(name);
|
||||
if (guid.IsEmpty())
|
||||
{
|
||||
handler->SendSysMessage(LANG_COMMAND_FREEZE_WRONG);
|
||||
|
||||
Reference in new issue
Block a user