From d1f5ca2f49f533863f813504c18a09a7ccfdf9d7 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 11 Oct 2022 20:06:25 -0400 Subject: [PATCH] Core/Spells: Take SummonProperties into account for SPELL_EFFECT_SUMMONs with default SummonTitle Port From (https://github.com/TrinityCore/TrinityCore/commit/b6ec81fff808388d934f098546c7faad9105c975) --- Source/Game/Spells/SpellEffects.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Source/Game/Spells/SpellEffects.cs b/Source/Game/Spells/SpellEffects.cs index 184a679cf..1f51ba787 100644 --- a/Source/Game/Spells/SpellEffects.cs +++ b/Source/Game/Spells/SpellEffects.cs @@ -1704,24 +1704,14 @@ namespace Game.Spells // randomize position for multiple summons pos = caster.GetRandomPoint(destTarget, radius); - summon = caster.SummonCreature(entry, pos, summonType, TimeSpan.FromMilliseconds(duration), 0, m_spellInfo.Id, privateObjectOwner); + summon = unitCaster.GetMap().SummonCreature(entry, pos, properties, (uint)duration, unitCaster, m_spellInfo.Id, 0, privateObjectOwner); if (summon == null) continue; + summon.SetTempSummonType(summonType); if (properties.Control == SummonCategory.Ally) summon.SetOwnerGUID(caster.GetGUID()); - uint faction = properties.Faction; - if (properties.GetFlags().HasFlag(SummonPropertiesFlags.UseSummonerFaction)) // TODO: Determine priority between faction and flag - { - WorldObject summoner = summon.GetSummoner(); - if (summoner != null) - faction = summoner.GetFaction(); - } - - if (faction != 0) - summon.SetFaction(faction); - ExecuteLogEffectSummonObject(effectInfo.Effect, summon); } return;