Core/Quest: Fix issues reported by static analysis
This commit is contained in:
1 parent
e60bbaa7d3
commit
f1f4005ad8
6 files changed
+20
-7
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user