Core: Minor cleanups (here and there)

- Fix warning
- Fix some typos
- Correct upper 'for' limit in LoadSkillLineAbilityMap
- Remove use of magic number in a query related to security levels
This commit is contained in:
Spp- committed 2011-09-13 14:15:35 +02:00
1 parent d99db2ba27
commit 33ce07bdde
7 files changed
+11 -9

No files matched your search

+3 -1
View File
@@ -222,7 +222,9 @@ public:
{
Field *fieldsLogin = resultLogin->Fetch();
handler->PSendSysMessage(LANG_ACCOUNT_LIST_LINE,
fieldsLogin[0].GetCString(), name.c_str(), fieldsLogin[1].GetCString(), fieldsDB[2].GetUInt16(), fieldsDB[3].GetUInt16(), fieldsLogin[3].GetUInt32(), fieldsLogin[2].GetUInt32());
fieldsLogin[0].GetCString(), name.c_str(), fieldsLogin[1].GetCString(),
fieldsDB[2].GetUInt16(), fieldsDB[3].GetUInt16(), fieldsLogin[3].GetUInt32(),
fieldsLogin[2].GetUInt32());
}
else
handler->PSendSysMessage(LANG_ACCOUNT_LIST_ERROR, name.c_str());
+1 -1
View File
@@ -155,7 +155,7 @@ public:
static bool HandleGMListFullCommand(ChatHandler* handler, const char* /*args*/)
{
///- Get the accounts with GM Level >0
QueryResult result = LoginDatabase.Query("SELECT a.username, aa.gmlevel FROM account a, account_access aa WHERE a.id=aa.id AND aa.gmlevel > 0");
QueryResult result = LoginDatabase.PQuery("SELECT a.username, aa.gmlevel FROM account a, account_access aa WHERE a.id=aa.id AND aa.gmlevel >= %u", SEC_MODERATOR);
if (result)
{
handler->SendSysMessage(LANG_GMLIST);
+1 -1
View File
@@ -375,7 +375,7 @@ public:
static bool HandleReloadAutobroadcastCommand(ChatHandler* handler, const char* /*args*/)
{
sLog->outString("Re-Loading Autobroadcast...");
sLog->outString("Re-Loading Autobroadcasts...");
sWorld->LoadAutobroadcasts();
handler->SendGlobalGMSysMessage("DB table `autobroadcast` reloaded.");
return true;
+1 -1
View File
@@ -76,7 +76,7 @@ public:
Unit* caster = GetCaster();
if (caster->ToPlayer())
if (Pet* pet = caster->ToPlayer()->GetPet())
if (caster->ToPlayer()->GetPet())
caster->CastSpell(caster, HUNTER_SPELL_ASPECT_OF_THE_BEAST_PET, true);
}