Core/Spells: Reduce number of CastSpell overloads to 1

This commit is contained in:
Shauren authored and Ovahlord committed 2025-08-02 15:22:59 +02:00
1 parent 78de91a487
commit e503f96adb
42 files changed
+275 -251

No files matched your search

+17
View File
@@ -8943,6 +8943,23 @@ bool WorldObjectSpellTrajTargetCheck::operator()(WorldObject* target)
} //namespace Trinity
CastSpellTargetArg::CastSpellTargetArg(WorldObject* target)
{
if (target)
{
if (Unit* unitTarget = target->ToUnit())
{
Targets.emplace();
Targets->SetUnitTarget(unitTarget);
}
else if (GameObject* goTarget = target->ToGameObject())
{
Targets.emplace();
Targets->SetGOTarget(goTarget);
}
}
}
CastSpellExtraArgs::CastSpellExtraArgs() = default;
CastSpellExtraArgs::CastSpellExtraArgs(CastSpellExtraArgs const& other) = default;
CastSpellExtraArgs::CastSpellExtraArgs(CastSpellExtraArgs&& other) noexcept = default;