fix(Core/Spells): Resolve pet to owner in EffectSummonType default path (#25322)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
parent
e144326f02
commit
e54952ca7b
1 changed files with 6 additions and 1 deletions
|
|
@ -2471,6 +2471,11 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
|
|||
|
||||
TempSummonType summonType = (duration <= 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN;
|
||||
|
||||
Unit* summoner = m_originalCaster;
|
||||
if (summoner->IsPet())
|
||||
if (Unit* owner = summoner->GetOwner())
|
||||
summoner = owner;
|
||||
|
||||
for (uint32 count = 0; count < numSummons; ++count)
|
||||
{
|
||||
Position pos;
|
||||
|
|
@ -2480,7 +2485,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
|
|||
// randomize position for multiple summons
|
||||
pos = m_caster->GetRandomPoint(*destTarget, radius);
|
||||
|
||||
summon = m_originalCaster->SummonCreature(entry, pos, summonType, duration, 0, nullptr, personalSpawn);
|
||||
summon = summoner->SummonCreature(entry, pos, summonType, duration, 0, nullptr, personalSpawn);
|
||||
if (!summon)
|
||||
continue;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue