diff options
| author | Shauren <shauren.trinity@gmail.com> | 2022-09-17 20:58:24 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2022-09-17 20:58:24 +0200 |
| commit | c00e2e4851498aa04ac1d8ff13a0759b245df72b (patch) | |
| tree | 8745da084a4787c222cc3441ae0b3703793d2e03 /src/server/scripts | |
| parent | 3ef5079feeedfdafc9d3c1d9f865e96dbc77ecc8 (diff) | |
Core/Loot: Simplify loot containers
* Unify items and quest_items
* Drop PlayerQuestItems and PlayerNonQuestNonFFAConditionalItems
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Commands/cs_npc.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
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; |
