aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorModoX <moardox@gmail.com>2022-10-09 23:41:25 +0200
committerGitHub <noreply@github.com>2022-10-09 23:41:25 +0200
commitb6ec81fff808388d934f098546c7faad9105c975 (patch)
tree7bae78689337ba8babf45d7d2d6112661a9f9e45
parentba49dbfdcbbbee4d6be39284c6924bf56d7f6586 (diff)
Core/Spells: Take SummonProperties into account for SPELL_EFFECT_SUMMONs with default SummonTitle (#28345)
-rw-r--r--src/server/game/Spells/SpellEffects.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 20c4bc88c24..87b09ece51f 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -2011,21 +2011,14 @@ void Spell::EffectSummonType()
// randomize position for multiple summons
pos = caster->GetRandomPoint(*destTarget, radius);
- summon = caster->SummonCreature(entry, pos, summonType, Milliseconds(duration), 0, m_spellInfo->Id, privateObjectOwner);
+ summon = unitCaster->GetMap()->SummonCreature(entry, pos, properties, duration, unitCaster, m_spellInfo->Id, 0, privateObjectOwner);
if (!summon)
continue;
+ summon->SetTempSummonType(summonType);
if (properties->Control == SUMMON_CATEGORY_ALLY)
summon->SetOwnerGUID(caster->GetGUID());
- uint32 faction = properties->Faction;
- if (properties->GetFlags().HasFlag(SummonPropertiesFlags::UseSummonerFaction)) // TODO: Determine priority between faction and flag
- if (WorldObject const* summoner = summon->GetSummoner())
- faction = summoner->GetFaction();
-
- if (faction)
- summon->SetFaction(faction);
-
ExecuteLogEffectSummonObject(SpellEffectName(effectInfo->Effect), summon);
}
return;