GearMenu

GearMenu

221k Downloads

swapping to same items different enchants

httpNick opened this issue ยท 4 comments

commented

Hello,

I have been using GearMenu for months now and one thing that has bugged me has been not being able to choose between items I have in my inventory that are the same item, but with different enchants. The Addon will show the correct count of items, but will only let me swap to the one it chooses. For instance: If I have 4 pairs of Goblin Rocket Boots, but only one has minor speed enchant the addon will sometimes show 4 goblin rocket boots and all choices will have minor speed or it will show 4 goblin rocket boots and all are unenchanted instead of 3 being unenchanted and 1 having minor speed. Another example is if I have 2 weapons of the same name with 2 different enchants (+55 healing on one and +20 spirit on the other) it will show the 2 items when I hover to choose my swap, but both will be the same option (either +20 spirit or +55 healing). Is this a limitation of the blizzard api?

commented

I came to put this same issue in.

I think you should be able to do this as long as each item has different enchants. See below:

From Silent Shadows discord:

If both weapons are enchanted with different enchants, equip the weapons how you want to wear them and then run this macro:

/run local function id(s) return strmatch(GetInventoryItemLink("player",s) or "","(item:%d+:%d+):") end for i=16,17 do if id(i) then ChatFrame1:AddMessage("/equipslot "..i.." "..id(i)) end end

It will print to your screen the macro to equip that combo. ie:
/equipslot 16 item:1951:854
/equipslot 17 item:1951:249

You can use these numbers for conditionals too:
/equip [worn:Shields] item:1951:854; King's Defender
/equipslot [worn:Shields] 17 item:1951:249; 17 Merciless Gladiator's Shield Wall

NOTE: Both weapons must have an enchant and the enchant must be different for the item method to work reliably.

@RagedUnicorn does that help move this issue forward?

Unsure if this helps, but Outfitter-Classic works with items with different enchants.

Thanks for all of your work!

commented

@RagedUnicorn see private messages on curseforge for a quick and dirty fix to this ~3 year old issue

commented

Apologies for the really late response. I saw your messages and checked out the code. Unfortunately while this is a start there is much more work needed to get this working.

The changes you proposed essentially only make sure that tooltips are getting displayed but it won't make sure to actually equip the proper item that you clicked. The reason for that is that gearmenu exclusively works with item ids not considering enchants.

Whenever you click an item it will search for a specific item in your bags from right to left and the first item that matches that clicked item id it will equip that item. Whether that item has a matching enchant id is not considered.

I started reworking gearmenu to include the enchant id everywhere item ids are currently used. This includes the changemenu, trinketmenu and quickchange. Quickchange is still not finished but the rest seems to be working fine.

The changes are available here - https://github.com/RagedUnicorn/wow-classic-gearmenu/tree/feature/add_support_for_enchantid

You can checkout that branch and you might to adapt the values in https://github.com/RagedUnicorn/wow-classic-gearmenu/blob/feature/add_support_for_enchantid/code/GM_Environment.lua to reduce the messages.

I'm still working on the quickchange implementation and don't know how long it will take me.

Cheers,
RagedUnicorn

commented

Hi @httpNick

It is kind of a limitation of the blizzard API because I'm working with the id of the item. This will result in your 4 items showing up. I will check if this can be improved.

Cheers,
RagedUnicorn