mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Fix online equipment slot mapping, auto-equip packet, and backpack slot offsets
Correct PLAYER_FIELD_INV_SLOT_HEAD default from 322 to 324 (UNIT_END+0xB0) which was shifting every equipment slot by one position. Fix auto-detection to validate against known 3.3.5a base. Change CMSG_AUTOEQUIP_ITEM to send uint8 bag+slot instead of uint64 GUID, and add slot offset 23 for backpack items in both auto-equip and use-item packets.
This commit is contained in:
parent
e38c0213e4
commit
40c016ccdb
4 changed files with 58 additions and 20 deletions
|
|
@ -1097,18 +1097,16 @@ void InventoryScreen::renderItemSlot(game::Inventory& inventory, const game::Ite
|
|||
inventoryDirty = true;
|
||||
}
|
||||
} else if (kind == SlotKind::BACKPACK && backpackIndex >= 0) {
|
||||
bool looksEquipable = (item.inventoryType > 0) ||
|
||||
(item.armor > 0) ||
|
||||
(!item.subclassName.empty());
|
||||
if (gameHandler_ && !gameHandler_->isSinglePlayerMode()) {
|
||||
if (looksEquipable) {
|
||||
if (item.inventoryType > 0) {
|
||||
// Auto-equip (online)
|
||||
gameHandler_->autoEquipItemBySlot(backpackIndex);
|
||||
} else {
|
||||
// Use consumable (online)
|
||||
gameHandler_->useItemBySlot(backpackIndex);
|
||||
}
|
||||
} else if (looksEquipable) {
|
||||
} else if (item.inventoryType > 0 || item.armor > 0 ||
|
||||
!item.subclassName.empty()) {
|
||||
// Auto-equip (single-player)
|
||||
uint8_t equippingType = item.inventoryType;
|
||||
game::EquipSlot targetSlot = getEquipSlotForType(equippingType, inventory);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue