mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-26 06:32:49 +00:00
fix(inventory): write is_bound, inventory_type and NPC item slots like live
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>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#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
|
||||
@@ -32,4 +33,15 @@ struct EquippedItem
|
||||
* 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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user