Rottenbeer / ItemRack

ItemRack working for WoW Classic
41 stars 45 forks source link

Fixed item stuck on cursor when unequipping set #259

Closed emrus-main closed 2 months ago

emrus-main commented 7 months ago

Bug: When you have no shirt equipped, and you equip a set with a shirt and unequip the set, the shirt will get stuck on the cursor producing a "Swap stopped. Something is on the cursor" error.

Issue: ItemRackEquip.lua checks the following line to determine if an item should be unequipped or replaced. 283: if swap[k]==0 then -- if intended to be empty However, swap[k] == "0" not 0, due to a change in commit 9c52da4 in function ItemRack.GetID(bag,slot) which appends runeSuffix or "" to all itemlinks.

Solution: ItemRack.GetID only appends runeSuffix if it is not just an empty string. Alternative solution would be to change line 283 to 283: if swap[k]==0 or swap[k]=="0" then -- if intended to be empty

Fixes: #254 Fixes: #249

maximus210793 commented 6 months ago

Thanks a lot mate, do you know when this fix will get released with an updated version ?

emrus-main commented 6 months ago

Thanks a lot mate, do you know when this fix will get released with an updated version ?

I don't, but the bug is only present when a set is unequipping and item and it would result in a blank slot.

So if you simply have a shirt on in your normal set, and the shirt off in your flask set, it will work fine. And change your macro accordingly:

showtooltip Diamond Flask

/run WeakAuras.ScanEvents("HOTSWAP_DIAMOND_FLASK") /cast [noequipped:Shirt] Diamond Flask /equip Diamond Flask

romracer commented 5 months ago

This also fixed #250

Rottenbeer commented 2 months ago

Sorry for the delay. Is this still relevant?

emrus-main commented 2 months ago

Yes

Rottenbeer commented 2 months ago

@emrus-main does this also work outside of SoD?