From f1f4005ad8a17ea5fdd2b66f8ed3d0bd7c4c1efb Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 6 Dec 2015 21:02:52 +0100 Subject: Core/Quest: Fix issues reported by static analysis --- src/server/game/Spells/SpellEffects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server/game/Spells/SpellEffects.cpp') diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index b345c5affea..b3ab72dcbff 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -5638,7 +5638,7 @@ void Spell::EffectGameObjectDamage(SpellEffIndex /*effIndex*/) FactionTemplateEntry const* casterFaction = caster->GetFactionTemplateEntry(); FactionTemplateEntry const* targetFaction = sFactionTemplateStore.LookupEntry(gameObjTarget->GetUInt32Value(GAMEOBJECT_FACTION)); // Do not allow to damage GO's of friendly factions (ie: Wintergrasp Walls/Ulduar Storm Beacons) - if ((casterFaction && targetFaction && !casterFaction->IsFriendlyTo(*targetFaction)) || !targetFaction) + if (!targetFaction || (casterFaction && targetFaction && !casterFaction->IsFriendlyTo(*targetFaction))) gameObjTarget->ModifyHealth(-damage, caster, GetSpellInfo()->Id); } -- cgit v1.2.3