Core/Spells: Interrupt spells and auras before sending loot to client

Port From (https://github.com/TrinityCore/TrinityCore/commit/29cf2a61af8fcbda763ae2be2e52ce9e6a834a56)
This commit is contained in:
hondacrx
2022-05-30 14:01:03 -04:00
parent 8c7400e790
commit 702e8c0feb
+6 -6
View File
@@ -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<Creature> 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)]