Core/Loot: Add aoe loot target cap same as on official servers (50 corpses)
Port From (https://github.com/TrinityCore/TrinityCore/commit/0e61ea0b1ab17210b0cbc135408ffb501a2dc5fe)
This commit is contained in:
@@ -222,6 +222,8 @@ namespace Game
|
||||
{
|
||||
CreatureListSearcher searcher = new(_player, corpses, check);
|
||||
Cell.VisitGridObjects(_player, searcher, AELootCreatureCheck.LootDistance);
|
||||
if (corpses.Count > 49)
|
||||
corpses.Resize(49); // lootTarget is 50th, not in corpses vector
|
||||
}
|
||||
|
||||
if (!corpses.Empty())
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
}
|
||||
|
||||
public Array<LootRequest> Loot = new(1000);
|
||||
public Array<LootRequest> Loot = new(100);
|
||||
public ObjectGuid Target;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user