aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/Entities/Object/Object.cpp18
-rw-r--r--src/server/game/Entities/Object/Object.h2
2 files changed, 16 insertions, 4 deletions
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index 6d6452014b6..8a230d1c989 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -2982,10 +2982,10 @@ SpellCastResult WorldObject::CastSpell(CastSpellTargetArg const& targets, uint32
return spell->prepare(*targets.Targets, args.TriggeringAura);
}
-void WorldObject::SendPlayOrphanSpellVisual(ObjectGuid const& target, uint32 spellVisualId, float travelSpeed, bool speedAsTime /*= false*/, bool withSourceOrientation /*= false*/)
+void WorldObject::SendPlayOrphanSpellVisual(Position const& sourceLocation, ObjectGuid const& target, uint32 spellVisualId, float travelSpeed, bool speedAsTime /*= false*/, bool withSourceOrientation /*= false*/)
{
WorldPackets::Spells::PlayOrphanSpellVisual playOrphanSpellVisual;
- playOrphanSpellVisual.SourceLocation = GetPosition();
+ playOrphanSpellVisual.SourceLocation = sourceLocation;
if (withSourceOrientation)
{
if (IsGameObject())
@@ -3007,10 +3007,10 @@ void WorldObject::SendPlayOrphanSpellVisual(ObjectGuid const& target, uint32 spe
SendMessageToSet(playOrphanSpellVisual.Write(), true);
}
-void WorldObject::SendPlayOrphanSpellVisual(Position const& targetLocation, uint32 spellVisualId, float travelSpeed, bool speedAsTime /*= false*/, bool withSourceOrientation /*= false*/)
+void WorldObject::SendPlayOrphanSpellVisual(Position const& sourceLocation, Position const& targetLocation, uint32 spellVisualId, float travelSpeed, bool speedAsTime /*= false*/, bool withSourceOrientation /*= false*/)
{
WorldPackets::Spells::PlayOrphanSpellVisual playOrphanSpellVisual;
- playOrphanSpellVisual.SourceLocation = GetPosition();
+ playOrphanSpellVisual.SourceLocation = sourceLocation;
if (withSourceOrientation)
{
if (IsGameObject())
@@ -3032,6 +3032,16 @@ void WorldObject::SendPlayOrphanSpellVisual(Position const& targetLocation, uint
SendMessageToSet(playOrphanSpellVisual.Write(), true);
}
+void WorldObject::SendPlayOrphanSpellVisual(ObjectGuid const& target, uint32 spellVisualId, float travelSpeed, bool speedAsTime /*= false*/, bool withSourceOrientation /*= false*/)
+{
+ SendPlayOrphanSpellVisual(GetPosition(), target, spellVisualId, travelSpeed, speedAsTime, withSourceOrientation);
+}
+
+void WorldObject::SendPlayOrphanSpellVisual(Position const& targetLocation, uint32 spellVisualId, float travelSpeed, bool speedAsTime /*= false*/, bool withSourceOrientation /*= false*/)
+{
+ SendPlayOrphanSpellVisual(GetPosition(), targetLocation, spellVisualId, travelSpeed, speedAsTime, withSourceOrientation);
+}
+
void WorldObject::SendCancelOrphanSpellVisual(uint32 id)
{
WorldPackets::Spells::CancelOrphanSpellVisual cancelOrphanSpellVisual;
diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h
index 577eff25495..b102dccac7d 100644
--- a/src/server/game/Entities/Object/Object.h
+++ b/src/server/game/Entities/Object/Object.h
@@ -693,6 +693,8 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation
// CastSpell's third arg can be a variety of things - check out CastSpellExtraArgs' constructors!
SpellCastResult CastSpell(CastSpellTargetArg const& targets, uint32 spellId, CastSpellExtraArgs const& args = { });
+ void SendPlayOrphanSpellVisual(Position const& sourceLocation, ObjectGuid const& target, uint32 spellVisualId, float travelSpeed, bool speedAsTime = false, bool withSourceOrientation = false);
+ void SendPlayOrphanSpellVisual(Position const& sourceLocation, Position const& targetLocation, uint32 spellVisualId, float travelSpeed, bool speedAsTime = false, bool withSourceOrientation = false);
void SendPlayOrphanSpellVisual(ObjectGuid const& target, uint32 spellVisualId, float travelSpeed, bool speedAsTime = false, bool withSourceOrientation = false);
void SendPlayOrphanSpellVisual(Position const& targetLocation, uint32 spellVisualId, float travelSpeed, bool speedAsTime = false, bool withSourceOrientation = false);
void SendCancelOrphanSpellVisual(uint32 id);