mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Fix shutdown hangs, bank bag icons/drag-drop, loading screen progress, and login spawn
- Fix shutdown hang: skip vmaDestroyAllocator (walked thousands of allocations), replace unsafe pthread_timedjoin_np with plain join + early-exit checks in workers - Bank window: full icon rendering, click-and-hold pickup (0.10s), drag-drop for all bank slots including bank bag equip slots, same-slot drop detection - Loading screen: process one tile per frame for live progress updates - Camera reset: trust server position in online mode to avoid spawning under WMOs - Fix PLAYER_BYTES/PLAYER_BYTES_2 field indices, preserve purchasedBankBagSlots across inventory rebuilds, fix bank slot purchase result codes
This commit is contained in:
parent
804b947203
commit
a559d5944b
14 changed files with 489 additions and 146 deletions
|
|
@ -105,6 +105,13 @@ bool Inventory::setBankBagSlot(int bagIndex, int slotIndex, const ItemDef& item)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Inventory::clearBankBagSlot(int bagIndex, int slotIndex) {
|
||||
if (bagIndex < 0 || bagIndex >= BANK_BAG_SLOTS) return false;
|
||||
if (slotIndex < 0 || slotIndex >= bankBags_[bagIndex].size) return false;
|
||||
bankBags_[bagIndex].slots[slotIndex].item = ItemDef{};
|
||||
return true;
|
||||
}
|
||||
|
||||
int Inventory::getBankBagSize(int bagIndex) const {
|
||||
if (bagIndex < 0 || bagIndex >= BANK_BAG_SLOTS) return 0;
|
||||
return bankBags_[bagIndex].size;
|
||||
|
|
@ -115,6 +122,17 @@ void Inventory::setBankBagSize(int bagIndex, int size) {
|
|||
bankBags_[bagIndex].size = std::min(size, MAX_BAG_SIZE);
|
||||
}
|
||||
|
||||
const ItemSlot& Inventory::getBankBagItem(int bagIndex) const {
|
||||
static const ItemSlot EMPTY_SLOT;
|
||||
if (bagIndex < 0 || bagIndex >= BANK_BAG_SLOTS) return EMPTY_SLOT;
|
||||
return bankBags_[bagIndex].bagItem;
|
||||
}
|
||||
|
||||
void Inventory::setBankBagItem(int bagIndex, const ItemDef& item) {
|
||||
if (bagIndex < 0 || bagIndex >= BANK_BAG_SLOTS) return;
|
||||
bankBags_[bagIndex].bagItem.item = item;
|
||||
}
|
||||
|
||||
void Inventory::swapBagContents(int bagA, int bagB) {
|
||||
if (bagA < 0 || bagA >= NUM_BAG_SLOTS || bagB < 0 || bagB >= NUM_BAG_SLOTS) return;
|
||||
if (bagA == bagB) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue