WoW API: IsTalentTrainer

From AddOn Studio
Revision as of 04:46, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API IsTalentTrainer to API IsTalentTrainer without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < IsTalentTrainer

Indicates whether target can train talents.

exists = IsTalentTrainer()

Parameters[edit]

Arguments[edit]

none

Returns[edit]

exists
Bool - 1 if the target can train talents, or nil otherwise.

Remarks[edit]

Unlike the IsTradeskillTrainer() function, this function appears bugged in that calling this function on any target returns 1 regardless of whether the target can train class talents.

Example[edit]

  if (IsTalentTrainer()) then 
     DEFAULT_CHAT_FRAME:AddMessage("Target is a talent trainer.")
  else 
     DEFAULT_CHAT_FRAME:AddMessage("Target is not a talent trainer.")
  end

Result[edit]

A message indicating that the target is a talent trainer (because the function always returns 1) is displayed in the default chat frame.