diff options
| author | Shauren <shauren.trinity@gmail.com> | 2021-12-12 19:34:00 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-12-12 19:34:00 +0100 |
| commit | 54f607641ac9008a588b8ff635a9ed7ee7a5f976 (patch) | |
| tree | 6f0e74cf00153fa23fb34a0b6d73a743bbbc92e9 /src/server/game/Entities/Unit | |
| parent | f61de627e5c367b9716b39c89e374322deb6b255 (diff) | |
Core/Spells: Moved SpellVisual functions from Unit to WorldObject
Diffstat (limited to 'src/server/game/Entities/Unit')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 89 | ||||
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.h | 8 |
2 files changed, 0 insertions, 97 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 418f7355caf..a01de0e7ba6 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -11311,95 +11311,6 @@ void Unit::SetAuraStack(uint32 spellId, Unit* target, uint32 stack) aura->SetStackAmount(stack); } -void Unit::SendCancelOrphanSpellVisual(uint32 id) -{ - WorldPackets::Spells::CancelOrphanSpellVisual cancelOrphanSpellVisual; - cancelOrphanSpellVisual.SpellVisualID = id; - SendMessageToSet(cancelOrphanSpellVisual.Write(), true); -} - -void Unit::SendPlayOrphanSpellVisual(ObjectGuid const& target, uint32 spellVisualId, float travelSpeed, bool speedAsTime /*= false*/, bool withSourceOrientation /*= false*/) -{ - WorldPackets::Spells::PlayOrphanSpellVisual playOrphanSpellVisual; - playOrphanSpellVisual.SourceLocation = GetPosition(); - if (withSourceOrientation) - playOrphanSpellVisual.SourceRotation = Position(0.0f, 0.0f, GetOrientation()); - playOrphanSpellVisual.Target = target; // exclusive with TargetLocation - playOrphanSpellVisual.SpellVisualID = spellVisualId; - playOrphanSpellVisual.TravelSpeed = travelSpeed; - playOrphanSpellVisual.SpeedAsTime = speedAsTime; - playOrphanSpellVisual.LaunchDelay = 0.0f; - SendMessageToSet(playOrphanSpellVisual.Write(), true); -} - -void Unit::SendPlayOrphanSpellVisual(Position const& targetLocation, uint32 spellVisualId, float travelSpeed, bool speedAsTime /*= false*/, bool withSourceOrientation /*= false*/) -{ - WorldPackets::Spells::PlayOrphanSpellVisual playOrphanSpellVisual; - playOrphanSpellVisual.SourceLocation = GetPosition(); - if (withSourceOrientation) - playOrphanSpellVisual.SourceRotation = Position(0.0f, 0.0f, GetOrientation()); - playOrphanSpellVisual.TargetLocation = targetLocation; // exclusive with Target - playOrphanSpellVisual.SpellVisualID = spellVisualId; - playOrphanSpellVisual.TravelSpeed = travelSpeed; - playOrphanSpellVisual.SpeedAsTime = speedAsTime; - playOrphanSpellVisual.LaunchDelay = 0.0f; - SendMessageToSet(playOrphanSpellVisual.Write(), true); -} - -void Unit::SendCancelSpellVisual(uint32 id) -{ - WorldPackets::Spells::CancelSpellVisual cancelSpellVisual; - cancelSpellVisual.Source = GetGUID(); - cancelSpellVisual.SpellVisualID = id; - SendMessageToSet(cancelSpellVisual.Write(), true); -} - -void Unit::SendPlaySpellVisual(Unit* 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 Unit::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 Unit::SendCancelSpellVisualKit(uint32 id) -{ - WorldPackets::Spells::CancelSpellVisualKit cancelSpellVisualKit; - cancelSpellVisualKit.Source = GetGUID(); - cancelSpellVisualKit.SpellVisualKitID = id; - SendMessageToSet(cancelSpellVisualKit.Write(), true); -} - -void Unit::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 Unit::CancelSpellMissiles(uint32 spellId, bool reverseMissile /*= false*/) { bool hasMissile = false; diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 837004de029..ba205ddec2a 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -1162,14 +1162,6 @@ class TC_GAME_API Unit : public WorldObject Aura* AddAura(SpellInfo const* spellInfo, uint32 effMask, Unit* target); void SetAuraStack(uint32 spellId, Unit* target, uint32 stack); - void SendCancelOrphanSpellVisual(uint32 id); - 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 SendCancelSpellVisual(uint32 id); - void SendPlaySpellVisual(Unit* 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 SendCancelSpellVisualKit(uint32 id); - void SendPlaySpellVisualKit(uint32 id, uint32 type, uint32 duration) const; void CancelSpellMissiles(uint32 spellId, bool reverseMissile = false); void DeMorph(); |
