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:
@@ -274,6 +274,12 @@ namespace Game
|
|||||||
if (!GetPlayer().IsAlive() || !packet.Unit.IsCreatureOrVehicle())
|
if (!GetPlayer().IsAlive() || !packet.Unit.IsCreatureOrVehicle())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// interrupt cast
|
||||||
|
if (GetPlayer().IsNonMeleeSpellCast(false))
|
||||||
|
GetPlayer().InterruptNonMeleeSpells(false);
|
||||||
|
|
||||||
|
GetPlayer().RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Looting);
|
||||||
|
|
||||||
List<Creature> corpses = new();
|
List<Creature> corpses = new();
|
||||||
AELootCreatureCheck check = new(_player, packet.Unit);
|
AELootCreatureCheck check = new(_player, packet.Unit);
|
||||||
CreatureListSearcher searcher = new(_player, corpses, check);
|
CreatureListSearcher searcher = new(_player, corpses, check);
|
||||||
@@ -295,12 +301,6 @@ namespace Game
|
|||||||
SendPacket(new AELootTargetsAck());
|
SendPacket(new AELootTargetsAck());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// interrupt cast
|
|
||||||
if (GetPlayer().IsNonMeleeSpellCast(false))
|
|
||||||
GetPlayer().InterruptNonMeleeSpells(false);
|
|
||||||
|
|
||||||
GetPlayer().RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Looting);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[WorldPacketHandler(ClientOpcodes.LootRelease)]
|
[WorldPacketHandler(ClientOpcodes.LootRelease)]
|
||||||
|
|||||||
Reference in New Issue
Block a user