Core/Spells: Reduce number of CastSpell overloads to 1
This commit is contained in:
1 parent
78de91a487
commit
e503f96adb
42 files changed
+275
-251
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user