fix: coin dupe on same team (#1911)

* feat: Loot rework

* Allow dupe powerup pickups

* change default team loot to shared

* fix: coin dupe on team
This commit is contained in:
David Markowitz
2025-10-15 20:36:45 -07:00
committed by GitHub
parent c2dba31f70
commit ec6253c80c

View File

@@ -773,7 +773,15 @@ void DestroyableComponent::Smash(const LWOOBJID source, const eKillType killType
coinsTotal -= coinsToLose;
Loot::DropLoot(m_Parent, m_Parent->GetObjectID(), -1, coinsToLose, coinsToLose);
GameMessages::DropClientLoot lootMsg{};
lootMsg.target = m_Parent->GetObjectID();
lootMsg.ownerID = m_Parent->GetObjectID();
lootMsg.currency = coinsToLose;
lootMsg.spawnPos = m_Parent->GetPosition();
lootMsg.sourceID = source;
lootMsg.item = LOT_NULL;
lootMsg.Send();
lootMsg.Send(m_Parent->GetSystemAddress());
character->SetCoins(coinsTotal, eLootSourceType::PICKUP);
}
}