mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-26 07:28:45 -07:00
feat: Implement quest reward chest functionality; enhance gift generation and consumption logic, update database schema, and add tests for new behavior
This commit is contained in:
@@ -93,4 +93,11 @@ public class GiftPackageEntity
|
||||
public DateTime? ConsumedAt { get; set; }
|
||||
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
|
||||
/// <summary>When > 0, the exact StoreItem this gift grants on
|
||||
/// consume — used by quest-reward chests so consuming grants the
|
||||
/// right item regardless of kind (avatar / equipment / consumable)
|
||||
/// via <c>StoreService.GrantItemAsync</c>. 0 = legacy gift whose
|
||||
/// payload is derived from the wire fields above. Not on wire.</summary>
|
||||
public long SourceStoreItemId { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"_comment": "Per-quest reward chest contents. Keyed by the RRO room id the player is in when they open the end-of-quest gift box (the gifts/generate request carries no quest id, so the server keys off the player's current room via presence). Each entry lists the store-item slugs that quest can award; the server picks one at random from the list. Slugs use the same scheme as the store: wardrobe-{guid} for outfits, consumable-{name} for consumables, equipment-{prefab}:{guid} for equipment. Populate `rooms` with real roomId -> item-slug lists.",
|
||||
"_comment": "Per-quest reward chest contents for RRO rooms. Keyed by the seeded room NAME (RoomEntity.Name, e.g. GoldenTrophy / Crescendo / StuntRunner / CrimsonCauldron / IsleOfLostSkulls / TheRiseofJumbotron) because the end-of-quest gift box (gifts/generate) carries no quest id, so the server keys off the room the player is in (via presence). Each entry lists the store-item slugs that quest's chest can award; the server picks one. Slugs use the store scheme: wardrobe-{guid} for outfit items, equipment-{prefab}:{modguid} for equipment skins, consumable-{name} for consumables (see data/consumables.json). Example: \"GoldenTrophy\": [\"wardrobe-<trophyGuid>\", \"equipment-<prefab>:<guid>\"]. Fill in `rooms` with the per-quest item lists.",
|
||||
"rooms": {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user