feat(ui): show keyring in inventory

This commit is contained in:
Kelsi 2026-03-14 08:42:25 -07:00
parent 800862c50a
commit 2c32b72f95
7 changed files with 152 additions and 10 deletions

View file

@ -2534,6 +2534,7 @@ private:
std::unordered_set<uint32_t> pendingItemQueries_;
std::array<uint64_t, 23> equipSlotGuids_{};
std::array<uint64_t, 16> backpackSlotGuids_{};
std::array<uint64_t, 32> keyringSlotGuids_{};
// Container (bag) contents: containerGuid -> array of item GUIDs per slot
struct ContainerInfo {
uint32_t numSlots = 0;

View file

@ -69,6 +69,7 @@ struct ItemSlot {
class Inventory {
public:
static constexpr int BACKPACK_SLOTS = 16;
static constexpr int KEYRING_SLOTS = 32;
static constexpr int NUM_EQUIP_SLOTS = 23;
static constexpr int NUM_BAG_SLOTS = 4;
static constexpr int MAX_BAG_SIZE = 36;
@ -88,6 +89,12 @@ public:
bool setEquipSlot(EquipSlot slot, const ItemDef& item);
bool clearEquipSlot(EquipSlot slot);
// Keyring
const ItemSlot& getKeyringSlot(int index) const;
bool setKeyringSlot(int index, const ItemDef& item);
bool clearKeyringSlot(int index);
int getKeyringSize() const { return KEYRING_SLOTS; }
// Extra bags
int getBagSize(int bagIndex) const;
void setBagSize(int bagIndex, int size);
@ -123,6 +130,7 @@ public:
private:
std::array<ItemSlot, BACKPACK_SLOTS> backpack{};
std::array<ItemSlot, KEYRING_SLOTS> keyring_{};
std::array<ItemSlot, NUM_EQUIP_SLOTS> equipment{};
struct BagData {

View file

@ -57,6 +57,7 @@ enum class UF : uint16_t {
PLAYER_QUEST_LOG_START,
PLAYER_FIELD_INV_SLOT_HEAD,
PLAYER_FIELD_PACK_SLOT_1,
PLAYER_FIELD_KEYRING_SLOT_1,
PLAYER_FIELD_BANK_SLOT_1,
PLAYER_FIELD_BANKBAG_SLOT_1,
PLAYER_SKILL_INFO_START,