From 702e8c0febcf23e88b17a5d8667f2b42b12c96b3 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 30 May 2022 14:01:03 -0400 Subject: [PATCH] Core/Spells: Interrupt spells and auras before sending loot to client Port From (https://github.com/TrinityCore/TrinityCore/commit/29cf2a61af8fcbda763ae2be2e52ce9e6a834a56) --- Source/Game/Handlers/LootHandler.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/Game/Handlers/LootHandler.cs b/Source/Game/Handlers/LootHandler.cs index e8c26d479..9ae721396 100644 --- a/Source/Game/Handlers/LootHandler.cs +++ b/Source/Game/Handlers/LootHandler.cs @@ -274,6 +274,12 @@ namespace Game if (!GetPlayer().IsAlive() || !packet.Unit.IsCreatureOrVehicle()) return; + // interrupt cast + if (GetPlayer().IsNonMeleeSpellCast(false)) + GetPlayer().InterruptNonMeleeSpells(false); + + GetPlayer().RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Looting); + List corpses = new(); AELootCreatureCheck check = new(_player, packet.Unit); CreatureListSearcher searcher = new(_player, corpses, check); @@ -295,12 +301,6 @@ namespace Game SendPacket(new AELootTargetsAck()); } } - - // interrupt cast - if (GetPlayer().IsNonMeleeSpellCast(false)) - GetPlayer().InterruptNonMeleeSpells(false); - - GetPlayer().RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Looting); } [WorldPacketHandler(ClientOpcodes.LootRelease)]