aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Spells
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2014-07-11 20:08:35 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2014-07-11 20:08:35 +0200
commit29e0538624c5106381cda23c2672c6941f08022a (patch)
treeae02a73d1875623303d24c49e2f5e358472bb233 /src/server/scripts/Spells
parentb62ee5eea2a48b0498a9c9cc23715df317778543 (diff)
Core: Fix some warnings vs2014 ctp (no support)
Diffstat (limited to 'src/server/scripts/Spells')
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp5
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp4
-rw-r--r--src/server/scripts/Spells/spell_paladin.cpp5
3 files changed, 8 insertions, 6 deletions
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index e466c15d417..8b629f96f22 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -574,14 +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 (AuraEffect const* idol = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_FERAL_SHADOWS, EFFECT_0))
+ if (idol = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_FERAL_SHADOWS, EFFECT_0))
amount += cp * idol->GetAmount();
// Idol of Worship. Can't be handled as SpellMod due its dependency from CPs
- else if (AuraEffect const* idol = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_WORSHIP, EFFECT_0))
+ else if (idol = caster->GetAuraEffect(SPELL_DRUID_IDOL_OF_WORSHIP, EFFECT_0))
amount += cp * idol->GetAmount();
amount += int32(CalculatePct(caster->GetTotalAttackPowerValue(BASE_ATTACK), cp));
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 4c72d790059..d72e2000e84 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -449,9 +449,9 @@ class spell_gen_bonked : public SpellScriptLoader
target->CastSpell(target, SPELL_FOAM_SWORD_DEFEAT, true);
target->RemoveAurasDueToSpell(SPELL_BONKED);
- if (Aura const* aura = target->GetAura(SPELL_ON_GUARD))
+ if (Aura const* auraOnGuard = target->GetAura(SPELL_ON_GUARD))
{
- if (Item* item = target->GetItemByGuid(aura->GetCastItemGUID()))
+ if (Item* item = target->GetItemByGuid(auraOnGuard->GetCastItemGUID()))
target->DestroyItemCount(item->GetEntry(), 1, true);
}
}
diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp
index 447cb645e76..9ec9a056b69 100644
--- a/src/server/scripts/Spells/spell_paladin.cpp
+++ b/src/server/scripts/Spells/spell_paladin.cpp
@@ -1201,6 +1201,7 @@ 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);
@@ -1211,10 +1212,10 @@ class spell_pal_sacred_shield : public SpellScriptLoader
amount += int32(bonus);
// Arena - Dampening
- if (AuraEffect const* dampening = caster->GetAuraEffect(SPELL_GENERIC_ARENA_DAMPENING, EFFECT_0))
+ if (dampening = caster->GetAuraEffect(SPELL_GENERIC_ARENA_DAMPENING, EFFECT_0))
AddPct(amount, dampening->GetAmount());
// Battleground - Dampening
- else if (AuraEffect const* dampening = caster->GetAuraEffect(SPELL_GENERIC_BATTLEGROUND_DAMPENING, EFFECT_0))
+ else if (dampening = caster->GetAuraEffect(SPELL_GENERIC_BATTLEGROUND_DAMPENING, EFFECT_0))
AddPct(amount, dampening->GetAmount());
}
}