aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities/Object
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-02-25 16:24:44 +0100
committerShauren <shauren.trinity@gmail.com>2023-02-25 16:24:44 +0100
commitcbdb25595899aeb3d93e8d468a05bf8ef1f8e124 (patch)
tree7d729524893bbde5514a867e28f5cf702d5f5dce /src/server/game/Entities/Object
parentf8f994998a61926c914de5ffce3e4c9abcc82faa (diff)
Partial revert of "Core/Spells: Moved SpellVisual functions from Unit to WorldObject" - client only accepts unit guids in these packets (orphan visuals not reverted)
This partially reverts commit 54f607641ac9008a588b8ff635a9ed7ee7a5f976.
Diffstat (limited to 'src/server/game/Entities/Object')
-rw-r--r--src/server/game/Entities/Object/Object.cpp54
-rw-r--r--src/server/game/Entities/Object/Object.h7
2 files changed, 0 insertions, 61 deletions
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index a5deb3883bc..2efe7896333 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -2866,42 +2866,6 @@ SpellCastResult WorldObject::CastSpell(CastSpellTargetArg const& targets, uint32
return spell->prepare(*targets.Targets, args.TriggeringAura);
}
-void WorldObject::SendPlaySpellVisual(WorldObject* target, uint32 spellVisualId, uint16 missReason, uint16 reflectStatus, float travelSpeed, bool speedAsTime /*= false*/)
-{
- WorldPackets::Spells::PlaySpellVisual playSpellVisual;
- playSpellVisual.Source = GetGUID();
- playSpellVisual.Target = target->GetGUID();
- playSpellVisual.TargetPosition = target->GetPosition();
- playSpellVisual.SpellVisualID = spellVisualId;
- playSpellVisual.TravelSpeed = travelSpeed;
- playSpellVisual.MissReason = missReason;
- playSpellVisual.ReflectStatus = reflectStatus;
- playSpellVisual.SpeedAsTime = speedAsTime;
- SendMessageToSet(playSpellVisual.Write(), true);
-}
-
-void WorldObject::SendPlaySpellVisual(Position const& targetPosition, float launchDelay, uint32 spellVisualId, uint16 missReason, uint16 reflectStatus, float travelSpeed, bool speedAsTime /*= false*/)
-{
- WorldPackets::Spells::PlaySpellVisual playSpellVisual;
- playSpellVisual.Source = GetGUID();
- playSpellVisual.TargetPosition = targetPosition;
- playSpellVisual.LaunchDelay = launchDelay;
- playSpellVisual.SpellVisualID = spellVisualId;
- playSpellVisual.TravelSpeed = travelSpeed;
- playSpellVisual.MissReason = missReason;
- playSpellVisual.ReflectStatus = reflectStatus;
- playSpellVisual.SpeedAsTime = speedAsTime;
- SendMessageToSet(playSpellVisual.Write(), true);
-}
-
-void WorldObject::SendCancelSpellVisual(uint32 id)
-{
- WorldPackets::Spells::CancelSpellVisual cancelSpellVisual;
- cancelSpellVisual.Source = GetGUID();
- cancelSpellVisual.SpellVisualID = id;
- SendMessageToSet(cancelSpellVisual.Write(), true);
-}
-
void WorldObject::SendPlayOrphanSpellVisual(ObjectGuid const& target, uint32 spellVisualId, float travelSpeed, bool speedAsTime /*= false*/, bool withSourceOrientation /*= false*/)
{
WorldPackets::Spells::PlayOrphanSpellVisual playOrphanSpellVisual;
@@ -2959,24 +2923,6 @@ void WorldObject::SendCancelOrphanSpellVisual(uint32 id)
SendMessageToSet(cancelOrphanSpellVisual.Write(), true);
}
-void WorldObject::SendPlaySpellVisualKit(uint32 id, uint32 type, uint32 duration) const
-{
- WorldPackets::Spells::PlaySpellVisualKit playSpellVisualKit;
- playSpellVisualKit.Unit = GetGUID();
- playSpellVisualKit.KitRecID = id;
- playSpellVisualKit.KitType = type;
- playSpellVisualKit.Duration = duration;
- SendMessageToSet(playSpellVisualKit.Write(), true);
-}
-
-void WorldObject::SendCancelSpellVisualKit(uint32 id)
-{
- WorldPackets::Spells::CancelSpellVisualKit cancelSpellVisualKit;
- cancelSpellVisualKit.Source = GetGUID();
- cancelSpellVisualKit.SpellVisualKitID = id;
- SendMessageToSet(cancelSpellVisualKit.Write(), true);
-}
-
// function based on function Unit::CanAttack from 13850 client
bool WorldObject::IsValidAttackTarget(WorldObject const* target, SpellInfo const* bySpell /*= nullptr*/) const
{
diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h
index db0f64db245..ddad2bc5574 100644
--- a/src/server/game/Entities/Object/Object.h
+++ b/src/server/game/Entities/Object/Object.h
@@ -681,13 +681,6 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation
void SendPlayOrphanSpellVisual(Position const& targetLocation, uint32 spellVisualId, float travelSpeed, bool speedAsTime = false, bool withSourceOrientation = false);
void SendCancelOrphanSpellVisual(uint32 id);
- void SendPlaySpellVisual(WorldObject* target, uint32 spellVisualId, uint16 missReason, uint16 reflectStatus, float travelSpeed, bool speedAsTime = false);
- void SendPlaySpellVisual(Position const& targetPosition, float o, uint32 spellVisualId, uint16 missReason, uint16 reflectStatus, float travelSpeed, bool speedAsTime = false);
- void SendCancelSpellVisual(uint32 id);
-
- void SendPlaySpellVisualKit(uint32 id, uint32 type, uint32 duration) const;
- void SendCancelSpellVisualKit(uint32 id);
-
bool IsValidAttackTarget(WorldObject const* target, SpellInfo const* bySpell = nullptr) const;
bool IsValidAssistTarget(WorldObject const* target, SpellInfo const* bySpell = nullptr) const;