mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells: Interrupt spells and auras before sending loot to client (#27279)
(cherry picked from commit a24ea431dc)
This commit is contained in:
@@ -272,6 +272,12 @@ void WorldSession::HandleLootOpcode(WorldPackets::Loot::LootUnit& packet)
|
||||
if (!GetPlayer()->IsAlive() || !packet.Unit.IsCreatureOrVehicle())
|
||||
return;
|
||||
|
||||
// interrupt cast
|
||||
if (GetPlayer()->IsNonMeleeSpellCast(false))
|
||||
GetPlayer()->InterruptNonMeleeSpells(false);
|
||||
|
||||
GetPlayer()->RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags::Looting);
|
||||
|
||||
std::list<Creature*> corpses;
|
||||
AELootCreatureCheck check(_player, packet.Unit);
|
||||
Trinity::CreatureListSearcher<AELootCreatureCheck> searcher(_player, corpses, check);
|
||||
@@ -293,12 +299,6 @@ void WorldSession::HandleLootOpcode(WorldPackets::Loot::LootUnit& packet)
|
||||
SendPacket(WorldPackets::Loot::AELootTargetsAck().Write());
|
||||
}
|
||||
}
|
||||
|
||||
// interrupt cast
|
||||
if (GetPlayer()->IsNonMeleeSpellCast(false))
|
||||
GetPlayer()->InterruptNonMeleeSpells(false);
|
||||
|
||||
GetPlayer()->RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags::Looting);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLootReleaseOpcode(WorldPackets::Loot::LootRelease& packet)
|
||||
|
||||
Reference in New Issue
Block a user