[7964] Use NULL instead of 0 for "empty" pointers.

Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
ApoC 2009-06-05 14:03:58 +02:00
parent 5848ada3eb
commit 877f81c37b
3 changed files with 13 additions and 13 deletions

View file

@ -2017,7 +2017,7 @@ void Aura::TriggerSpellWithValue()
uint32 trigger_spell_id = GetSpellProto()->EffectTriggerSpell[m_effIndex];
int32 basepoints0 = this->GetModifier()->m_amount;
caster->CastCustomSpell(target, trigger_spell_id, &basepoints0, 0, 0, true, 0, this);
caster->CastCustomSpell(target, trigger_spell_id, &basepoints0, NULL, NULL, true, NULL, this);
}
/*********************************************************/
@ -6412,7 +6412,7 @@ void Aura::PeriodicDummyTick()
// Increases your attack power by $s1 for every $s2 armor value you have.
// Calculate AP bonus (from 1 efect of this spell)
int32 apBonus = m_modifier.m_amount * m_target->GetArmor() / m_target->CalculateSpellDamage(spell, 1, spell->EffectBasePoints[1], m_target);
m_target->CastCustomSpell(m_target, 61217, &apBonus, &apBonus, 0, true, 0, this);
m_target->CastCustomSpell(m_target, 61217, &apBonus, &apBonus, NULL, true, NULL, this);
return;
}
break;
@ -6435,7 +6435,7 @@ void Aura::PeriodicDummyTick()
int32 mod = (rage < 100) ? rage : 100;
int32 points = m_target->CalculateSpellDamage(spell, 1, spell->EffectBasePoints[1], m_target);
int32 regen = m_target->GetMaxHealth() * (mod * points / 10) / 1000;
m_target->CastCustomSpell(m_target, 22845, &regen, 0, 0, true, 0, this);
m_target->CastCustomSpell(m_target, 22845, &regen, NULL, NULL, true, NULL, this);
m_target->SetPower(POWER_RAGE, rage-mod);
return;
}
@ -6507,11 +6507,11 @@ void Aura::PeriodicDummyTick()
// Full damage to target at 0 tick
if (m_duration > m_modifier.periodictime)
{
caster->CastCustomSpell(m_target, 53352, &damage, 0, 0, true, 0, this);
caster->CastCustomSpell(m_target, 53352, &damage, NULL, NULL, true, NULL, this);
return;
}
damage/=4;
caster->CastCustomSpell(m_target, 56298, &damage, 0, 0, true, 0, this);
caster->CastCustomSpell(m_target, 56298, &damage, NULL, NULL, true, NULL, this);
return;
}
switch (spell->Id)
@ -6552,7 +6552,7 @@ void Aura::PeriodicDummyTick()
if (spell->SpellFamilyFlags & UI64LIT(0x0000000000000020))
{
if (caster)
caster->CastCustomSpell(m_target, 52212, &m_modifier.m_amount, NULL, NULL, true, 0, this);
caster->CastCustomSpell(m_target, 52212, &m_modifier.m_amount, NULL, NULL, true, NULL, this);
return;
}
// Raise Dead
@ -6585,7 +6585,7 @@ void Aura::PeriodicDummyTick()
// Increases your attack power by $s1 for every $s2 armor value you have.
// Calculate AP bonus (from 1 efect of this spell)
int32 apBonus = m_modifier.m_amount * m_target->GetArmor() / m_target->CalculateSpellDamage(spell, 1, spell->EffectBasePoints[1], m_target);
m_target->CastCustomSpell(m_target, 61217, &apBonus, &apBonus, 0, true, 0, this);
m_target->CastCustomSpell(m_target, 61217, &apBonus, &apBonus, NULL, true, NULL, this);
return;
}
// Reaping

View file

@ -1802,7 +1802,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
// This, if I'm not mistaken, shows that we get back ~2% of the absorbed damage as runic power.
int32 absorbed = RemainingDamage * currentAbsorb / 100;
int32 regen = absorbed * 2 / 10;
pVictim->CastCustomSpell(pVictim, 49088, &regen, 0, 0, true, 0, *i);
pVictim->CastCustomSpell(pVictim, 49088, &regen, NULL, NULL, true, NULL, *i);
RemainingDamage -= absorbed;
continue;
}
@ -5500,7 +5500,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
int32 holy = caster->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_HOLY) +
caster->SpellBaseDamageBonusForVictim(SPELL_SCHOOL_MASK_HOLY, this);
basepoints0 = int32(ap*0.10f + 0.10f*holy);
pVictim->CastCustomSpell(pVictim, 20267, &basepoints0, 0, 0, true, 0, triggeredByAura);
pVictim->CastCustomSpell(pVictim, 20267, &basepoints0, NULL, NULL, true, NULL, triggeredByAura);
return true;
}
// Judgement of Wisdom
@ -5510,7 +5510,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
{
// 2% of maximum mana
basepoints0 = int32(pVictim->GetMaxPower(POWER_MANA) * 2 / 100);
pVictim->CastCustomSpell(pVictim, 20268, &basepoints0, NULL, NULL, true, 0, triggeredByAura);
pVictim->CastCustomSpell(pVictim, 20268, &basepoints0, NULL, NULL, true, NULL, triggeredByAura);
}
return true;
}
@ -5638,7 +5638,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if (procSpell->Effect[i] == SPELL_EFFECT_ENERGIZE)
{
int32 mana = procSpell->EffectBasePoints[i];
CastCustomSpell(this, 54986, 0, &mana, 0, true, castItem, triggeredByAura);
CastCustomSpell(this, 54986, NULL, &mana, NULL, true, castItem, triggeredByAura);
break;
}
return true;
@ -6868,7 +6868,7 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit *pVictim, uint32 damage, Aura
return false;
int32 cost = procSpell->manaCost + procSpell->ManaCostPercentage * GetCreateMana() / 100;
int32 basepoints0 = cost * triggeredByAura->GetModifier()->m_amount/100;
CastCustomSpell(this, 47762, &basepoints0, 0, 0, true, 0, triggeredByAura);
CastCustomSpell(this, 47762, &basepoints0, NULL, NULL, true, NULL, triggeredByAura);
return true;
}
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7963"
#define REVISION_NR "7964"
#endif // __REVISION_NR_H__