fix(loot): send no currency drop for loot without coins

DLU sent a DropClientLoot for 0 coins with every drop whose coin range was
0, such as item-only smashables and scripted drops. None of the 3163 live
currency drops was for 0 coins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 12:50:47 -05:00
parent 776ddec77c
commit 29d041c2f5

View File

@@ -391,7 +391,9 @@ void DropLoot(Entity* player, const LWOOBJID source, const std::map<LOT, LootDro
EconomyLedger::RecordMapEvent(IEconomyLedger::eMapEvent::COIN_DROPS, 0, spawnPosition, static_cast<int64_t>(droppedCoins) * lootEarners.size(), player); EconomyLedger::RecordMapEvent(IEconomyLedger::eMapEvent::COIN_DROPS, 0, spawnPosition, static_cast<int64_t>(droppedCoins) * lootEarners.size(), player);
} }
// Drops coins for each alive member of a team (or just a player) // Drops coins for each alive member of a team (or just a player).
// Live sent no currency drop for loot without coins (none of 3163 live currency drops was for 0 coins).
if (droppedCoins == 0) lootEarners.clear();
for (auto member : lootEarners) { for (auto member : lootEarners) {
GameMessages::DropClientLoot lootMsg{}; GameMessages::DropClientLoot lootMsg{};
lootMsg.target = member; lootMsg.target = member;