fix(loot): activity rewards drop from the player at the activity object

Live sent quickbuild completion loot (about 190 samples) and the dragon,
BONS, spider queen and Frakjaw chest and wishing well rewards with the
player who earned them as the DropClientLoot source and owner,
use_position true and the spawn position at the object. DLU used the object
as the source, so use_position was false.

DropActivityLoot now uses the player as the source by default. The growing
flowers and the VE mission console have no live samples and keep the
object as the source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 12:52:26 -05:00
parent 616ca46e95
commit b7e3c5e899
4 changed files with 38 additions and 20 deletions

View File

@@ -31,7 +31,12 @@ namespace Loot {
void GiveActivityLoot(Entity* player, const LWOOBJID source, uint32_t activityID, int32_t rating = 0);
void DropLoot(Entity* player, const LWOOBJID source, uint32_t matrixIndex, uint32_t minCoins, uint32_t maxCoins);
void DropItem(Entity& player, GameMessages::DropClientLoot& lootMsg, bool useTeam = false, bool forceFfa = false);
void DropActivityLoot(Entity* player, const LWOOBJID source, uint32_t activityID, int32_t rating = 0);
/**
* Drops the loot of an activity's reward for the given rating, spawning at the source object.
* fromPlayer: the DropClientLoot source is the player instead of the object, as live sent quickbuild, chest and
* wishing well rewards (use_position true, spawn position the object's).
*/
void DropActivityLoot(Entity* player, const LWOOBJID source, uint32_t activityID, int32_t rating = 0, bool fromPlayer = true);
/**
* The coin range {min, max} of an ActivityRewards row, as live rolled it: the reward's ChallengeRating is the