Core: Fixed remaining C6246: Local declaration of 'x' hides declaration of the same name in outer scope. from previous commit

This commit is contained in:
Shauren
2011-11-23 19:17:33 +01:00
parent f091360940
commit 358b33239a
30 changed files with 220 additions and 226 deletions
@@ -563,10 +563,10 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
amount += (int32)DoneActualBenefit;
// Arena - Dampening
if (AuraEffect const* pAurEff = caster->GetAuraEffect(74410, 0))
AddPctN(amount, pAurEff->GetAmount());
// Battleground - Dampening
else if (AuraEffect const* pAurEff = caster->GetAuraEffect(74411, 0))
AuraEffect const* pAurEff = caster->GetAuraEffect(74410, 0);
if (!pAurEff)
pAurEff = caster->GetAuraEffect(74411, 0); // Battleground - Dampening
if (pAurEff)
AddPctN(amount, pAurEff->GetAmount());
return amount;
@@ -1508,15 +1508,15 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
// Nurturing Instinct
if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT, SPELLFAMILY_DRUID, 2254, 0))
{
uint32 spellId = 0;
uint32 spellId3 = 0;
switch (aurEff->GetId())
{
case 33872:
spellId = 47179;
break;
case 33873:
spellId = 47180;
break;
case 33872:
spellId3 = 47179;
break;
case 33873:
spellId3 = 47180;
break;
}
target->CastSpell(target, spellId, true, NULL, this);
}
@@ -4892,8 +4892,8 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
// Living Bomb
if (m_spellInfo->SpellFamilyFlags[1] & 0x20000)
{
AuraRemoveMode mode = aurApp->GetRemoveMode();
if (caster && (mode == AURA_REMOVE_BY_ENEMY_SPELL || mode == AURA_REMOVE_BY_EXPIRE))
AuraRemoveMode removeMode = aurApp->GetRemoveMode();
if (caster && (removeMode == AURA_REMOVE_BY_ENEMY_SPELL || removeMode == AURA_REMOVE_BY_EXPIRE))
caster->CastSpell(target, GetAmount(), true);
}
break;
@@ -6019,13 +6019,15 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
case 65923:
{
Unit* permafrostCaster = NULL;
if (Aura* permafrostAura = target->GetAura(66193))
permafrostCaster = permafrostAura->GetCaster();
else if (Aura* permafrostAura = target->GetAura(67855))
permafrostCaster = permafrostAura->GetCaster();
else if (Aura* permafrostAura = target->GetAura(67856))
permafrostCaster = permafrostAura->GetCaster();
else if (Aura* permafrostAura = target->GetAura(67857))
Aura* permafrostAura = target->GetAura(66193);
if (!permafrostAura)
permafrostAura = target->GetAura(67855);
if (!permafrostAura)
permafrostAura = target->GetAura(67856);
if (!permafrostAura)
permafrostAura = target->GetAura(67857);
if (permafrostAura)
permafrostCaster = permafrostAura->GetCaster();
if (permafrostCaster)
@@ -6461,15 +6463,15 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const
// damage caster for heal amount
if (target != caster && GetSpellInfo()->AttributesEx2 & SPELL_ATTR2_HEALTH_FUNNEL)
{
uint32 damage = GetSpellInfo()->Effects[EFFECT_0].CalcValue(); // damage is not affected by spell power
if ((int32)damage > gain)
damage = gain;
uint32 absorb = 0;
caster->DealDamageMods(caster, damage, &absorb);
caster->SendSpellNonMeleeDamageLog(caster, GetId(), damage, GetSpellInfo()->GetSchoolMask(), absorb, 0, false, 0, false);
uint32 funnelDamage = GetSpellInfo()->Effects[EFFECT_0].CalcValue(); // damage is not affected by spell power
if ((int32)funnelDamage > gain)
funnelDamage = gain;
uint32 funnelAbsorb = 0;
caster->DealDamageMods(caster, funnelDamage, &funnelAbsorb);
caster->SendSpellNonMeleeDamageLog(caster, GetId(), funnelDamage, GetSpellInfo()->GetSchoolMask(), funnelAbsorb, 0, false, 0, false);
CleanDamage cleanDamage = CleanDamage(0, 0, BASE_ATTACK, MELEE_HIT_NORMAL);
caster->DealDamage(caster, damage, &cleanDamage, NODAMAGE, GetSpellInfo()->GetSchoolMask(), GetSpellInfo(), true);
caster->DealDamage(caster, funnelDamage, &cleanDamage, NODAMAGE, GetSpellInfo()->GetSchoolMask(), GetSpellInfo(), true);
}
uint32 procAttacker = PROC_FLAG_DONE_PERIODIC;