Core: Fix warnings with other way

This commit is contained in:
Vincent-Michael
2014-07-11 21:50:49 +02:00
parent c8e75073bf
commit 00a8a9ebb4
4 changed files with 12 additions and 16 deletions

View File

@@ -574,16 +574,15 @@ class spell_dru_rip : public SpellScriptLoader
if (Unit* caster = GetCaster())
{
AuraEffect const* idol = NULL;
// 0.01 * $AP * cp
uint8 cp = caster->ToPlayer()->GetComboPoints();
// Idol of Feral Shadows. Can't be handled as SpellMod due its dependency from CPs
if (idol = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_FERAL_SHADOWS, EFFECT_0))
amount += cp * idol->GetAmount();
if (AuraEffect const* auraEffIdolOfFeralShadows = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_FERAL_SHADOWS, EFFECT_0))
amount += cp * auraEffIdolOfFeralShadows->GetAmount();
// Idol of Worship. Can't be handled as SpellMod due its dependency from CPs
else if (idol = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_WORSHIP, EFFECT_0))
amount += cp * idol->GetAmount();
else if (AuraEffect const* auraEffIdolOfWorship = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_WORSHIP, EFFECT_0))
amount += cp * auraEffIdolOfWorship->GetAmount();
amount += int32(CalculatePct(caster->GetTotalAttackPowerValue(BASE_ATTACK), cp));
}

View File

@@ -1201,7 +1201,6 @@ class spell_pal_sacred_shield : public SpellScriptLoader
{
if (Unit* caster = GetCaster())
{
AuraEffect const* dampening = NULL;
// +75.00% from sp bonus
float bonus = CalculatePct(caster->SpellBaseHealingBonusDone(GetSpellInfo()->GetSchoolMask()), 75.0f);
@@ -1212,11 +1211,11 @@ class spell_pal_sacred_shield : public SpellScriptLoader
amount += int32(bonus);
// Arena - Dampening
if (dampening = caster->GetAuraEffect(SPELL_GENERIC_ARENA_DAMPENING, EFFECT_0))
AddPct(amount, dampening->GetAmount());
if (AuraEffect const* auraEffArenaDampening = caster->GetAuraEffect(SPELL_GENERIC_ARENA_DAMPENING, EFFECT_0))
AddPct(amount, auraEffArenaDampening->GetAmount());
// Battleground - Dampening
else if (dampening = caster->GetAuraEffect(SPELL_GENERIC_BATTLEGROUND_DAMPENING, EFFECT_0))
AddPct(amount, dampening->GetAmount());
else if (AuraEffect const* auraEffBattlegroudDampening = caster->GetAuraEffect(SPELL_GENERIC_BATTLEGROUND_DAMPENING, EFFECT_0))
AddPct(amount, auraEffBattlegroudDampening->GetAmount());
}
}