Core/Loot: implemented a custom server config setting to enable or disable AE loot
Port From (https://github.com/TrinityCore/TrinityCore/commit/ccc083593af16f505263f889712f46f9382bb588)
This commit is contained in:
@@ -217,8 +217,12 @@ namespace Game
|
||||
GetPlayer().RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Looting);
|
||||
|
||||
List<Creature> corpses = new();
|
||||
CreatureListSearcher searcher = new(_player, corpses, check);
|
||||
Cell.VisitGridObjects(_player, searcher, AELootCreatureCheck.LootDistance);
|
||||
bool aeLootEnabled = WorldConfig.GetBoolValue(WorldCfg.EnableAeLoot);
|
||||
if (aeLootEnabled)
|
||||
{
|
||||
CreatureListSearcher searcher = new(_player, corpses, check);
|
||||
Cell.VisitGridObjects(_player, searcher, AELootCreatureCheck.LootDistance);
|
||||
}
|
||||
|
||||
if (!corpses.Empty())
|
||||
SendPacket(new AELootTargets((uint)corpses.Count + 1));
|
||||
|
||||
Reference in New Issue
Block a user