mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
fix(inventory): package contents are added with the loot source Pickup
Live sent AddItemToInventoryClientSync with loot_type_source Pickup for the items of opened packages (token bags, surprise packs, the imaginite bag; all 98 items added after a live UseNonEquipmentItem). DLU used Consumption. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -400,7 +400,8 @@ void Item::UseNonEquip(Item* item) {
|
||||
}
|
||||
|
||||
if (playerInventoryComponent->HasSpaceForLoot(rolledLoot)) {
|
||||
Loot::GiveLoot(playerInventoryComponent->GetParent(), rolledLoot, eLootSourceType::CONSUMPTION);
|
||||
// Live added package contents with the loot source Pickup (all 98 items added after a live UseNonEquipmentItem)
|
||||
Loot::GiveLoot(playerInventoryComponent->GetParent(), rolledLoot, eLootSourceType::PICKUP);
|
||||
item->SetCount(item->GetCount() - 1);
|
||||
} else {
|
||||
success = false;
|
||||
|
||||
Reference in New Issue
Block a user