Equip Recommended Gear

Equip Recommended Gear

3.5k Downloads

Identical Base Item Upgrades will Equip and unequip when using button

Williwams opened this issue ยท 1 comments

commented

When using the button to force upgrades, it will fail if you have are replacing an item with one of a higher ilvl

i.e

equipped:
Suffused Mantle ilvl 460

in bags:
Suffused Mantle ilvl 480

When using the button, it will first equip the correct item and then shortly after will re-equip the original.

At first i thought this was related to C_Item.EquipItemByName(), but after looking around and realizing that the issue only comes up with the button, C_Timer.After() is the main culprit. When setting up the OnClick, you run DoTheThings twice, which makes sense as a safety measure, but you give it the same delay (.5) as when you start equipping upgrades (.5).

Increasing the first delay (to re-run DoTheThing) to 2 seconds fixed any issues that i had, or perhaps as some multiple of the number of iterations needed to perform all upgrades.

commented

I indeed suspected that was what was wrong when this was reported to me last night. Using a static delay has its issues.

I'm now finding running the function twice for safety is no longer necessary at all, so I removed that with 51e9f04. With that the issue should no longer occur!