[Loot] Fix issue with nested data being loaded multiple times (#4192)

* [Loot] Fix issue with nested data being loaded multiple times

* Update zone_loot.cpp

* Fix #lootsim printout

* Update loot.cpp
This commit is contained in:
Chris Miles
2024-03-22 23:49:23 -05:00
committed by GitHub
parent 4bf60a6522
commit 96830b4a19
4 changed files with 96 additions and 10 deletions
+2 -2
View File
@@ -116,13 +116,13 @@ void command_lootsim(Client *c, const Seperator *sep)
c->Message(Chat::White, fmt::format("# Global Loot Table ID [{}]", id).c_str());
c->SendChatLineBreak();
loot_table = zone->GetLootTable(loottable_id);
loot_table = zone->GetLootTable(id);
if (!loot_table) {
c->Message(Chat::Red, fmt::format("Global Loot table not found [{}]", id).c_str());
continue;
}
le = zone->GetLootTableEntries(loottable_id);
le = zone->GetLootTableEntries(id);
// translate above for loop using loot_table_entries
for (auto &e: le) {