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:
blinkysc 2026-04-02 03:03:07 -05:00 committed by GitHub
parent e144326f02
commit e54952ca7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;