Core/Object: Added possibility to override sourceLocation for SendPlayOrphanSpellVisual

Port From (https://github.com/TrinityCore/TrinityCore/commit/53204130c62aadca3b961844a1c9d2dfe967518d)
This commit is contained in:
Hondacrx
2024-08-25 23:51:42 -04:00
parent 0bb55fd942
commit b3ffd700dd
+14 -4
View File
@@ -2518,10 +2518,10 @@ namespace Game.Entities
return spell.Prepare(targets.Targets, args.TriggeringAura);
}
void SendPlayOrphanSpellVisual(ObjectGuid target, uint spellVisualId, float travelSpeed, bool speedAsTime = false, bool withSourceOrientation = false)
void SendPlayOrphanSpellVisual(Position sourceLocation, ObjectGuid target, uint spellVisualId, float travelSpeed, bool speedAsTime = false, bool withSourceOrientation = false)
{
PlayOrphanSpellVisual playOrphanSpellVisual = new();
playOrphanSpellVisual.SourceLocation = GetPosition();
playOrphanSpellVisual.SourceLocation = sourceLocation;
if (withSourceOrientation)
{
if (IsGameObject())
@@ -2543,10 +2543,10 @@ namespace Game.Entities
SendMessageToSet(playOrphanSpellVisual, true);
}
void SendPlayOrphanSpellVisual(Position targetLocation, uint spellVisualId, float travelSpeed, bool speedAsTime = false, bool withSourceOrientation = false)
void SendPlayOrphanSpellVisual(Position sourceLocation, Position targetLocation, uint spellVisualId, float travelSpeed, bool speedAsTime = false, bool withSourceOrientation = false)
{
PlayOrphanSpellVisual playOrphanSpellVisual = new();
playOrphanSpellVisual.SourceLocation = GetPosition();
playOrphanSpellVisual.SourceLocation = sourceLocation;
if (withSourceOrientation)
{
if (IsGameObject())
@@ -2568,6 +2568,16 @@ namespace Game.Entities
SendMessageToSet(playOrphanSpellVisual, true);
}
void SendPlayOrphanSpellVisual(ObjectGuid target, uint spellVisualId, float travelSpeed, bool speedAsTime = false, bool withSourceOrientation = false)
{
SendPlayOrphanSpellVisual(GetPosition(), target, spellVisualId, travelSpeed, speedAsTime, withSourceOrientation);
}
void SendPlayOrphanSpellVisual(Position targetLocation, uint spellVisualId, float travelSpeed, bool speedAsTime = false, bool withSourceOrientation = false)
{
SendPlayOrphanSpellVisual(GetPosition(), targetLocation, spellVisualId, travelSpeed, speedAsTime, withSourceOrientation);
}
void SendCancelOrphanSpellVisual(uint id)
{
CancelOrphanSpellVisual cancelOrphanSpellVisual = new();