From f60eda7b0c13d2e8e56a93b4136177e6b51fc182 Mon Sep 17 00:00:00 2001 From: ratkosrb Date: Sun, 12 May 2024 22:15:04 +0300 Subject: [PATCH] Fix delayed darkmoon cannon shoot animation. The custom anim opcode appears to be sent twice in sniff, the first time a second before 24731 is cast, the second after 24742 is cast. --- src/game/Spells/SpellAuras.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/game/Spells/SpellAuras.cpp b/src/game/Spells/SpellAuras.cpp index 9045a5e9bc9..db1ff86df14 100644 --- a/src/game/Spells/SpellAuras.cpp +++ b/src/game/Spells/SpellAuras.cpp @@ -4448,6 +4448,18 @@ void Aura::HandlePeriodicTriggerSpell(bool apply, bool /*Real*/) { switch (GetId()) { + case 24743: // Cannon Prep + case 24832: // Cannon Prep + { + if (GameObject* pGo = ToGameObject(GetRealCaster())) + { + pGo->m_Events.AddLambdaEventAtOffset([pGo]() + { + pGo->SendGameObjectCustomAnim(); + }, 3600); + } + break; + } case 26869: // Amorous (Love is in the Air) { if (Creature* pCreature = target->ToCreature())