Core/Instances: fix parameter handling in InstanceScript::DoCastSpellOnPlayer

(cherry picked from commit bac5265ea830a836654d84ab90302d494ba2f089)
This commit is contained in:
ccrs
2026-06-30 20:22:03 +02:00
committed by Shauren
parent 2f1bf82b9d
commit 1cf17de39f
+2 -2
View File
@@ -736,7 +736,7 @@ void InstanceScript::DoCastSpellOnPlayer(Player* player, uint32 spell, bool incl
ObjectGuid summonGUID = player->m_SummonSlot[itr2];
if (!summonGUID.IsEmpty())
if (Creature* summon = instance->GetCreature(summonGUID))
summon->CastSpell(player, spell, true);
summon->CastSpell(summon, spell, true);
}
if (!includeControlled)
@@ -746,7 +746,7 @@ void InstanceScript::DoCastSpellOnPlayer(Player* player, uint32 spell, bool incl
{
if (Unit* controlled = *itr2)
if (controlled->IsInWorld() && controlled->GetTypeId() == TYPEID_UNIT)
controlled->CastSpell(player, spell, true);
controlled->CastSpell(controlled, spell, true);
}
}