WoW:API UseEquipmentSet: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Created page with '{{wowapi}} Equips items from a specified equipment set. success = UseEquipmentSet("name"); ==Parameters== ===Arguments=== ;name : String - equipment set name. ===Returns=== ;s...')
 
mNo edit summary
Line 1: Line 1:
{{wowapi}}
{{protectedcombatapi|3.3 (?)}}
{{wowapi|removed=7.2.0|replace=Was renamed to [[API_C_EquipmentSet_UseEquipmentSet|C_EquipmentSet.UseEquipmentSet]]}}
 
Equips items from a specified equipment set.
Equips items from a specified equipment set.
success = UseEquipmentSet("name");


==Arguments==
local setWasEquipped = UseEquipmentSet("name")
;name : String - equipment set name.
 
== Parameters ==
=== Arguments ===
* name (string) - equipment set name, e.g. "Damage", "Tank", "PvP" etc.
 
=== Returns ===
* setWasEquipped (boolean) - true if the set was equipped, nil otherwise. Failure conditions include invalid arguments, and engaging in combat.
 
== Examples ==
UseEquipmentSet("Tank")


==Returns==
Equips the equipment set named "Tank".
;success : Boolean - true if the set was equipped, nil otherwise. Failure conditions include invalid arguments, and engaging in combat.


==Example==
;Example 2
  local name = GetEquipmentSetInfo(1);
  local name = C_EquipmentSet.GetEquipmentSetInfo(1)
  local ok = UseEquipmentSet(name);
  local ok = C_EquipmentSet.UseEquipmentSet(name)
  if ok then
  if ok then
   print("You're now clad in " .. name);
   print("You're now clad in " .. name);
  end
  end


==Notes==
== Details ==
This function does not produce error messages. FrameXML/EquipmentManager.lua provides EquipmentManager_EquipSet("name"), which will provide the player with an error message if the equip action fails (but does not provide you with a return value).
This function does not produce error messages. FrameXML/EquipmentManager.lua provides EquipmentManager_EquipSet("name"), which will provide the player with an error message if the equip action fails (but does not provide you with a return value).


== Notes ==
* Moved in patch 7.2.0 (2017-03-28) to C_EquipmentSet.UseEquipmentSet.
* Added in Patch 3.0.2 (2008-10-14) as [[API UseEquipmentSet|UseEquipmentSet]].


{{API Trail EquipmentManager}}
{{API Trail EquipmentManager}}

Revision as of 07:15, 11 February 2021

WoW API < UseEquipmentSet

Equips items from a specified equipment set.

local setWasEquipped = UseEquipmentSet("name")

Parameters

Arguments

  • name (string) - equipment set name, e.g. "Damage", "Tank", "PvP" etc.

Returns

  • setWasEquipped (boolean) - true if the set was equipped, nil otherwise. Failure conditions include invalid arguments, and engaging in combat.

Examples

UseEquipmentSet("Tank")

Equips the equipment set named "Tank".

Example 2
local name =  C_EquipmentSet.GetEquipmentSetInfo(1)
local ok =  C_EquipmentSet.UseEquipmentSet(name)
if ok then
 print("You're now clad in " .. name);
end

Details

This function does not produce error messages. FrameXML/EquipmentManager.lua provides EquipmentManager_EquipSet("name"), which will provide the player with an error message if the equip action fails (but does not provide you with a return value).

Notes

  • Moved in patch 7.2.0 (2017-03-28) to C_EquipmentSet.UseEquipmentSet.
  • Added in Patch 3.0.2 (2008-10-14) as UseEquipmentSet.