PDA

View Full Version : Detecting Totems


kevinst
02-07-2007, 08:18 AM
Is there any function to detect if a totem is active?

Specifically, Searing Totem. I can check to see if buff type totems are active by using the GetPlayerBuff(i, "HELPFUL|HARMFUL|PASSIVE"). This works fine for totems which give you a buff, such as Lightning Sheild, but I'm after the others.

I also know that you can hook the function to see when a totem is cast, but that will not work for what I am trying to do.

What I have done so far is tried to detect is using the various Unit functions, e.g. trying to get it's level with UnitLevel("Searing Totem"). But I haven't had any luck with those.

Thanks in advance.

Tunga
02-07-2007, 11:06 AM
Only thing I can think of is trying to target it, which won't work in combat so probably isn't helpful.

Flomo
02-07-2007, 11:39 AM
How does totem timers do the job?
Maybe you can get an idea by looking at its code.

Tunga
02-07-2007, 01:25 PM
You could detect the spell cast event and see when the totem is cast and then parse the combat log to see if it gets killed. It wouldn't be perfect but would work most of the time.

kevinst
02-07-2007, 10:19 PM
Thank you for the ideas. I'm looking at Totem Timers right now. There appears to be a common problem in detecting ownership of the Totem.

Jumpy
02-07-2007, 11:07 PM
There appears to be a common problem in detecting ownership of the Totem.

Indeed there is.