Core/Spells: Pass private object owner to SummonCreature for vehicles in summon spell effect

* e2e48c6364 followup
This commit is contained in:
ModoX
2026-05-01 23:00:11 +02:00
parent e2e48c6364
commit a905ed6e54
+2 -4
View File
@@ -1966,7 +1966,7 @@ void Spell::EffectSummonType()
if (!unitCaster) if (!unitCaster)
return; return;
summon = unitCaster->GetMap()->SummonCreature(entry, *destTarget, properties, duration, unitCaster, m_spellInfo->Id); summon = unitCaster->GetMap()->SummonCreature(entry, *destTarget, properties, duration, unitCaster, m_spellInfo->Id, privateObjectOwner);
break; break;
} }
case SummonTitle::Lightwell: case SummonTitle::Lightwell:
@@ -2055,12 +2055,10 @@ void Spell::EffectSummonType()
// Summoning spells (usually triggered by npc_spellclick) that spawn a vehicle and that cause the clicker // Summoning spells (usually triggered by npc_spellclick) that spawn a vehicle and that cause the clicker
// to cast a ride vehicle spell on the summoned unit. // to cast a ride vehicle spell on the summoned unit.
summon = unitCaster->GetMap()->SummonCreature(entry, *destTarget, properties, duration, unitCaster, m_spellInfo->Id); summon = unitCaster->GetMap()->SummonCreature(entry, *destTarget, properties, duration, unitCaster, m_spellInfo->Id, 0, privateObjectOwner);
if (!summon || !summon->IsVehicle()) if (!summon || !summon->IsVehicle())
return; return;
summon->SetPrivateObjectOwner(privateObjectOwner);
// The spell that this effect will trigger. It has SPELL_AURA_CONTROL_VEHICLE // The spell that this effect will trigger. It has SPELL_AURA_CONTROL_VEHICLE
uint32 spellId = VEHICLE_SPELL_RIDE_HARDCODED; uint32 spellId = VEHICLE_SPELL_RIDE_HARDCODED;
SpellEffectValue basePoints = effectInfo->CalcValue(); SpellEffectValue basePoints = effectInfo->CalcValue();