Core/Spells: Pass private object owner to SummonCreature for vehicles in summon spell effect
* e2e48c6364 followup
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user