Bank functionality broken
fgsfdss opened this issue ยท 10 comments
'Deposit all items', 'deposit unique items' and 'withdraw items' from and to bank are all not working for me. I tried disabling other addons, tried with different sets, tried installing an older version, nothing seems to fix it. My friend reports it working, so I have no idea what to do.
Just went over it and don't know why this inconsistency in code / data structure occurs but on the Line 559 in OutfitterEquipment.lua
it is trying to get the Item to Bank/Withdraw by the SlotID which isn't always in the table of the item.
Changing
Line 559: Outfitter:UnequipSlotID(equipmentChange.SlotID, emptyBagSlots, expectedInventoryCache)
TO
Line 559: Outfitter:UnequipSlotID(equipmentChange.FromLocation, emptyBagSlots, expectedInventoryCache)
seems to have fixed the issue for me. Now the banking functionality works but I haven't been able to test further wheter it might break something else.
@darkware thanks Ill check this out in the morning. I wracked my brain like crazy trying to figure out why it wouldn't work.
@darkware can you provide some context to line 559 (before and after), your line doesn't seem to be matching up with mine.
It's at the end of the Outfitter._EquipmentChanges:execute(emptyBagSlots, expectedInventoryCache)
function.
The last else part. I have noticed an issue with the head item slot the way I've had it solved. Updated version (with more context):
if swapItems then
if emptyThenEquip then
Outfitter:UnequipSlotID(equipmentChange.SlotID, emptyBagSlots, expectedInventoryCache)
end
-- Make sure nothing is already being held
ClearCursor()
-- Pick up the item and equip it
Outfitter:PickupItemLocation(equipmentChange.ItemLocation)
EquipCursorItem(equipmentChange.SlotID)
-- Update the expected cache
if expectedInventoryCache then
expectedInventoryCache:SwapLocationWithInventorySlot(equipmentChange.ItemLocation, equipmentChange.SlotName)
end
-- Remove the item
else
if equipmentChange.SlotID ~= nil then
Outfitter:UnequipSlotID(equipmentChange.SlotID, emptyBagSlots, expectedInventoryCache)
else
Outfitter:UnequipSlotID(equipmentChange.FromLocation, emptyBagSlots, expectedInventoryCache)
end
end
Thanks for the fix @darkware - I made that change locally here too and it is working well.
Thanks @darkware I implemented it and tried to break it, seems to be working well. Pushing the update shortly. @Decaphaze
@darkware Is there any way you can upload the file, or we can pass an update for this? I tried replacing the line of text with a copy/paste and I'm getting error's and it seems to have completely broken outfitter.
It's really a nuisance not being able to bank gear sets quickly that I don't need while not raiding :(