Originally Posted by Havin
First, thank you, for the quick answer
So, im gonna "sniff" it then. Thats not a perfect solution, but it may do the job also.
Besides that, does a value exist to find out which of the bars is currently active? That would help to save the Ultimate Costs and to position that information in the screen.
|
You can use the event if a weapon pair changes:
Lua Code:
--Register callback function if the weapon bars change
EVENT_MANAGER:RegisterForEvent(myAddon.Name .. "_WeaponPairChanged", EVENT_ACTIVE_WEAPON_PAIR_CHANGED, ActiveWeaponPairChanged)
In the callback function "ActiveWeaponPairChanged" you can save the active weapon pair to a variable in your addon:
Lua Code:
--Fires each time you change your weapon bars
local function ActiveWeaponPairChanged(eventCode, activeWeaponPair, locked)
myAddon.activeWeaponBar = activeWeaponPair
end
This event will trigger multiple times if the weapon pair changes!
If I remember right it was something like
-One time for the "form-bar" with locked = true
-One time for the "to-bar" with locked = false
-One time for the "form-bar" with locked = false
Locked is the state as the abilities on the bar get locked. They get grayed out and you're not able to use them during the switch happens.