Core/PacketIO: Implemented CMSG_UPDATE_AREA_TRIGGER_VISUAL

Port From (https://github.com/TrinityCore/TrinityCore/commit/b88f4b7f4f8744b7cd455c07d3b94a704c373dfe)
This commit is contained in:
Hondacrx
2025-08-18 09:46:54 -04:00
parent 9fad3e7752
commit ddfc5c7484
4 changed files with 45 additions and 6 deletions
+17
View File
@@ -623,6 +623,23 @@ namespace Game
_player.SetChannelVisual(new SpellCastVisualField() { SpellXSpellVisualID = spellXspellVisualId });
}
[WorldPacketHandler(ClientOpcodes.UpdateAreaTriggerVisual, Processing = PacketProcessing.Inplace)]
void HandleUpdateAreaTriggerVisual(UpdateAreaTriggerVisual updateAreaTriggerVisual)
{
AreaTrigger target = ObjectAccessor.GetAreaTrigger(_player, updateAreaTriggerVisual.TargetGUID);
if (target == null)
return;
if (target.GetCasterGuid() != _player.GetGUID())
return;
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(target.m_areaTriggerData.SpellForVisuals, _player.GetMap().GetDifficultyID());
if (spellInfo == null)
return;
target.SetSpellVisual(new SpellCastVisual(_player.GetCastSpellXSpellVisualId(spellInfo), 0));
}
[WorldPacketHandler(ClientOpcodes.KeyboundOverride, Processing = PacketProcessing.ThreadSafe)]
void HandleKeyboundOverride(KeyboundOverride keyboundOverride)
{