Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed item stuck on cursor when unequipping set #259

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

emrus-main
Copy link
Contributor

@emrus-main emrus-main commented Apr 22, 2024

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
Copy link

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

@emrus-main
Copy link
Contributor Author

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
Copy link

romracer commented Jun 5, 2024

This also fixed #250

@Rottenbeer
Copy link
Owner

Sorry for the delay. Is this still relevant?

@emrus-main
Copy link
Contributor Author

Yes

@Rottenbeer
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants