mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/PacketIO: Implemented CMSG_UPDATE_AREA_TRIGGER_VISUAL
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
*/
|
||||
|
||||
#include "WorldSession.h"
|
||||
#include "AreaTrigger.h"
|
||||
#include "AreaTriggerPackets.h"
|
||||
#include "CollectionMgr.h"
|
||||
#include "Common.h"
|
||||
#include "DatabaseEnv.h"
|
||||
@@ -607,6 +609,22 @@ void WorldSession::HandleUpdateAuraVisual(WorldPackets::Spells::UpdateAuraVisual
|
||||
_player->SetChannelVisual({ .SpellXSpellVisualID = spellXspellVisualId });
|
||||
}
|
||||
|
||||
void WorldSession::HandleUpdateAreaTriggerVisual(WorldPackets::AreaTrigger::UpdateAreaTriggerVisual const& updateAreaTriggerVisual)
|
||||
{
|
||||
AreaTrigger* target = ObjectAccessor::GetAreaTrigger(*_player, updateAreaTriggerVisual.TargetGUID);
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
if (target->GetCasterGuid() != _player->GetGUID())
|
||||
return;
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(target->m_areaTriggerData->SpellForVisuals, _player->GetMap()->GetDifficultyID());
|
||||
if (!spellInfo)
|
||||
return;
|
||||
|
||||
target->SetSpellVisual({ .SpellXSpellVisualID = _player->GetCastSpellXSpellVisualId(spellInfo) });
|
||||
}
|
||||
|
||||
void WorldSession::HandleKeyboundOverride(WorldPackets::Spells::KeyboundOverride& keyboundOverride)
|
||||
{
|
||||
Player* player = GetPlayer();
|
||||
|
||||
Reference in New Issue
Block a user