cdmichaelb / Outfitter

Outfitter - Classic
MIT License
10 stars 23 forks source link

Automation Script "Has buff" not working #20

Closed justthompson closed 2 years ago

justthompson commented 4 years ago

I created a Gear set that would swap weapons on my mage when i gain the Evocate buff.

To test on another character, I also created a Gear set on my pally to swap shields when I gain the buff "Holy Shield"

On both characters, when either buff is gained, the automation does not take place.

image

ghost commented 4 years ago

Can confirm. The "dining" automation doesn't work either.

cdmichaelb commented 4 years ago

justthompson, are you attempting to automate these swaps during combat? Because blizzard has completely blocked that functionality from addons.

justthompson commented 4 years ago

Outside of combat for the Evocate buff.

justthompson commented 4 years ago

Also when testing with the Holy Shield buff on my Paladin, I was also out of combat.

xysis00 commented 4 years ago

I had a similar issue and this change appears to have fixed it:

In Outfitter.lua#4114, change

local vName, _, vTexture, _, _, _, _, _, _, _, vSpellID = UnitBuff("player", vBuffIndex)

to

local vName, vTexture, _, _, _, _, _, _, _, vSpellID = UnitBuff("player", vBuffIndex)

which matches the API documentation found here.

That performs the lookups with expected values and enables any corresponding state.

cdmichaelb commented 4 years ago

Thanks, I'll test and implement that in the next update. A lot of my issues have been exactly this, API changes. Sadly I think outfitter was abandoned some time ago, so there were quite a few out of date api usages in it and if they don't throw an error it's hard to pinpoint sometimes.

On Fri, Jul 10, 2020 at 8:08 PM xysis00 notifications@github.com wrote:

I had a similar issue and this change appears to have fixed it:

In Outfitter.lua#4114 https://github.com/cdmichaelb/Outfitter/blob/master/Outfitter.lua#L4114, change

local vName, , vTexture, , , , , , , , vSpellID = UnitBuff("player", vBuffIndex)

to

local vName, vTexture, , , , , , , _, vSpellID = UnitBuff("player", vBuffIndex)

which matches the API documentation found here https://wow.gamepedia.com/API_UnitBuff#Returns.

That performs the lookups with expected values and enables any corresponding state.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cdmichaelb/Outfitter/issues/20#issuecomment-656975918, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALCNPIPLBPLFLSU4RGCXF3R27JUNANCNFSM4N3Z6YWA .

justthompson commented 4 years ago

On a side note, if you can get the addon working, Great. However, i have found out that you cannot swap gear when channeling Evocate. So even if the addon script "Has buff" was working, I cannot do what I was wanting. Which was; to swap to weapons with high amounts of Spirit to get more yield from Evocate. Instead I will have to swap weapons 1st, then cast evocate, and swap back after Evocate finishes.

cdmichaelb commented 4 years ago

Implemented the hasbuff fix.