mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
Implement bank, guild bank, and auction house systems
Add 27 new opcodes, packet builders/parsers, handler methods, inventory extension with 28 bank slots + 7 bank bags, and UI windows for personal bank, guild bank (6 tabs x 98 slots), and auction house (browse/sell/bid). Fix Classic gossip parser to omit boxMoney/boxText fields not present in Vanilla protocol, fix gossip icon labels with text-based NPC type detection, and add Turtle WoW opcode mappings for bank and auction interactions.
This commit is contained in:
parent
0d4a9c38f7
commit
381d896348
14 changed files with 1839 additions and 15 deletions
|
|
@ -56,6 +56,8 @@ public:
|
|||
static constexpr int NUM_EQUIP_SLOTS = 23;
|
||||
static constexpr int NUM_BAG_SLOTS = 4;
|
||||
static constexpr int MAX_BAG_SIZE = 36;
|
||||
static constexpr int BANK_SLOTS = 28;
|
||||
static constexpr int BANK_BAG_SLOTS = 7;
|
||||
|
||||
Inventory();
|
||||
|
||||
|
|
@ -76,6 +78,19 @@ public:
|
|||
const ItemSlot& getBagSlot(int bagIndex, int slotIndex) const;
|
||||
bool setBagSlot(int bagIndex, int slotIndex, const ItemDef& item);
|
||||
|
||||
// Bank slots (28 main + 7 bank bags)
|
||||
const ItemSlot& getBankSlot(int index) const;
|
||||
bool setBankSlot(int index, const ItemDef& item);
|
||||
bool clearBankSlot(int index);
|
||||
|
||||
const ItemSlot& getBankBagSlot(int bagIndex, int slotIndex) const;
|
||||
bool setBankBagSlot(int bagIndex, int slotIndex, const ItemDef& item);
|
||||
int getBankBagSize(int bagIndex) const;
|
||||
void setBankBagSize(int bagIndex, int size);
|
||||
|
||||
uint8_t getPurchasedBankBagSlots() const { return purchasedBankBagSlots_; }
|
||||
void setPurchasedBankBagSlots(uint8_t count) { purchasedBankBagSlots_ = count; }
|
||||
|
||||
// Utility
|
||||
int findFreeBackpackSlot() const;
|
||||
bool addItem(const ItemDef& item);
|
||||
|
|
@ -92,6 +107,11 @@ private:
|
|||
std::array<ItemSlot, MAX_BAG_SIZE> slots{};
|
||||
};
|
||||
std::array<BagData, NUM_BAG_SLOTS> bags{};
|
||||
|
||||
// Bank
|
||||
std::array<ItemSlot, BANK_SLOTS> bankSlots_{};
|
||||
std::array<BagData, BANK_BAG_SLOTS> bankBags_{};
|
||||
uint8_t purchasedBankBagSlots_ = 0;
|
||||
};
|
||||
|
||||
const char* getQualityName(ItemQuality quality);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue