Core/GameObjects: Add GameObjectPlaySpellVisual
Port From (https://github.com/TrinityCore/TrinityCore/commit/2d84912ce92e1ac30efd6548ca98cb8f894f5268)
This commit is contained in:
@@ -2659,6 +2659,17 @@ namespace Game.Entities
|
||||
SendMessageToSet(activateAnimKit, true);
|
||||
}
|
||||
|
||||
void SetSpellVisualId(uint spellVisualId, ObjectGuid activatorGuid = default)
|
||||
{
|
||||
SetUpdateFieldValue(m_values.ModifyValue(m_gameObjectData).ModifyValue(m_gameObjectData.SpellVisualID), spellVisualId);
|
||||
|
||||
GameObjectPlaySpellVisual packet = new();
|
||||
packet.ObjectGUID = GetGUID();
|
||||
packet.ActivatorGUID = activatorGuid;
|
||||
packet.SpellVisualID = spellVisualId;
|
||||
SendMessageToSet(packet, true);
|
||||
}
|
||||
|
||||
public override ushort GetAIAnimKitId() { return _animKitId; }
|
||||
|
||||
public uint GetWorldEffectID() { return _worldEffectID; }
|
||||
|
||||
@@ -149,4 +149,20 @@ namespace Game.Networking.Packets
|
||||
public ObjectGuid ObjectGUID;
|
||||
public int UILink;
|
||||
}
|
||||
|
||||
class GameObjectPlaySpellVisual : ServerPacket
|
||||
{
|
||||
public GameObjectPlaySpellVisual() : base(ServerOpcodes.GameObjectPlaySpellVisual) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(ObjectGUID);
|
||||
_worldPacket.WritePackedGuid(ActivatorGUID);
|
||||
_worldPacket.WriteUInt32(SpellVisualID);
|
||||
}
|
||||
|
||||
public ObjectGuid ObjectGUID;
|
||||
public ObjectGuid ActivatorGUID;
|
||||
public uint SpellVisualID;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user