Venaitre wrote:The thought was to have a macro that switches between 1h + shield with Flametongue, as it gives a better constant damage (PvE leveling) to a 2h with Windfury for PvP encounters.
yeah but the only solution I can think of at the moment would be specific to the weapon you're switching to
eg, if you switch to the 2handed "The Stoppable Force" the macro should look like
/yourweaponswapaddonmacro
/run if string.find(GetInventoryItemLink(16), "The Stoppable Force") then CastSpellByName("Windfury") end
so you'd probably want a similar extra macro to switch back to 1h and shield + buff the 1h.
But this way you would need to adjust the macro every time you're getting a new 2h or 1h weapon. (replace the name of the weapon "The Stoppable Force" to the name of your new 2h and so on)
to clarify the macro
GetInventoryItemLink(16) - this returns the itemLink which would look something like
|cff9d9d9d|Hitem:7073:0:0:0:0:0:0:0:80:0:0:0:0|h[Broken Fang]|h|r
the (16) means it scans the mainhand slot of your equipped items, which is in both cases (1h and 2h weapon) the slot in which your weapon is. - if you make a 2nd macro to switch to 1h+shield you don't have to check the shieldslot.
so it gets the string as seen in the example and string.find is comparing if it can find "The Stoppable Force" in the string, if it's true then the weaponswitch was already completed when the code fires.
meaning you would have to use this macro at least twice to get it buffing the weapon,
the first press will force your weaponswitch addon to do the switch
the second press would start buffing it