Skillet-Classic

Skillet-Classic

445k Downloads

Shift key to show blizzard frame interferes with modifier based macros

zackeryps opened this issue ยท 10 comments

commented

Hello,

I have a macro to have all of my skills in one actionbar slot so that I have quick access.
e.g. /cast [mod:shift] Tailoring; Enchanting;
However, Tailoring in this example will always show the blizzard UI because shift is held when the tradeskill spell is 'cast' (by necessity).

Is it possible to have an option to toggle this behavior from Skillet?

commented

It is possible to create an option but I'm not sure if anyone else would use it.

Is there a reason why you don't change the modifier to something else (like alt)? Skillet-Classic uses shift to open the Blizzard UI and ctrl will clear the player's skillDB (I don't remember why this is done, ATM).

Both of those modifiers can be changed (or removed) in Skillet.lua and/or SkilletData.lua. Search for IsShiftKeyDown() and/or IsControlKeyDown().

Have you looked at the addon Select? I personally use AutoBarClassic (or AutoBar on retail).

commented

The full macro that I use is:
/cast [mod:alt] First Aid; [mod:ctrl] Cooking; [mod:shift] Tailoring; Enchanting;

So I'm using every modifier key in one button.

Before opening this I tried to edit Skillet.lua line 977 from:
elseif not IsShiftKeyDown() and not UnitAffectingCombat("player") then
to:
elseif not UnitAffectingCombat("player") then
but I was still getting the same behavior.
I didn't think to look in SkilletData.lua however.

commented

Thank you. With your help I managed to get the behavior I was looking for.

For anyone who happens to come across this later (aka me when I forget what I changes I made), here is what i did:

Skillet.lua line 977: -elseif not IsShiftKeyDown() and not UnitAffectingCombat("player") then
Skillet.lua line 977: +elseif not UnitAffectingCombat("player") then --not IsShiftKeyDown() and

SkilletData.lua line 95: -if IsShiftKeyDown() or UnitAffectingCombat("player") or not tradeID or tradeID == 5419 or tradeID == 53428 then
SkilletData.lua line 95: +if UnitAffectingCombat("player") or not tradeID or tradeID == 5419 or tradeID == 53428 then --IsShiftKeyDown() or

Skillet.lua lines 996 to 998: commented out
Skillet.lua lines 1444 to 1446: commented out

commented

FYI, the next release will have a chat command, "/skillet nomodkeys", that will toggle the use of Shift and Control during the frame initialization phase (i.e. the part of the process your changes addressed). This is per character setting and will be preserved across logins.

Shift, Control, and Alt are still used within the Skillet-Classic frame to modify tooltip data and other features.

I also shuffled some code around so that the code you modified is now all in Skillet.lua.

commented

Thanks for the update.
I noticed that IsSupportedTradeskill(tradeID) in SkilletData.lua is not using the new function that you made.
It still calls IsShiftKeyDown() on line 95 and prevents the skillet window from opening in place of the blizzard window.
Changing this to use your new function self:IsModKey1Down() produces the expected behavior.

e.g.
Line 95:
-- if IsShiftKeyDown() or UnitAffectingCombat("player") or not tradeID or tradeID == 5419 or tradeID == 53428 then
++ if self:IsModKey1Down() or UnitAffectingCombat("player") or not tradeID or tradeID == 5419 or tradeID == 53428 then

commented

Actually, that's not quite the correct fix. I moved IsSupportedTradeskill to Skillet.lua so the correct fix is to delete the function in SkilletData.lua. Having to test Skillet-Classic on two builds probably contributed to my moving the wrong SkilletData.lua to the repository.

commented

In Skillet-Classic-1.26 there are two definitions for the function IsSupportedTradeskill, one in Skillet.lua at line 953 and one in SkilletData.lua at line 94. The second definition in SkilletData.lua will be removed in the next build.

You can leave it like you have it, update to 1.26 and delete the second definition, or wait for the next build.

image

Sorry for the confusion as I'm not juggling 2 builds for 3 flavors of WoW very well!

commented

I initially thought that the IsSupportedTradeskill function was getting redefined so I tried commenting it out in SkilletData before changing it. I got a lua error when I would try to open the skillet frame. The error said there was an attempt to call global IsSupportedTradeskill which was a nil value. That made me think something was still using the version of the function in SkilletData.

commented

Skillet-Classic-1.27-alpha1 (or newer) should be working as expected.

commented

Thanks for the update.
Love the addon.