mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 08:03:50 +00:00
feat: add item stack splitting via Shift+right-click
Implements CMSG_SPLIT_ITEM (0x10E) with a slider popup for choosing split count. Auto-finds empty destination slot across backpack and bags. Shift+right-click on stackable items (count > 1) opens split dialog; non-stackable items still get the destroy confirmation.
This commit is contained in:
parent
17d652947c
commit
9b32a328c3
6 changed files with 122 additions and 15 deletions
|
|
@ -2029,6 +2029,7 @@ public:
|
|||
void openItemBySlot(int backpackIndex);
|
||||
void openItemInBag(int bagIndex, int slotIndex);
|
||||
void destroyItem(uint8_t bag, uint8_t slot, uint8_t count = 1);
|
||||
void splitItem(uint8_t srcBag, uint8_t srcSlot, uint8_t count);
|
||||
void swapContainerItems(uint8_t srcBag, uint8_t srcSlot, uint8_t dstBag, uint8_t dstSlot);
|
||||
void swapBagSlots(int srcBagIndex, int dstBagIndex);
|
||||
void useItemById(uint32_t itemId);
|
||||
|
|
|
|||
|
|
@ -2046,6 +2046,13 @@ public:
|
|||
static network::Packet build(uint8_t dstBag, uint8_t dstSlot, uint8_t srcBag, uint8_t srcSlot);
|
||||
};
|
||||
|
||||
/** CMSG_SPLIT_ITEM packet builder */
|
||||
class SplitItemPacket {
|
||||
public:
|
||||
static network::Packet build(uint8_t srcBag, uint8_t srcSlot,
|
||||
uint8_t dstBag, uint8_t dstSlot, uint8_t count);
|
||||
};
|
||||
|
||||
/** CMSG_SWAP_INV_ITEM packet builder */
|
||||
class SwapInvItemPacket {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -187,6 +187,14 @@ private:
|
|||
uint8_t destroyCount_ = 1;
|
||||
std::string destroyItemName_;
|
||||
|
||||
// Stack split popup state
|
||||
bool splitConfirmOpen_ = false;
|
||||
uint8_t splitBag_ = 0xFF;
|
||||
uint8_t splitSlot_ = 0;
|
||||
int splitMax_ = 1;
|
||||
int splitCount_ = 1;
|
||||
std::string splitItemName_;
|
||||
|
||||
// Pending chat item link from shift-click
|
||||
std::string pendingChatItemLink_;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue