mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-15 12:42:43 -04:00
Core/Misc: Fix some static analysis issues
Add some asserts and additional NULL checks as sanity checks.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user