From c00e2e4851498aa04ac1d8ff13a0759b245df72b Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 17 Sep 2022 20:58:24 +0200 Subject: Core/Loot: Simplify loot containers * Unify items and quest_items * Drop PlayerQuestItems and PlayerNonQuestNonFFAConditionalItems --- src/server/scripts/Commands/cs_npc.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'src/server/scripts/Commands') diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 9fcf544b0ec..9340b0f292f 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -1183,7 +1183,7 @@ public: for (auto it = pair.second->cbegin(); it != pair.second->cend(); ++it) { - LootItem const& item = items[it->index]; + LootItem const& item = items[it->LootListId]; if (!(it->is_looted) && !item.is_looted) _ShowLootEntry(handler, item.itemid, item.count, true); } @@ -1216,11 +1216,6 @@ public: for (LootItem const& item : loot->items) if (!item.is_looted) _ShowLootEntry(handler, item.itemid, item.count); - - handler->PSendSysMessage(LANG_COMMAND_NPC_SHOWLOOT_LABEL, "Quest items", loot->quest_items.size()); - for (LootItem const& item : loot->quest_items) - if (!item.is_looted) - _ShowLootEntry(handler, item.itemid, item.count); } else { @@ -1229,23 +1224,11 @@ public: if (!item.is_looted && !item.freeforall && item.conditions.empty()) _ShowLootEntry(handler, item.itemid, item.count); - if (!loot->GetPlayerQuestItems().empty()) - { - handler->PSendSysMessage(LANG_COMMAND_NPC_SHOWLOOT_LABEL_2, "Per-player quest items"); - _IterateNotNormalLootMap(handler, loot->GetPlayerQuestItems(), loot->quest_items); - } - if (!loot->GetPlayerFFAItems().empty()) { handler->PSendSysMessage(LANG_COMMAND_NPC_SHOWLOOT_LABEL_2, "FFA items per allowed player"); _IterateNotNormalLootMap(handler, loot->GetPlayerFFAItems(), loot->items); } - - if (!loot->GetPlayerNonQuestNonFFAConditionalItems().empty()) - { - handler->PSendSysMessage(LANG_COMMAND_NPC_SHOWLOOT_LABEL_2, "Per-player conditional items"); - _IterateNotNormalLootMap(handler, loot->GetPlayerNonQuestNonFFAConditionalItems(), loot->items); - } } return true; -- cgit v1.2.3