Outfitter (Abandoned)

Outfitter (Abandoned)

563k Downloads

Bank functionality broken

fgsfdss opened this issue ยท 10 comments

commented

'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.

commented

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.

commented

@darkware thanks Ill check this out in the morning. I wracked my brain like crazy trying to figure out why it wouldn't work.

commented

@darkware can you provide some context to line 559 (before and after), your line doesn't seem to be matching up with mine.

commented

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
commented

Okay dunno what happened. It actually shows Line 528 now ๐Ÿ˜…

commented

Thanks for the fix @darkware - I made that change locally here too and it is working well.

commented

Thanks @darkware I implemented it and tried to break it, seems to be working well. Pushing the update shortly. @Decaphaze

commented

@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 :(

commented

I also have those features of the bank functionality broken

commented

I have no ETA on bank issue, it's a big one. I could actually use some help if anyone reading this has lua skills.