TargetFrameAura manipulation
Hi,
I have this piece of code... it works in 99.99% of the cases... Can anyone tell me why it wouldn't be doing in 100% of them? :) Ignore the double for loops... I tried different stuff and this was the last iteration... I know it should be only one :) Code:
local function SkinTarget() |
The function is called only when the frames .threatNumericIndicator shows/hides. Try running the function after hooking it to set an initial state.
Slight change to SkinTarget: Code:
local function SkinTarget(init) Code:
hooksecurefunc("TargetFrame_UpdateAuras", SkinTarget) |
Thank you...
|
The issue I'm having is that when I try to /run print(UnitBuff("target",1)) on target that is mob or enemy I get nil. On friendly players, it works as it should.
https://freeimage.host/i/dICNOG i guess my problem then is in comparing frame with ~=nil instead of just saying if(frame).... if only indicator that there is a frame is when i get nil instead of "". |
Do you need to check for a buff? It seems you could alter the frames regardless of buff so long as you only do it once for each (assuming frame:CreateBeautyBorder creates a new frame each time)
Something more like: Lua Code:
|
CreateBeautyBorder api has check and returns if alreadz created.
what puzzles me is /run print(UnitBuff("target",1)) on enemy returns nil for existing frame. |
Does the target have a buff or is it a debuff (something bad you applied)?
Code:
/run print("UnitBuff", UnitBuff("target",1), "UnitDebuff", UnitDebuff("target",1)) |
https://ibb.co/nsT6sB3
https://ibb.co/0yZ7QHp And i get im noob... wow lua is not my area... still this eludes me: Code:
local function test(init) -- init no init its the same update: i found something called TargetFrame_CheckClassification... now it works... |
Code:
TargetFrame:SetScript("OnLoad", test) Code:
TargetFrame:SetScript("WHATEVER", test) Using a SetScript on someone else's frame is not a good idea as it overrides the original. Code:
TargetFrame:HookScript("OnShow", function(self) "do whatever" end) |
All times are GMT -6. The time now is 06:03 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI