mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-21 04:02:48 +00:00
feat(loot): rewards, purchases, mail and trades say where items came from
The other item sources live marked in AddItemToInventoryClientSync's extra info, with the keys and values live sent: - mission and achievement rewards: _Metric_Mission_ID_Int and source LOT 1, the player (225 of 225 live rewards) - activity rewards: _Metric_Activity_ID_Int and the activity object's LOT - vendor purchases: the vendor's LOT and _Metric_Currency_Delta_Int, the coins paid as a negative number (left out when the item costs no coins) - mail attachments: _Metric_Mail_ID_Int64 - traded items: _Metric_Transaction_ID_Int64, the trade's ID Loot::GiveLoot gains overloads that pass them on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -239,7 +239,10 @@ namespace Mail {
|
||||
|
||||
LwoNameValue config;
|
||||
config.InsertLines(playerMail->itemConfig);
|
||||
const auto claimed = inv->ReceiveItem(playerMail->itemID, playerMail->itemLOT, playerMail->itemCount, eLootSourceType::MAIL, config, playerMail->itemSubkey);
|
||||
// Live sent the mail's ID with the attachment
|
||||
ReceiveItemOptions options{};
|
||||
options.metrics.mailId = static_cast<uint64_t>(mailID);
|
||||
const auto claimed = inv->ReceiveItem(playerMail->itemID, playerMail->itemLOT, playerMail->itemCount, eLootSourceType::MAIL, config, playerMail->itemSubkey, false, options);
|
||||
Database::Get()->ClaimMailItem(mailID);
|
||||
DashboardNotify::Changed("mail", playerMail->receiverId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user