WoW API: IsEquippedItemType

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

WoW API < IsEquippedItemType


Determines if an item of a given type is equipped.

isEquipped = IsEquippedItemType("type")


Arguments[edit]

("type")
type
String (ItemType) - any valid inventory type, item class, or item subclass


Returns[edit]

isEqupped
Boolean - is an item of the given type equipped


Example[edit]

if IsEquippedItemType("Shields") then
  DEFAULT_CHAT_FRAME:AddMessage("I have a shield")
end

Result

Outputs "I have a shield" to the default chat window if the player has a shield equipped.