mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 02:43:44 +00:00
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:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user