aboutsummaryrefslogtreecommitdiff
path: root/src/game/Level3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Level3.cpp')
-rw-r--r--src/game/Level3.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp
index cd25640a185..0c921c2d760 100644
--- a/src/game/Level3.cpp
+++ b/src/game/Level3.cpp
@@ -3193,7 +3193,7 @@ bool ChatHandler::HandleLookupItemCommand(const char* args)
if(!pProto)
continue;
- int loc_idx = m_session ? m_session->GetSessionDbLocaleIndex() : objmgr.GetDBCLocaleIndex();
+ int loc_idx = GetSessionDbLocaleIndex();
if ( loc_idx >= 0 )
{
ItemLocale const *il = objmgr.GetItemLocale(pProto->ItemId);
@@ -3258,7 +3258,7 @@ bool ChatHandler::HandleLookupItemSetCommand(const char* args)
ItemSetEntry const *set = sItemSetStore.LookupEntry(id);
if(set)
{
- int loc = m_session ? m_session->GetSessionDbcLocale() : sWorld.GetDefaultDbcLocale();
+ int loc = GetSessionDbcLocale();
std::string name = set->name[loc];
if(name.empty())
continue;
@@ -3268,7 +3268,7 @@ bool ChatHandler::HandleLookupItemSetCommand(const char* args)
loc = 0;
for(; loc < MAX_LOCALE; ++loc)
{
- if(m_session && loc==m_session->GetSessionDbcLocale())
+ if(loc==GetSessionDbcLocale())
continue;
name = set->name[loc];
@@ -3321,7 +3321,7 @@ bool ChatHandler::HandleLookupSkillCommand(const char* args)
SkillLineEntry const *skillInfo = sSkillLineStore.LookupEntry(id);
if(skillInfo)
{
- int loc = m_session ? m_session->GetSessionDbcLocale() : sWorld.GetDefaultDbcLocale();
+ int loc = GetSessionDbcLocale();
std::string name = skillInfo->name[loc];
if(name.empty())
continue;
@@ -3331,7 +3331,7 @@ bool ChatHandler::HandleLookupSkillCommand(const char* args)
loc = 0;
for(; loc < MAX_LOCALE; ++loc)
{
- if(m_session && loc==m_session->GetSessionDbcLocale())
+ if(loc==GetSessionDbcLocale())
continue;
name = skillInfo->name[loc];
@@ -3399,7 +3399,7 @@ bool ChatHandler::HandleLookupSpellCommand(const char* args)
SpellEntry const *spellInfo = sSpellStore.LookupEntry(id);
if(spellInfo)
{
- int loc = m_session ? m_session->GetSessionDbcLocale() : sWorld.GetDefaultDbcLocale();
+ int loc = GetSessionDbcLocale();
std::string name = spellInfo->SpellName[loc];
if(name.empty())
continue;
@@ -3409,7 +3409,7 @@ bool ChatHandler::HandleLookupSpellCommand(const char* args)
loc = 0;
for(; loc < MAX_LOCALE; ++loc)
{
- if(m_session && loc==m_session->GetSessionDbcLocale())
+ if(loc==GetSessionDbcLocale())
continue;
name = spellInfo->SpellName[loc];
@@ -3498,7 +3498,7 @@ bool ChatHandler::HandleLookupQuestCommand(const char* args)
{
Quest * qinfo = iter->second;
- int loc_idx = m_session ? m_session->GetSessionDbLocaleIndex() : objmgr.GetDBCLocaleIndex();
+ int loc_idx = GetSessionDbLocaleIndex();
if ( loc_idx >= 0 )
{
QuestLocale const *il = objmgr.GetQuestLocale(qinfo->GetQuestId());
@@ -3598,7 +3598,7 @@ bool ChatHandler::HandleLookupCreatureCommand(const char* args)
if(!cInfo)
continue;
- int loc_idx = m_session ? m_session->GetSessionDbLocaleIndex() : objmgr.GetDBCLocaleIndex();
+ int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
CreatureLocale const *cl = objmgr.GetCreatureLocale (id);
@@ -3663,7 +3663,7 @@ bool ChatHandler::HandleLookupObjectCommand(const char* args)
if(!gInfo)
continue;
- int loc_idx = m_session ? m_session->GetSessionDbLocaleIndex() : objmgr.GetDBCLocaleIndex();
+ int loc_idx = GetSessionDbLocaleIndex();
if ( loc_idx >= 0 )
{
GameObjectLocale const *gl = objmgr.GetGameObjectLocale(id);
@@ -3728,7 +3728,7 @@ bool ChatHandler::HandleLookupTaxiNodeCommand(const char * args)
TaxiNodesEntry const *nodeEntry = sTaxiNodesStore.LookupEntry(id);
if(nodeEntry)
{
- int loc = m_session ? m_session->GetSessionDbcLocale() : sWorld.GetDefaultDbcLocale();
+ int loc = GetSessionDbcLocale();
std::string name = nodeEntry->name[loc];
if(name.empty())
continue;
@@ -3738,7 +3738,7 @@ bool ChatHandler::HandleLookupTaxiNodeCommand(const char * args)
loc = 0;
for(; loc < MAX_LOCALE; ++loc)
{
- if(m_session && loc==m_session->GetSessionDbcLocale())
+ if(loc==GetSessionDbcLocale())
continue;
name = nodeEntry->name[loc];
@@ -5018,7 +5018,7 @@ bool ChatHandler::HandleListAurasCommand (const char * /*args*/)
{
bool talent = GetTalentSpellCost(itr->second->GetId()) > 0;
- char const* name = itr->second->GetSpellProto()->SpellName[m_session->GetSessionDbcLocale()];
+ char const* name = itr->second->GetSpellProto()->SpellName[GetSessionDbcLocale()];
if (m_session)
{
@@ -5049,7 +5049,9 @@ bool ChatHandler::HandleListAurasCommand (const char * /*args*/)
PSendSysMessage(LANG_COMMAND_TARGET_LISTAURATYPE, uAuraList.size(), i);
for (Unit::AuraEffectList::const_iterator itr = uAuraList.begin(); itr != uAuraList.end(); ++itr)
{
- char const* name = (*itr)->GetSpellProto()->SpellName[m_session->GetSessionDbcLocale()];
+ bool talent = GetTalentSpellCost((*itr)->GetId()) > 0;
+
+ char const* name = (*itr)->GetSpellProto()->SpellName[GetSessionDbcLocale()];
std::ostringstream ss_name;
ss_name << "|cffffffff|Hspell:" << (*itr)->GetId() << "|h[" << name << "]|h|r";