WoW:API GetCraftSkillLine: Difference between revisions

GetCraftSkillLine - explained this function and removed the deletion request since it definitely exists and has a (slim) purpose.
mNo edit summary
(GetCraftSkillLine - explained this function and removed the deletion request since it definitely exists and has a (slim) purpose.)
Line 1: Line 1:
{{delete}}
This command tells the caller which, if any, crafting window is currently open.
See history. I think this was meant to be at [[API GetCraftInfo]].


The command still exists though. While I don`t understand exactly what it does, I do know that it can be used to determine whether the enchanting-window is currently opened or not (which is a prequisite for [[API GetCraftInfo]] to work). You can use it like this to achieve that:
currentCraftingWindow = GetCraftSkillLine(n)


temp = GetCraftSkillLine(1);
== Parameters ==
if (temp) then
=== Arguments ===
  -- You can use GetCraftInfo() here
else
  -- If you use GetCraftInfo() here it should produce an error
end


:;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 ===


{{API/Uncategorized}}
:;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 ==
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".
 
 
----
__NOTOC__
{{WoW API}}
Anonymous user