Core/Units: defined all faction template flags and properly implemented FactionTemplateFlags::HatesAllExceptFriends
*refactored FactionTemplateEntry helpers to use pointers instead of references since we use datastore pointers in all cases so there is no need to create references
This commit is contained in:
1 parent
45af6bbd4b
commit
fd27f0020d
7 files changed
+69
-55
No files matched your search
@@ -5314,7 +5314,7 @@ void Spell::EffectGameObjectDamage(SpellEffIndex /*effIndex*/)
|
||||
FactionTemplateEntry const* casterFaction = caster->GetFactionTemplateEntry();
|
||||
FactionTemplateEntry const* targetFaction = sFactionTemplateStore.LookupEntry(gameObjTarget->GetFaction());
|
||||
// Do not allow to damage GO's of friendly factions (ie: Wintergrasp Walls/Ulduar Storm Beacons)
|
||||
if (!targetFaction || (casterFaction && !casterFaction->IsFriendlyTo(*targetFaction)))
|
||||
if (!targetFaction || (casterFaction && !casterFaction->IsFriendlyTo(targetFaction)))
|
||||
gameObjTarget->ModifyHealth(-damage, caster, GetSpellInfo()->Id);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user