Core/Object: Added possibility to override sourceLocation for SendPlayOrphanSpellVisual
This commit is contained in:
@@ -2948,10 +2948,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())
|
||||
@@ -2973,10 +2973,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())
|
||||
@@ -2998,6 +2998,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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user