Quantcast
WoWInterface - View Single Post - Totem Tag - help needed
View Single Post
12-13-13, 12:21 PM   #5
Pyrates
A Cliff Giant
 
Pyrates's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 77
Thanks for your suggestions. I tried it, but to no avail I also inserted a print statement, and it seems clear to me the function is never called. I did confirm PLAYER_TOTEM_UPDATE fires when I plant a mushroom... might have something to do with the unitless events, but I have no idea how to check for that.

I did run this script ingame:
Code:
local event = 'PLAYER_TOTEM_UPDATE'
for i = 1, select( "#", GetFramesRegisteredForEvent(event)) do
 local frame = select(i,GetFramesRegisteredForEvent(event))
 print(frame:GetName())
local func1 = frame:GetScript("OnEvent")
print(func1)
end
It printed "TotemFrame" and a function number... seems reasonable enough, but I don't know where to go from here. I tried running "func1("PLAYER_TOTEM_UPDATE",1)", but that didn't do anything...

(e) I just remembered, there's another tag that's not working. I didn't want to ask 2 questions at once, but maybe they're connected? The other tag is

Code:
oUF.Tags.Events['BossBars:health'] = oUF.Tags.Events["curhp"] .. " " .. oUF.Tags.Events["maxhp"]
oUF.Tags.Methods['BossBars:health'] = function(unit)
		local m = UnitHealthMax(unit)
		if(m == 0) then
			return 0
		else
			return math.floor(UnitHealth(unit)/m*100+.5)
		end
end
It's "somewhat" working in that it shows HP percent, but it only updates when I change target. Seems some events don't reach their functions? Strange, the other tags seem to work just fine (and the healthbar of that unit works nicely as well).
__________________
" ... and the Vogon will do things to you that you wish you'd never been born, or, if you're a clearer minded thinker, that the Vogon had never been born."

Last edited by Pyrates : 12-13-13 at 02:28 PM.
  Reply With Quote