Partial revert of "Core/Spells: Moved SpellVisual functions from Unit to WorldObject" - client only accepts unit guids in these packets (orphan visuals not reverted)
Port From (https://github.com/TrinityCore/TrinityCore/commit/cbdb25595899aeb3d93e8d468a05bf8ef1f8e124)
This commit is contained in:
@@ -2456,42 +2456,6 @@ namespace Game.Entities
|
||||
return spell.Prepare(targets.Targets, args.TriggeringAura);
|
||||
}
|
||||
|
||||
public void SendPlaySpellVisual(WorldObject target, uint spellVisualId, ushort missReason, ushort reflectStatus, float travelSpeed, bool speedAsTime = false)
|
||||
{
|
||||
PlaySpellVisual playSpellVisual = new();
|
||||
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, true);
|
||||
}
|
||||
|
||||
public void SendPlaySpellVisual(Position targetPosition, float launchDelay, uint spellVisualId, ushort missReason, ushort reflectStatus, float travelSpeed, bool speedAsTime = false)
|
||||
{
|
||||
PlaySpellVisual playSpellVisual = new();
|
||||
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, true);
|
||||
}
|
||||
|
||||
void SendCancelSpellVisual(uint id)
|
||||
{
|
||||
CancelSpellVisual cancelSpellVisual = new();
|
||||
cancelSpellVisual.Source = GetGUID();
|
||||
cancelSpellVisual.SpellVisualID = id;
|
||||
SendMessageToSet(cancelSpellVisual, true);
|
||||
}
|
||||
|
||||
void SendPlayOrphanSpellVisual(ObjectGuid target, uint spellVisualId, float travelSpeed, bool speedAsTime = false, bool withSourceOrientation = false)
|
||||
{
|
||||
PlayOrphanSpellVisual playOrphanSpellVisual = new();
|
||||
@@ -2549,24 +2513,6 @@ namespace Game.Entities
|
||||
SendMessageToSet(cancelOrphanSpellVisual, true);
|
||||
}
|
||||
|
||||
public void SendPlaySpellVisualKit(uint id, uint type, uint duration)
|
||||
{
|
||||
PlaySpellVisualKit playSpellVisualKit = new();
|
||||
playSpellVisualKit.Unit = GetGUID();
|
||||
playSpellVisualKit.KitRecID = id;
|
||||
playSpellVisualKit.KitType = type;
|
||||
playSpellVisualKit.Duration = duration;
|
||||
SendMessageToSet(playSpellVisualKit, true);
|
||||
}
|
||||
|
||||
void SendCancelSpellVisualKit(uint id)
|
||||
{
|
||||
CancelSpellVisualKit cancelSpellVisualKit = new();
|
||||
cancelSpellVisualKit.Source = GetGUID();
|
||||
cancelSpellVisualKit.SpellVisualKitID = id;
|
||||
SendMessageToSet(cancelSpellVisualKit, true);
|
||||
}
|
||||
|
||||
// function based on function Unit::CanAttack from 13850 client
|
||||
public bool IsValidAttackTarget(WorldObject target, SpellInfo bySpell = null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user