aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Chat/Chat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Chat/Chat.cpp')
-rwxr-xr-xsrc/server/game/Chat/Chat.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp
index 32002068453..6d6d282ebe2 100755
--- a/src/server/game/Chat/Chat.cpp
+++ b/src/server/game/Chat/Chat.cpp
@@ -452,7 +452,7 @@ ChatCommand * ChatHandler::getCommandTable()
{
// count total number of top-level commands
size_t total = getCommandTableSize(commandTable);
- std::vector<ChatCommand*> const& dynamic = sScriptMgr.GetChatCommands();
+ std::vector<ChatCommand*> const& dynamic = sScriptMgr->GetChatCommands();
for (std::vector<ChatCommand*>::const_iterator it = dynamic.begin(); it != dynamic.end(); ++it)
total += getCommandTableSize(*it);
total += 1; // ending zero
@@ -502,7 +502,7 @@ bool ChatHandler::HasLowerSecurity(Player* target, uint64 guid, bool strong)
if (target)
target_session = target->GetSession();
else if (guid)
- target_account = sObjectMgr.GetPlayerAccountIdByGUID(guid);
+ target_account = sObjectMgr->GetPlayerAccountIdByGUID(guid);
if (!target_session && !target_account)
{
@@ -529,7 +529,7 @@ bool ChatHandler::HasLowerSecurityAccount(WorldSession* target, uint32 target_ac
if (target)
target_sec = target->GetSecurity();
else if (target_account)
- target_sec = sAccountMgr.GetSecurity(target_account);
+ target_sec = sAccountMgr->GetSecurity(target_account);
else
return true; // caller must report error for (target == NULL && target_account == 0)
@@ -1091,7 +1091,7 @@ valid examples:
c = reader.peek();
}
- linkedQuest = sObjectMgr.GetQuestTemplate(questid);
+ linkedQuest = sObjectMgr->GetQuestTemplate(questid);
if (!linkedQuest)
{
@@ -1262,7 +1262,7 @@ valid examples:
if (linkedSpell->Attributes & SPELL_ATTR0_TRADESPELL)
{
// lookup skillid
- SkillLineAbilityMapBounds bounds = sSpellMgr.GetSkillLineAbilityMapBounds(linkedSpell->Id);
+ SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(linkedSpell->Id);
if (bounds.first == bounds.second)
{
return false;
@@ -1309,7 +1309,7 @@ valid examples:
{
if (linkedQuest->GetTitle() != buffer)
{
- QuestLocale const *ql = sObjectMgr.GetQuestLocale(linkedQuest->GetQuestId());
+ QuestLocale const *ql = sObjectMgr->GetQuestLocale(linkedQuest->GetQuestId());
if (!ql)
{
@@ -1350,7 +1350,7 @@ valid examples:
if (expectedName != buffer)
{
- ItemLocale const *il = sObjectMgr.GetItemLocale(linkedItem->ItemId);
+ ItemLocale const *il = sObjectMgr->GetItemLocale(linkedItem->ItemId);
bool foundName = false;
for (uint8 dbIndex = LOCALE_koKR; dbIndex < TOTAL_LOCALES; ++dbIndex)
@@ -1606,7 +1606,7 @@ Player * ChatHandler::getSelectedPlayer()
if (guid == 0)
return m_session->GetPlayer();
- return sObjectMgr.GetPlayer(guid);
+ return sObjectMgr->GetPlayer(guid);
}
Unit* ChatHandler::getSelectedUnit()
@@ -1809,7 +1809,7 @@ GameObject* ChatHandler::GetObjectGlobalyWithGuidOrNearWithDbGuid(uint32 lowguid
GameObject* obj = pl->GetMap()->GetGameObject(MAKE_NEW_GUID(lowguid, entry, HIGHGUID_GAMEOBJECT));
- if (!obj && sObjectMgr.GetGOData(lowguid)) // guid is DB guid of object
+ if (!obj && sObjectMgr->GetGOData(lowguid)) // guid is DB guid of object
{
// search near player then
CellPair p(Trinity::ComputeCellPair(pl->GetPositionX(), pl->GetPositionY()));
@@ -1909,9 +1909,9 @@ GameTele const* ChatHandler::extractGameTeleFromLink(char* text)
// id case (explicit or from shift link)
if (cId[0] >= '0' || cId[0] >= '9')
if (uint32 id = atoi(cId))
- return sObjectMgr.GetGameTele(id);
+ return sObjectMgr->GetGameTele(id);
- return sObjectMgr.GetGameTele(cId);
+ return sObjectMgr->GetGameTele(cId);
}
enum GuidLinkType
@@ -1948,10 +1948,10 @@ uint64 ChatHandler::extractGuidFromLink(char* text)
if (!normalizePlayerName(name))
return 0;
- if (Player* player = sObjectMgr.GetPlayer(name.c_str()))
+ if (Player* player = sObjectMgr->GetPlayer(name.c_str()))
return player->GetGUID();
- if (uint64 guid = sObjectMgr.GetPlayerGUIDByName(name))
+ if (uint64 guid = sObjectMgr->GetPlayerGUIDByName(name))
return guid;
return 0;
@@ -1960,7 +1960,7 @@ uint64 ChatHandler::extractGuidFromLink(char* text)
{
uint32 lowguid = (uint32)atol(idS);
- if (CreatureData const* data = sObjectMgr.GetCreatureData(lowguid))
+ if (CreatureData const* data = sObjectMgr->GetCreatureData(lowguid))
return MAKE_NEW_GUID(lowguid,data->id,HIGHGUID_UNIT);
else
return 0;
@@ -1969,7 +1969,7 @@ uint64 ChatHandler::extractGuidFromLink(char* text)
{
uint32 lowguid = (uint32)atol(idS);
- if (GameObjectData const* data = sObjectMgr.GetGOData(lowguid))
+ if (GameObjectData const* data = sObjectMgr->GetGOData(lowguid))
return MAKE_NEW_GUID(lowguid,data->id,HIGHGUID_GAMEOBJECT);
else
return 0;
@@ -2006,14 +2006,14 @@ bool ChatHandler::extractPlayerTarget(char* args, Player** player, uint64* playe
return false;
}
- Player* pl = sObjectMgr.GetPlayer(name.c_str());
+ Player* pl = sObjectMgr->GetPlayer(name.c_str());
// if allowed player pointer
if (player)
*player = pl;
// if need guid value from DB (in name case for check player existence)
- uint64 guid = !pl && (player_guid || player_name) ? sObjectMgr.GetPlayerGUIDByName(name) : 0;
+ uint64 guid = !pl && (player_guid || player_name) ? sObjectMgr->GetPlayerGUIDByName(name) : 0;
// if allowed player guid (if no then only online players allowed)
if (player_guid)
@@ -2099,7 +2099,7 @@ int ChatHandler::GetSessionDbLocaleIndex() const
const char *CliHandler::GetTrinityString(int32 entry) const
{
- return sObjectMgr.GetTrinityStringForDBCLocale(entry);
+ return sObjectMgr->GetTrinityStringForDBCLocale(entry);
}
bool CliHandler::isAvailable(ChatCommand const& cmd) const
@@ -2141,9 +2141,9 @@ bool ChatHandler::GetPlayerGroupAndGUIDByName(const char* cname, Player* &plr, G
return false;
}
- plr = sObjectMgr.GetPlayer(name.c_str());
+ plr = sObjectMgr->GetPlayer(name.c_str());
if (offline)
- guid = sObjectMgr.GetPlayerGUIDByName(name.c_str());
+ guid = sObjectMgr->GetPlayerGUIDByName(name.c_str());
}
}
@@ -2175,5 +2175,5 @@ LocaleConstant CliHandler::GetSessionDbcLocale() const
int CliHandler::GetSessionDbLocaleIndex() const
{
- return sObjectMgr.GetDBCLocaleIndex();
+ return sObjectMgr->GetDBCLocaleIndex();
}