Core/Cleanup:

* move repeating code into separate method for storing locale strings in ObjectMgr (copy/paste sucks, you know)
* fix 'signed/unsigned' warnings (at least in VS)
* fix some other warnings and cleanup relative code

--HG--
branch : trunk
This commit is contained in:
azazel committed 2010-08-26 15:54:56 +06:00
1 parent 6036166716
commit 5fa14f58dc
23 files changed
+195 -379

No files matched your search

+4 -4
View File
@@ -988,7 +988,7 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
if (m_auraScaleMask && ihit->effectMask == m_auraScaleMask && m_caster != pVictim)
{
SpellEntry const * auraSpell = sSpellStore.LookupEntry(sSpellMgr.GetFirstSpellInChain(m_spellInfo->Id));
if ((pVictim->getLevel() + 10) >= auraSpell->spellLevel)
if (uint32(pVictim->getLevel() + 10) >= auraSpell->spellLevel)
ihit->scaleAura = true;
}
return;
@@ -1009,7 +1009,7 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
if (m_auraScaleMask && target.effectMask == m_auraScaleMask && m_caster != pVictim)
{
SpellEntry const * auraSpell = sSpellStore.LookupEntry(sSpellMgr.GetFirstSpellInChain(m_spellInfo->Id));
if ((pVictim->getLevel() + 10) >= auraSpell->spellLevel)
if (uint32(pVictim->getLevel() + 10) >= auraSpell->spellLevel)
target.scaleAura = true;
}
@@ -5983,7 +5983,7 @@ SpellCastResult Spell::CheckPower()
// health as power used - need check health amount
if (m_spellInfo->powerType == POWER_HEALTH)
{
if (m_caster->GetHealth() <= m_powerCost)
if (int32(m_caster->GetHealth()) <= m_powerCost)
return SPELL_FAILED_CASTER_AURASTATE;
return SPELL_CAST_OK;
}
@@ -6004,7 +6004,7 @@ SpellCastResult Spell::CheckPower()
// Check power amount
Powers powerType = Powers(m_spellInfo->powerType);
if (m_caster->GetPower(powerType) < m_powerCost)
if (int32(m_caster->GetPower(powerType)) < m_powerCost)
return SPELL_FAILED_NO_POWER;
else
return SPELL_CAST_OK;