Core: Corrected NULL usage, it should only be used with pointers, not integers

This commit is contained in:
Shauren
2011-04-23 15:53:48 +02:00
parent a2a751b9d6
commit 8898db8b27
56 changed files with 216 additions and 217 deletions
@@ -4525,9 +4525,8 @@ void AuraEffect::HandleAuraModStateImmunity(AuraApplication const * aurApp, uint
Unit * target = aurApp->GetTarget();
if ((apply) && GetSpellProto()->AttributesEx & SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY)
{
target->RemoveAurasByType(AuraType(GetMiscValue()), NULL , GetBase());
}
target->RemoveAurasByType(AuraType(GetMiscValue()), 0 , GetBase());
// stop handling the effect if it was removed by linked event
if (apply && aurApp->GetRemoveMode())
return;
+1 -1
View File
@@ -1371,7 +1371,7 @@ class SpellMgr
SpellRequiredMap::const_iterator itr = mSpellReq.find(spell_id);
if (itr == mSpellReq.end())
return NULL;
return 0;
return itr->second;
}
+2 -2
View File
@@ -348,7 +348,7 @@ int32 SpellScript::GetHitDamage()
if (!IsInHitPhase())
{
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDamage was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId);
return NULL;
return 0;
}
return m_spell->m_damage;
}
@@ -368,7 +368,7 @@ int32 SpellScript::GetHitHeal()
if (!IsInHitPhase())
{
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitHeal was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId);
return NULL;
return 0;
}
return m_spell->m_healing;
}