WoW:API GetTrackingInfo: Difference between revisions

m
mNo edit summary
m (→‎Notes: typo)
Line 19: Line 19:
;:''active'' : If the track is active, it will return 1 but otherwise nil.
;:''active'' : If the track is active, it will return 1 but otherwise nil.


;:''category'' : Track category, returns "spell" if the tracking method is a spell in the spellbook or "npc" if it's a static tracking method.
;:''category'' : Track category, returns "spell" if the tracking method is a spell in the spellbook or "other" if it's a static tracking method.


----
----
Line 33: Line 33:
  DEFAULT_CHAT_FRAME:AddMessage(name.." ("..category..")");
  DEFAULT_CHAT_FRAME:AddMessage(name.." ("..category..")");
  end
  end
== Notes ==
* If you have any tracking items in your spellbook (Find Minerals, Find Treasure, etc), [[API GetNumTrackingTypes|GetNumTrackingTypes]] and [[API GetTrackingInfo|GetTrackingInfo]] will be wrong if used too early.
-- in this example, the character has Mining.
local name = GetTrackingInfo(1);
-- at VARIABLES_LOADED
name == "Repair"
-- at PLAYER_ENTERING_WORLD
name == "Find Minerals"
Anonymous user