diff options
Diffstat (limited to 'src/server/scripts')
-rw-r--r-- | src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp | 10 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_druid.cpp | 5 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 4 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_paladin.cpp | 5 |
4 files changed, 13 insertions, 11 deletions
diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp index ecb28a5b0cb..04be688d8aa 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp @@ -148,9 +148,9 @@ public: if (Player* target = ObjectAccessor::GetPlayer(*me, PlayerGUID)) AttackStart(target); - switchFactionIfAlive(instance, ENTRY_RAVEN); - switchFactionIfAlive(instance, ENTRY_ORO); - switchFactionIfAlive(instance, ENTRY_MURTA); + switchFactionIfAlive(ENTRY_RAVEN); + switchFactionIfAlive(ENTRY_ORO); + switchFactionIfAlive(ENTRY_MURTA); } postGossipStep++; } @@ -185,9 +185,9 @@ public: Text_Timer = 0; } - void switchFactionIfAlive(InstanceScript* instance, uint32 entry) + void switchFactionIfAlive(uint32 entry) { - if (Creature* crew = instance->instance->GetCreature(instance->GetData64(entry))) + if (Creature* crew = ObjectAccessor::GetCreature(*me, instance->GetData64(entry))) if (crew->IsAlive()) crew->setFaction(FACTION_HOSTILE); } 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()); } } |