WoW:API GetWeaponEnchantInfo: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (Move page script moved page API GetWeaponEnchantInfo to API GetWeaponEnchantInfo without leaving a redirect)
 
(6 intermediate revisions by 6 users not shown)
Line 1: Line 1:
GetWeaponEnchantInfo();
{{wowapi}}
This appears to be used for handling TEMPORARY enchants to weapons - like POISONS. Also appears to be self-only.


This appears to be used for handling TEMPORARY enchants to weapons - like POISONS. Also appears to be self-only.
== Returns ==
;hasMainHandEnchant
: Boolean - 1 if has an enchant on the main-hand weapon, nil if no enchant
;mainHandExpiration
: Number - Duration of enchant on the main-hand weapon in MILLISECONDS, nil if no enchant
;mainHandCharges
: Number - Amount of charges on the main-hand weapon, 0 if no charges, nil if no enchant
;mainHandEnchantID (as of 6.0)
;hasOffHandEnchant
: Boolean - 1 if has an enchant on the off-hand weapon or nil
;offHandExpiration
: Number - Duration of enchant on the off-hand weapon in MILLISECONDS, nil if no enchant
;offHandCharges
: Number - Amount of charges on the off-hand weapon, 0 if no charges, nil if no enchant
;offHandEnchantID (as of 6.0)


;Returns
== Example ==
hasMainHandEnchant, mainHandExpiration, mainHandCharges, hasOffHandEnchant, offHandExpiration, offHandCharges
  hasMainHandEnchant = 1 (true) or nil
 
  mainHandExpiration = time remaining as thousandths of seconds
  hasMainHandEnchant = 1(true) or nil
  mainHandExpiration = time remaining as thousands of seconds
  mainHandCharges = charges remaining
  mainHandCharges = charges remaining
  hasOffHandEnchant = 1(true) or nil
mainHandEnchantID = the spell ID of the main hand enchantment (new in 6.0)
  offHandExpiration = time remaining as thousands of seconds
  hasOffHandEnchant = 1 (true) or nil
  offHandExpiration = time remaining as thousandths of seconds
  offHandCharges = charges remaining
  offHandCharges = charges remaining
offHandEnchantID = the spell ID of the off hand enchantment (new in 6.0)
 
Reference the default interface BuffFrame.Lua for its usage.


 
== History ==
Reference the default interface BuffFrame.Lua for its usage.
* Patch 6.0 added mainHandEnchantID and offHandEnchantID.
 
[[Category:API Functions|GetWeaponEnchantInfo]]
[[Category:API Inventory Functions|GetWeaponEnchantInfo]]
[[Category:API Buff Functions|GetWeaponEnchantInfo]]

Latest revision as of 04:46, 15 August 2023

WoW API < GetWeaponEnchantInfo

This appears to be used for handling TEMPORARY enchants to weapons - like POISONS. Also appears to be self-only.

Returns[edit]

hasMainHandEnchant
Boolean - 1 if has an enchant on the main-hand weapon, nil if no enchant
mainHandExpiration
Number - Duration of enchant on the main-hand weapon in MILLISECONDS, nil if no enchant
mainHandCharges
Number - Amount of charges on the main-hand weapon, 0 if no charges, nil if no enchant
mainHandEnchantID (as of 6.0)
hasOffHandEnchant
Boolean - 1 if has an enchant on the off-hand weapon or nil
offHandExpiration
Number - Duration of enchant on the off-hand weapon in MILLISECONDS, nil if no enchant
offHandCharges
Number - Amount of charges on the off-hand weapon, 0 if no charges, nil if no enchant
offHandEnchantID (as of 6.0)

Example[edit]

hasMainHandEnchant = 1 (true) or nil
mainHandExpiration = time remaining as thousandths of seconds
mainHandCharges = charges remaining
mainHandEnchantID = the spell ID of the main hand enchantment (new in 6.0)
hasOffHandEnchant = 1 (true) or nil
offHandExpiration = time remaining as thousandths of seconds
offHandCharges = charges remaining
offHandEnchantID = the spell ID of the off hand enchantment (new in 6.0)

 
Reference the default interface BuffFrame.Lua for its usage.

History[edit]

  • Patch 6.0 added mainHandEnchantID and offHandEnchantID.