mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
Equipped items in the inventory component construction, as live wrote them (49,534 equipped items in the captures): - is_bound is the item's bound state (false for 2,990 items that bind neither way); DLU always wrote true. NPC items are bound when the item binds on pickup or on equip (2,640 of 2,640). - inventory_type is the item's inventory, left out for ITEMS: TempEquip for temporary equips and proxies (3,899), Model for models (232). DLU never wrote it. DLU keeps player proxies in ITEM_SETS; they are sent as TEMP_ITEMS, like live. - An NPC item's slot is its slot in the inventory it would be in: models count from 0 in MODELS and proxies from 0 in TEMP_ITEMS, so a proxy no longer takes the next ITEMS slot (1,475 of 1,491 NPC constructions match; DLU's numbering matched 1,352). - equipped_model_transforms is an empty list on every construction (11,214 of 11,214); DLU wrote none. Test: InventoryConstructionTest.NpcItemsLikeLive (NPCs 7426 and 13790 from the captures), InventoryConstructionTest.PlayerItemsLikeLive. Check in game: NPCs with gear (Numb Chuck in FV, the Ninjago ninjas, faction vendors) show all their gear; your own and other players' equipped items, proxies (ninja hoods, capes) and temporary equips (Maelstrom vacuum, quest items) show normally after zoning and after equipping/unequipping. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
48 lines
916 B
C
48 lines
916 B
C
#pragma once
|
|
|
|
#include "dCommonVars.h"
|
|
#include "LDFFormat.h"
|
|
#include "eInventoryType.h"
|
|
|
|
/**
|
|
* An item that's equipped, generally as a smaller return type than the regular Item class
|
|
*/
|
|
struct EquippedItem
|
|
{
|
|
/**
|
|
* The object ID of the equipped item
|
|
*/
|
|
LWOOBJID id = LWOOBJID_EMPTY;
|
|
|
|
/**
|
|
* The LOT of this equipped item
|
|
*/
|
|
LOT lot = LOT_NULL;
|
|
|
|
/**
|
|
* The number of items that are stored in this slot
|
|
*/
|
|
uint32_t count = 0;
|
|
|
|
/**
|
|
* The slot this item is stored in
|
|
*/
|
|
uint32_t slot = 0;
|
|
|
|
/**
|
|
* The configuration of the item with any extra data
|
|
*/
|
|
LwoNameValue config = {};
|
|
|
|
/**
|
|
* Whether the item is bound to its owner (the construction's is_bound)
|
|
*/
|
|
bool bound = true;
|
|
|
|
/**
|
|
* The inventory the item is in (the construction's inventory_type): TEMP_ITEMS for temporary equips and
|
|
* proxies, MODELS for models, ITEMS for the rest
|
|
*/
|
|
eInventoryType inventoryType = ITEMS;
|
|
};
|