Core: Fix warnings with other way

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

No files matched your search

@@ -682,11 +682,10 @@ void BattlefieldWG::PromotePlayer(Player* killer)
{ {
if (!m_isActive) if (!m_isActive)
return; return;
Aura* aur = NULL;
// Updating rank of player // Updating rank of player
if (aur = killer->GetAura(SPELL_RECRUIT)) if (Aura* auraRecruit = killer->GetAura(SPELL_RECRUIT))
{ {
if (aur->GetStackAmount() >= 5) if (auraRecruit->GetStackAmount() >= 5)
{ {
killer->RemoveAura(SPELL_RECRUIT); killer->RemoveAura(SPELL_RECRUIT);
killer->CastSpell(killer, SPELL_CORPORAL, true); killer->CastSpell(killer, SPELL_CORPORAL, true);
@@ -695,9 +694,9 @@ void BattlefieldWG::PromotePlayer(Player* killer)
else else
killer->CastSpell(killer, SPELL_RECRUIT, true); killer->CastSpell(killer, SPELL_RECRUIT, true);
} }
else if (aur = killer->GetAura(SPELL_CORPORAL)) else if (Aura* auraCorporal = killer->GetAura(SPELL_CORPORAL))
{ {
if (aur->GetStackAmount() >= 5) if (auraCorporal->GetStackAmount() >= 5)
{ {
killer->RemoveAura(SPELL_CORPORAL); killer->RemoveAura(SPELL_CORPORAL);
killer->CastSpell(killer, SPELL_LIEUTENANT, true); killer->CastSpell(killer, SPELL_LIEUTENANT, true);
-1
View File
@@ -400,7 +400,6 @@ bool Group::AddMember(Player* player)
stmt->setUInt8(4, member.roles); stmt->setUInt8(4, member.roles);
CharacterDatabase.Execute(stmt); CharacterDatabase.Execute(stmt);
} }
SendUpdate(); SendUpdate();
+4 -5
View File
@@ -574,16 +574,15 @@ class spell_dru_rip : public SpellScriptLoader
if (Unit* caster = GetCaster()) if (Unit* caster = GetCaster())
{ {
AuraEffect const* idol = NULL;
// 0.01 * $AP * cp // 0.01 * $AP * cp
uint8 cp = caster->ToPlayer()->GetComboPoints(); uint8 cp = caster->ToPlayer()->GetComboPoints();
// Idol of Feral Shadows. Can't be handled as SpellMod due its dependency from CPs // 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)) if (AuraEffect const* auraEffIdolOfFeralShadows = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_FERAL_SHADOWS, EFFECT_0))
amount += cp * idol->GetAmount(); amount += cp * auraEffIdolOfFeralShadows->GetAmount();
// Idol of Worship. Can't be handled as SpellMod due its dependency from CPs // 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)) else if (AuraEffect const* auraEffIdolOfWorship = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_WORSHIP, EFFECT_0))
amount += cp * idol->GetAmount(); amount += cp * auraEffIdolOfWorship->GetAmount();
amount += int32(CalculatePct(caster->GetTotalAttackPowerValue(BASE_ATTACK), cp)); amount += int32(CalculatePct(caster->GetTotalAttackPowerValue(BASE_ATTACK), cp));
} }
+4 -5
View File
@@ -1201,7 +1201,6 @@ class spell_pal_sacred_shield : public SpellScriptLoader
{ {
if (Unit* caster = GetCaster()) if (Unit* caster = GetCaster())
{ {
AuraEffect const* dampening = NULL;
// +75.00% from sp bonus // +75.00% from sp bonus
float bonus = CalculatePct(caster->SpellBaseHealingBonusDone(GetSpellInfo()->GetSchoolMask()), 75.0f); float bonus = CalculatePct(caster->SpellBaseHealingBonusDone(GetSpellInfo()->GetSchoolMask()), 75.0f);
@@ -1212,11 +1211,11 @@ class spell_pal_sacred_shield : public SpellScriptLoader
amount += int32(bonus); amount += int32(bonus);
// Arena - Dampening // Arena - Dampening
if (dampening = caster->GetAuraEffect(SPELL_GENERIC_ARENA_DAMPENING, EFFECT_0)) if (AuraEffect const* auraEffArenaDampening = caster->GetAuraEffect(SPELL_GENERIC_ARENA_DAMPENING, EFFECT_0))
AddPct(amount, dampening->GetAmount()); AddPct(amount, auraEffArenaDampening->GetAmount());
// Battleground - Dampening // Battleground - Dampening
else if (dampening = caster->GetAuraEffect(SPELL_GENERIC_BATTLEGROUND_DAMPENING, EFFECT_0)) else if (AuraEffect const* auraEffBattlegroudDampening = caster->GetAuraEffect(SPELL_GENERIC_BATTLEGROUND_DAMPENING, EFFECT_0))
AddPct(amount, dampening->GetAmount()); AddPct(amount, auraEffBattlegroudDampening->GetAmount());
} }
} }