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:
@@ -230,7 +230,7 @@ class Spell
|
|||||||
void EffectDistract(SpellEffIndex effIndex);
|
void EffectDistract(SpellEffIndex effIndex);
|
||||||
void EffectPull(SpellEffIndex effIndex);
|
void EffectPull(SpellEffIndex effIndex);
|
||||||
void EffectSchoolDMG(SpellEffIndex effIndex);
|
void EffectSchoolDMG(SpellEffIndex effIndex);
|
||||||
void EffectEnvirinmentalDMG(SpellEffIndex effIndex);
|
void EffectEnvironmentalDMG(SpellEffIndex effIndex);
|
||||||
void EffectInstaKill(SpellEffIndex effIndex);
|
void EffectInstaKill(SpellEffIndex effIndex);
|
||||||
void EffectDummy(SpellEffIndex effIndex);
|
void EffectDummy(SpellEffIndex effIndex);
|
||||||
void EffectTeleportUnits(SpellEffIndex effIndex);
|
void EffectTeleportUnits(SpellEffIndex effIndex);
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
|
|||||||
&Spell::EffectUnused, // 4 SPELL_EFFECT_PORTAL_TELEPORT unused
|
&Spell::EffectUnused, // 4 SPELL_EFFECT_PORTAL_TELEPORT unused
|
||||||
&Spell::EffectTeleportUnits, // 5 SPELL_EFFECT_TELEPORT_UNITS
|
&Spell::EffectTeleportUnits, // 5 SPELL_EFFECT_TELEPORT_UNITS
|
||||||
&Spell::EffectApplyAura, // 6 SPELL_EFFECT_APPLY_AURA
|
&Spell::EffectApplyAura, // 6 SPELL_EFFECT_APPLY_AURA
|
||||||
&Spell::EffectEnvirinmentalDMG, // 7 SPELL_EFFECT_ENVIRONMENTAL_DAMAGE
|
&Spell::EffectEnvironmentalDMG, // 7 SPELL_EFFECT_ENVIRONMENTAL_DAMAGE
|
||||||
&Spell::EffectPowerDrain, // 8 SPELL_EFFECT_POWER_DRAIN
|
&Spell::EffectPowerDrain, // 8 SPELL_EFFECT_POWER_DRAIN
|
||||||
&Spell::EffectHealthLeech, // 9 SPELL_EFFECT_HEALTH_LEECH
|
&Spell::EffectHealthLeech, // 9 SPELL_EFFECT_HEALTH_LEECH
|
||||||
&Spell::EffectHeal, // 10 SPELL_EFFECT_HEAL
|
&Spell::EffectHeal, // 10 SPELL_EFFECT_HEAL
|
||||||
@@ -282,7 +282,7 @@ void Spell::EffectInstaKill(SpellEffIndex /*effIndex*/)
|
|||||||
m_caster->DealDamage(unitTarget, unitTarget->GetHealth(), NULL, NODAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
m_caster->DealDamage(unitTarget, unitTarget->GetHealth(), NULL, NODAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Spell::EffectEnvirinmentalDMG(SpellEffIndex /*effIndex*/)
|
void Spell::EffectEnvironmentalDMG(SpellEffIndex /*effIndex*/)
|
||||||
{
|
{
|
||||||
if (!unitTarget || !unitTarget->isAlive())
|
if (!unitTarget || !unitTarget->isAlive())
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1973,7 +1973,7 @@ void SpellMgr::LoadSpellThreats()
|
|||||||
ste.apPctMod = fields[3].GetFloat();
|
ste.apPctMod = fields[3].GetFloat();
|
||||||
|
|
||||||
mSpellThreatMap[entry] = ste;
|
mSpellThreatMap[entry] = ste;
|
||||||
count++;
|
++count;
|
||||||
} while (result->NextRow());
|
} while (result->NextRow());
|
||||||
|
|
||||||
sLog->outString(">> Loaded %u SpellThreatEntries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
sLog->outString(">> Loaded %u SpellThreatEntries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||||
@@ -1988,7 +1988,7 @@ void SpellMgr::LoadSkillLineAbilityMap()
|
|||||||
|
|
||||||
uint32 count = 0;
|
uint32 count = 0;
|
||||||
|
|
||||||
for (uint32 i = 0; i < sSpellMgr->GetSpellInfoStoreSize(); ++i)
|
for (uint32 i = 0; i < sSkillLineAbilityStore.GetNumRows(); ++i)
|
||||||
{
|
{
|
||||||
SkillLineAbilityEntry const* SkillInfo = sSkillLineAbilityStore.LookupEntry(i);
|
SkillLineAbilityEntry const* SkillInfo = sSkillLineAbilityStore.LookupEntry(i);
|
||||||
if (!SkillInfo)
|
if (!SkillInfo)
|
||||||
|
|||||||
@@ -222,7 +222,9 @@ public:
|
|||||||
{
|
{
|
||||||
Field *fieldsLogin = resultLogin->Fetch();
|
Field *fieldsLogin = resultLogin->Fetch();
|
||||||
handler->PSendSysMessage(LANG_ACCOUNT_LIST_LINE,
|
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
|
else
|
||||||
handler->PSendSysMessage(LANG_ACCOUNT_LIST_ERROR, name.c_str());
|
handler->PSendSysMessage(LANG_ACCOUNT_LIST_ERROR, name.c_str());
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ public:
|
|||||||
static bool HandleGMListFullCommand(ChatHandler* handler, const char* /*args*/)
|
static bool HandleGMListFullCommand(ChatHandler* handler, const char* /*args*/)
|
||||||
{
|
{
|
||||||
///- Get the accounts with GM Level >0
|
///- 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)
|
if (result)
|
||||||
{
|
{
|
||||||
handler->SendSysMessage(LANG_GMLIST);
|
handler->SendSysMessage(LANG_GMLIST);
|
||||||
|
|||||||
@@ -375,7 +375,7 @@ public:
|
|||||||
|
|
||||||
static bool HandleReloadAutobroadcastCommand(ChatHandler* handler, const char* /*args*/)
|
static bool HandleReloadAutobroadcastCommand(ChatHandler* handler, const char* /*args*/)
|
||||||
{
|
{
|
||||||
sLog->outString("Re-Loading Autobroadcast...");
|
sLog->outString("Re-Loading Autobroadcasts...");
|
||||||
sWorld->LoadAutobroadcasts();
|
sWorld->LoadAutobroadcasts();
|
||||||
handler->SendGlobalGMSysMessage("DB table `autobroadcast` reloaded.");
|
handler->SendGlobalGMSysMessage("DB table `autobroadcast` reloaded.");
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public:
|
|||||||
|
|
||||||
Unit* caster = GetCaster();
|
Unit* caster = GetCaster();
|
||||||
if (caster->ToPlayer())
|
if (caster->ToPlayer())
|
||||||
if (Pet* pet = caster->ToPlayer()->GetPet())
|
if (caster->ToPlayer()->GetPet())
|
||||||
caster->CastSpell(caster, HUNTER_SPELL_ASPECT_OF_THE_BEAST_PET, true);
|
caster->CastSpell(caster, HUNTER_SPELL_ASPECT_OF_THE_BEAST_PET, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user