#Augmentation Evoker - Blistering Scales current Tank (TargetTarget)

68 messages · Page 1 of 1 (latest)

upbeat shoal
#

Hey,
im trying to build a WA that shows me the current remaining Time and Stacks of Blistering Scales of the current tank, which in 99% of all cases will probably be the targettarget of whatever im targetting (i.e. boss), but apperantly targettarget is not something that can specified as specific unit when setting the triggertype to Aura:

https://puu.sh/JLeds/6cf8c0862a.png

So I was wondering what the correct way to do this would be^^

woven finch
#

Unit smart group
Role tank
Match count > 0

#

@upbeat shoal

upbeat shoal
#

ty will test whenever im allowed to actually play it :D, used ur devoker template and just changed stuff around 😛

upbeat shoal
#

@woven finch sorry to bother you again. So this would "only" show that one tank has the buff, but not if its the current "active" tank or?

Is there maybe another way to exactly track the "active" tank?

e.g. lets go with an Icon for now as i think its a bit simpler to describe

The Icon should show if the current active tank (in most cases targettarget) currently has the buff on him and how many stacks he has left
If the buff is missing from the active tank the Icon should e.g. be set to red

woven finch
#

it shows when anyone with the role tank in a group has the buff

#

so unless your tanks are marked as healers, yeah it wont show then

upbeat shoal
#

but there is no way to track for the active tank in the sense of targettarget?

woven finch
#

no

upbeat shoal
#

😦

woven finch
#

targettarget focustarget pettarget and all those xxxtarget units won't work as the game doesn't give events for xxxtarget units

upbeat shoal
#

cuz e.g. lets say 1 tank that currently is the offtank still has stacks left and the spell is off cd and a tankswap occurs then based on the WA i couldnt tell that there is no real need to recast as he is still fine on the buff unless i manually track the player name for example?

woven finch
#

but does the offtank have the tank role in game?

upbeat shoal
#

yeah obv, its more about that the buff acts like thorns so you want the active tank to have it^^, thats why i thought it might be nice to be able to track targettarget which should be the tank that gets smacked atm

#

and you can only have it on one tank at a time during raid, so you either need intricate knowledge of when tankswaps occur as to "not waste" a cast or would need some way of tracking 😛

woven finch
#

You need to go custom

upbeat shoal
#

yeah kinda feared that... there exists one weakaura on wago, but it didnt work yesterday thats why i came to ask 😄

#

Any idea how the custom code might look like? Assuming even with custom code you cannot track if targettarget has a specific aura buff?

woven finch
#

I'm at work so I can't look into it.
I'd first try something with watched triggers and just check if the unit from your smart group trigger is the same unit as targettarget

upbeat shoal
#

Alright, then i wont disturb you any further, ill keep this thread updated tho^^

upbeat shoal
#

Alright im stuck now. This is what i have done so far https://wago.io/_Lztu6JqQ I tried to follow asakawas and another ones example from wago regarding watched triggers and aura filtering but i cant seem to get it work. For now I removed the tank role filtering so I am able to simply get smacked myself, but I cant get it to work, I probably made a dumb mistake somewhere...

Maybe you or some1 else who is way smarter than me regarding WAs can take a look later, I would be super grateful

Wago.io is a database of sharable World of Warcraft addon elements

rapid thistle
#

You need to use event = "TRIGGER" the capitalization matters.

Using FRAME_UPDATE here isn't necessary. You can watch the events for player target changed instead of checking the current target every frame.

upbeat shoal
#

Alright, will test this later. What exact event would you say to watch? As player (me) wont be target switching alot, and from what boneshock said there is no event for targettarget changed?

rapid thistle
#

oh right you care about targettarget changed

#

UNIT_TARGET should be the event you watch then

#

you'll need to filter out unwanted target changes as that event fires for any unit changing targets

#

For example: Boss changes target to new tank UNIT_TARGET:boss1 fires. You need to check if boss1 is your current target and if it is then check if the target they switched to has the aura.

upbeat shoal
#

alright but the check for the aura using the value key pairing looks correct? checking for every unit if the unit is the same was targettarget?

#

so it would be

  1. Fix capitalization
  2. swap event from frame update to UNIT_TARGET:boss1
  3. remove the stuff used for throtteling
rapid thistle
#

idk if you want to specify boss1 for UNIT_TARGET. You might target boss2 or something friendly

#

I'm not 100% sure what key is used in the triggerStates tables that is passed for a watched trigger. I recommend getting ViragDevTool so you can inspect the tables to make sure you have it right

#

!vdt

lilac oceanBOT
upbeat shoal
#

hmm ok so use UNIT_TARGET in general and then filter in the custom code

rapid thistle
#

that depends on exactly how you want to implement it

#

if you only care about boss1's target then you can do that, but won't work on fights with 2+ bosses

#

or fights with adds that are tanked

upbeat shoal
#

True. Well in most cases you only have one active boss and if you have more it doenst matter cuz in most encoutners with more than 1 boss i would say all bosses are attacking, outside some very rare cases where boss 1 might go into some form of stasis while boss 2 is active

#

but yeah i would probably focus on boss1 only, if some adds are up etc. the spell will be depleted instantly anyways and then a trackign is not rly needed anymore. For me its more about seeing a yes the active tank has 10 stacks left so i dont need to reapply and instead can keep it to potentially save a dps/heal with it due to the shielding effect

upbeat shoal
#

@rapid thistle I am a bit lost with filtering the event. I got it to somewhat work using the FRAME_UPDATE but it wouldnt let me display the stacks or remaining time even after i added them to the "Display" part

upbeat shoal
#

so ive looked at the aura filtering example again and made some changes accordingly https://wago.io/N9z-gt8GI this seems to work for now, showing me the stacks as long as targettarget has the buff, but FRAME_UPDATE might not be the best way to go forward,

So if some1 has some time later to maybe guide me a bit through the UNIT_TARGET Stuff for when the boss1 swaps target that would be great^^

Wago.io is a database of sharable World of Warcraft addon elements

rapid thistle
#

if you want to use stacks and remaining time then you need to get that dynamic info from the 2nd trigger. use %2.stacks and %2.p

#
function(allstates, event, triggerNum, triggerStates)
    if event == "TRIGGER" and triggerNum then
        for key, state in pairs (allstates) do
            if not triggerStates[key] then
                state.show = false
                state.change = true
            end
        end
        for k, v in pairs(triggerStates) do
            if v.unit and UnitIsUnit(v.unit,"targettarget") then
                allstates[k] = allstates[k] or {}
                local state = allstates[k]
                for key, data in pairs(v) do
                    if state[key] ~= data then
                        state[key] = data
                        state.changed = true
                    end
                end
            elseif allstates[k] then
                allstates[k].show = false
                allstates[k].changed = true
            end
        end
        return true
        
    elseif event = "UNIT_TARGET" then
        local unitTarget = triggerNum --1st variable in payload when event is UNIT_TARGET is different just doiong this to change the name of the variable
        if UnitIsUnit(unitTarget, "playertarget") then --check if the unit that changed targets is your current target
            --Adjust the state to hold the new targettarget and determine if that target has the aura
        end
        return true
    else
        return false
    end
end
upbeat shoal
#

i tried using %2.s and %2.p but it wasnt working and yeah i went ahead and used the same upper part you just posted based on an example from Buds on Wago

rapid thistle
#

if you tried %2.s and %2.p then that means that the 2nd trigger doesn't have that info for some reason

#

the trigger isn't active most likely

upbeat shoal
#

maybe yeah, but once i used the code from Buds example that goes over all the states it worked fine

#

or rather that sets all states key value to the correct data

rapid thistle
#

oh, you may have been overwriting the state in your TSU

upbeat shoal
#

maybe yeah

#

im not rly good when it comes to WAs and LUA in general

#

😛

rapid thistle
#

if you reference triggerStates directly it does a save by reference

#

ie

local myNewStates = triggerStates
myNewStates = {
 changed = true,
 show = true,
}

That will write over the triggerStates tables

upbeat shoal
#

Then i might have overriden something that caused the problem.

Will try the code from above later, not sure about the "--Adjust the state..." part exactly

rapid thistle
#

you have to do a CopyTable

#

you need to update allstates

#

unit, show, changed etc whatever is important when the boss changes target

upbeat shoal
#

alright so after
UnitIsUnit(unitTarget, "playertarget") then

i would just iterate over all states again with the k,v pairs just as I do the if event== "TRIGGER" section?

rapid thistle
#

yes and change them if necessary

upbeat shoal
#

change them in what way exactly^^, still abit confused sorry 😦

rapid thistle
#

change the unit that is in the state because it's a new target or disable it if there is no target or whatever else you might need to do

upbeat shoal
#

Im still not 100% sure I understand what you mean exactly.

If i iterate over allstates again for ever k,v pair and check
if v.unit and UnitIsUnit(v.unit,"targettarget") again
then i should again land on either:
a. the current targettarget doesnt have the buff (the most likely case after the boss swaps targets)
b. the current targettarget does already have the buff and it will simply show
?

#

since from what i understood is that trigger 2 is basicly the filter for if any tank has the aura and the custom code "simply" checks if that player with the buff is also the current targettarget

rapid thistle
#

Seems like you do get it

upbeat shoal
# rapid thistle Seems like you do get it

elseif event == "UNIT_TARGET" then local unitTarget = triggerNum --1st variable in payload when event is UNIT_TARGET is different just doiong this to change the name of the variable if UnitIsUnit(unitTarget, "playertarget") then --check if the unit that changed targets is your current target --Adjust the state to hold the new targettarget and determine if that target has the aura for k, v in pairs(triggerStates) do if v.unit and UnitIsUnit(v.unit, "targettarget") then allstates[k] = allstates[k] or {} local state = allstates[k] for key, data in pairs(v) do if state[key] ~= data then state[key] = data state.changed = true end end elseif alsltates[k] then allstates[k].show = false allstates[k].changed = true end end end return true else return false end end

throws a lua error since triggerstates is nil :/

rapid thistle
#

yeah, triggerstates doesn't exists in the context of UNIT_TARGET event

upbeat shoal
#

ok so we would leave that for loop out and directly go into all states and instead of checking vor pairs in v we would check for unitTarget only?