Core/Loot: Simplify loot containers
Port From (https://github.com/TrinityCore/TrinityCore/commit/c00e2e4851498aa04ac1d8ff13a0759b245df72b)
This commit is contained in:
@@ -340,11 +340,6 @@ namespace Game.Chat
|
||||
foreach (LootItem item in loot.items)
|
||||
if (!item.is_looted)
|
||||
_ShowLootEntry(handler, item.itemid, item.count);
|
||||
|
||||
handler.SendSysMessage(CypherStrings.CommandNpcShowlootLabel, "Quest items", loot.quest_items.Count);
|
||||
foreach (LootItem item in loot.quest_items)
|
||||
if (!item.is_looted)
|
||||
_ShowLootEntry(handler, item.itemid, item.count);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -353,23 +348,11 @@ namespace Game.Chat
|
||||
if (!item.is_looted && !item.freeforall && item.conditions.Empty())
|
||||
_ShowLootEntry(handler, item.itemid, item.count);
|
||||
|
||||
if (!loot.GetPlayerQuestItems().Empty())
|
||||
{
|
||||
handler.SendSysMessage(CypherStrings.CommandNpcShowlootLabel2, "Per-player quest items");
|
||||
_IterateNotNormalLootMap(handler, loot.GetPlayerQuestItems(), loot.quest_items);
|
||||
}
|
||||
|
||||
if (!loot.GetPlayerFFAItems().Empty())
|
||||
{
|
||||
handler.SendSysMessage(CypherStrings.CommandNpcShowlootLabel2, "FFA items per allowed player");
|
||||
_IterateNotNormalLootMap(handler, loot.GetPlayerFFAItems(), loot.items);
|
||||
}
|
||||
|
||||
if (!loot.GetPlayerNonQuestNonFFAConditionalItems().Empty())
|
||||
{
|
||||
handler.SendSysMessage(CypherStrings.CommandNpcShowlootLabel2, "Per-player conditional items");
|
||||
_IterateNotNormalLootMap(handler, loot.GetPlayerNonQuestNonFFAConditionalItems(), loot.items);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -565,7 +548,7 @@ namespace Game.Chat
|
||||
|
||||
foreach (var it in list)
|
||||
{
|
||||
LootItem item = items[it.index];
|
||||
LootItem item = items[it.LootListId];
|
||||
if (!it.is_looted && !item.is_looted)
|
||||
_ShowLootEntry(handler, item.itemid, item.count, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user