WoW:API GetCraftSkillLine: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (Move page script moved page API GetCraftSkillLine to API GetCraftSkillLine without leaving a redirect)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{removedapi|3.0|Crafting API was absorbed into [[World of Warcraft API#TradeSkill Functions|Tradeskill API]].
* Equivalent function: {{api|GetTradeSkillLine}}}}
{{wowapi}}
{{wowapi}}
This command tells the caller which, if any, crafting window is currently open.   
This command tells the caller which, if any, crafting window is currently open.   
Line 4: Line 6:
  currentCraftingWindow = GetCraftSkillLine(n)
  currentCraftingWindow = GetCraftSkillLine(n)


== Parameters ==
== Arguments ==
=== Arguments ===
;n : Numeric - Not sure how this is used, but any number greater than zero seems to behave identically.  Passing zero always results in a <tt>nil</tt> return value.


:;n : Numeric - Not sure how this is used, but any number greater than zero seems to behave identically.  Passing zero always results in a <tt>nil</tt> return value.
== Returns ==
 
;currentCraftingWindow : String - The name of the currently opened crafting window, or <tt>nil</tt> if no crafting window is open.  This will be one of "Enchanting" or "Beast Training".
=== Returns ===
 
:;currentCraftingWindow : String - The name of the currently opened crafting window, or <tt>nil</tt> if no crafting window is open.  This will be one of "Enchanting" or "Beast Training".


== Details ==
== Details ==
This function is not quite the same as [[API_GetCraftDisplaySkillLine|GetCraftDisplaySkillLine()]].  The latter returns <tt>nil</tt> in case the Beast Training window is open, while the current function returns "Beast Training".
This function is not quite the same as [[API_GetCraftDisplaySkillLine|GetCraftDisplaySkillLine()]].  The latter returns <tt>nil</tt> in case the Beast Training window is open, while the current function returns "Beast Training".


Removed in 3.0, use GetTradeSkillLine() instead.
----
__NOTOC__
__NOTOC__

Latest revision as of 04:45, 15 August 2023

WoW API < GetCraftSkillLine

This command tells the caller which, if any, crafting window is currently open.

currentCraftingWindow = GetCraftSkillLine(n)

Arguments[edit]

n
Numeric - Not sure how this is used, but any number greater than zero seems to behave identically. Passing zero always results in a nil return value.

Returns[edit]

currentCraftingWindow
String - The name of the currently opened crafting window, or nil if no crafting window is open. This will be one of "Enchanting" or "Beast Training".

Details[edit]

This function is not quite the same as GetCraftDisplaySkillLine(). The latter returns nil in case the Beast Training window is open, while the current function returns "Beast Training".