WoW API: GetTotemInfo

From AddOn Studio
Revision as of 01:25, 21 May 2008 by WoWWiki>Xkq (New page: {{wowapi}} __NOTOC__ <!-- Describe the purpose of the function, exhausting detail can be saved for a later section --> Returns information about totems <!-- List return values and argum...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < GetTotemInfo


Returns information about totems

arg1, totemName, startTime, duration = GetTotemInfo(1 through 4)


Parameters

Arguments

(integer)
integer
integer - index of the totem (fire=1 earth=2 water=3 air=4)

Returns

arg1
seems to always return true.
totemName
returns the name of the currently active totem.
totemName
returns the GetTime() value of when the totem started.
duration
returns the duraiton (in seconds) of the currently active totem.



Example

Displays the duration of all active totems

for index=1,4 do
  local arg1, totemName, startTime, duration = GetTotemInfo(index)
  local est_dur = round(startTime+duration-GetTime() )
  DEFAULT_CHAT_FRAME:AddMessage(totemName .. "  " .. est_dur)  
end

Details

Yeah, umm this is my first time making a page, so feel free to fix it up. --xkq