Core/Misc: Fix some static analysis issues

Add some asserts and additional NULL checks as sanity checks.
This commit is contained in:
jackpoz
2014-03-21 22:47:58 +01:00
parent ada0598bb0
commit 9e99db035f
11 changed files with 47 additions and 23 deletions

View File

@@ -941,6 +941,7 @@ public:
if (itr != pet->ToPet()->m_spells.end()) // If pet has Wild Hunt
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
ASSERT(spellInfo);
mod += CalculatePct(1.0f, spellInfo->Effects[EFFECT_1].CalcValue());
}
@@ -971,6 +972,7 @@ public:
if (itr != pet->ToPet()->m_spells.end()) // If pet has Wild Hunt
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
ASSERT(spellInfo);
mod += CalculatePct(1.0f, spellInfo->Effects[EFFECT_1].CalcValue());
}