aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Chat/Commands
diff options
context:
space:
mode:
authorShocker <none@none>2010-09-28 08:21:51 +0300
committerShocker <none@none>2010-09-28 08:21:51 +0300
commit78803c9f09feff5213a394a84e28b8245f7e2efa (patch)
tree7e58d15fabfb5f3ebbe7364ad6424f548caacf24 /src/server/game/Chat/Commands
parent192e972a594afb020e6639de7cce617e7f4655ad (diff)
Magic numbers cleanup:
- Replace many magic numbers with constants - Use enum for vehicle flags/seat flags - Correct structure for ItemRandomSuffixEntry --HG-- branch : trunk
Diffstat (limited to 'src/server/game/Chat/Commands')
-rw-r--r--src/server/game/Chat/Commands/Level1.cpp4
-rw-r--r--src/server/game/Chat/Commands/Level2.cpp8
-rw-r--r--src/server/game/Chat/Commands/Level3.cpp24
3 files changed, 18 insertions, 18 deletions
diff --git a/src/server/game/Chat/Commands/Level1.cpp b/src/server/game/Chat/Commands/Level1.cpp
index e8d85bc6d2d..84f29260ec9 100644
--- a/src/server/game/Chat/Commands/Level1.cpp
+++ b/src/server/game/Chat/Commands/Level1.cpp
@@ -1871,7 +1871,7 @@ bool ChatHandler::HandleLookupAreaCommand(const char* args)
if (!Utf8FitTo (name, wnamepart))
{
loc = 0;
- for (; loc < MAX_LOCALE; ++loc)
+ for (; loc < TOTAL_LOCALES; ++loc)
{
if (loc == GetSessionDbcLocale ())
continue;
@@ -1885,7 +1885,7 @@ bool ChatHandler::HandleLookupAreaCommand(const char* args)
}
}
- if (loc < MAX_LOCALE)
+ if (loc < TOTAL_LOCALES)
{
if (maxResults && count++ == maxResults)
{
diff --git a/src/server/game/Chat/Commands/Level2.cpp b/src/server/game/Chat/Commands/Level2.cpp
index a8be083982e..3abdc308b3c 100644
--- a/src/server/game/Chat/Commands/Level2.cpp
+++ b/src/server/game/Chat/Commands/Level2.cpp
@@ -3749,7 +3749,7 @@ bool ChatHandler::HandleLearnAllRecipesCommand(const char* args)
if (!Utf8FitTo(name, wnamepart))
{
loc = 0;
- for (; loc < MAX_LOCALE; ++loc)
+ for (; loc < TOTAL_LOCALES; ++loc)
{
if (loc == GetSessionDbcLocale())
continue;
@@ -3763,7 +3763,7 @@ bool ChatHandler::HandleLearnAllRecipesCommand(const char* args)
}
}
- if (loc < MAX_LOCALE)
+ if (loc < TOTAL_LOCALES)
{
targetSkillInfo = skillInfo;
break;
@@ -4319,7 +4319,7 @@ bool ChatHandler::HandleLookupTitleCommand(const char* args)
if (!Utf8FitTo(name, wnamepart))
{
loc = 0;
- for (; loc < MAX_LOCALE; ++loc)
+ for (; loc < TOTAL_LOCALES; ++loc)
{
if (loc == GetSessionDbcLocale())
continue;
@@ -4333,7 +4333,7 @@ bool ChatHandler::HandleLookupTitleCommand(const char* args)
}
}
- if (loc < MAX_LOCALE)
+ if (loc < TOTAL_LOCALES)
{
if (maxResults && counter == maxResults)
{
diff --git a/src/server/game/Chat/Commands/Level3.cpp b/src/server/game/Chat/Commands/Level3.cpp
index b831d8b6294..20f49673131 100644
--- a/src/server/game/Chat/Commands/Level3.cpp
+++ b/src/server/game/Chat/Commands/Level3.cpp
@@ -3124,7 +3124,7 @@ bool ChatHandler::HandleLookupItemSetCommand(const char *args)
if (!Utf8FitTo(name, wnamepart))
{
loc = 0;
- for (; loc < MAX_LOCALE; ++loc)
+ for (; loc < TOTAL_LOCALES; ++loc)
{
if (loc == GetSessionDbcLocale())
continue;
@@ -3138,7 +3138,7 @@ bool ChatHandler::HandleLookupItemSetCommand(const char *args)
}
}
- if (loc < MAX_LOCALE)
+ if (loc < TOTAL_LOCALES)
{
if (maxResults && count++ == maxResults)
{
@@ -3197,7 +3197,7 @@ bool ChatHandler::HandleLookupSkillCommand(const char *args)
if (!Utf8FitTo(name, wnamepart))
{
loc = 0;
- for (; loc < MAX_LOCALE; ++loc)
+ for (; loc < TOTAL_LOCALES; ++loc)
{
if (loc == GetSessionDbcLocale())
continue;
@@ -3211,7 +3211,7 @@ bool ChatHandler::HandleLookupSkillCommand(const char *args)
}
}
- if (loc < MAX_LOCALE)
+ if (loc < TOTAL_LOCALES)
{
if (maxResults && count++ == maxResults)
{
@@ -3284,7 +3284,7 @@ bool ChatHandler::HandleLookupSpellCommand(const char *args)
if (!Utf8FitTo(name, wnamepart))
{
loc = 0;
- for (; loc < MAX_LOCALE; ++loc)
+ for (; loc < TOTAL_LOCALES; ++loc)
{
if (loc == GetSessionDbcLocale())
continue;
@@ -3298,7 +3298,7 @@ bool ChatHandler::HandleLookupSpellCommand(const char *args)
}
}
- if (loc < MAX_LOCALE)
+ if (loc < TOTAL_LOCALES)
{
if (maxResults && count++ == maxResults)
{
@@ -3682,7 +3682,7 @@ bool ChatHandler::HandleLookupFactionCommand(const char *args)
if (!Utf8FitTo(name, wnamepart))
{
loc = 0;
- for (; loc < MAX_LOCALE; ++loc)
+ for (; loc < TOTAL_LOCALES; ++loc)
{
if (loc == GetSessionDbcLocale())
continue;
@@ -3696,7 +3696,7 @@ bool ChatHandler::HandleLookupFactionCommand(const char *args)
}
}
- if (loc < MAX_LOCALE)
+ if (loc < TOTAL_LOCALES)
{
if (maxResults && count++ == maxResults)
{
@@ -3780,7 +3780,7 @@ bool ChatHandler::HandleLookupTaxiNodeCommand(const char * args)
if (!Utf8FitTo(name, wnamepart))
{
loc = 0;
- for (; loc < MAX_LOCALE; ++loc)
+ for (; loc < TOTAL_LOCALES; ++loc)
{
if (loc == GetSessionDbcLocale())
continue;
@@ -3794,7 +3794,7 @@ bool ChatHandler::HandleLookupTaxiNodeCommand(const char * args)
}
}
- if (loc < MAX_LOCALE)
+ if (loc < TOTAL_LOCALES)
{
if (maxResults && count++ == maxResults)
{
@@ -3851,7 +3851,7 @@ bool ChatHandler::HandleLookupMapCommand(const char *args)
if (!Utf8FitTo(name, wnamepart))
{
loc = LOCALE_enUS;
- for (; loc < MAX_LOCALE; loc++)
+ for (; loc < TOTAL_LOCALES; loc++)
{
if (m_session && loc == m_session->GetSessionDbcLocale())
continue;
@@ -3865,7 +3865,7 @@ bool ChatHandler::HandleLookupMapCommand(const char *args)
}
}
- if (loc < MAX_LOCALE)
+ if (loc < TOTAL_LOCALES)
{
// send map in "id - [name][Continent][Instance/Battleground/Arena][Raid reset time:][Heroic reset time:][Mountable]" format
std::ostringstream ss;