View Single Post
04/10/14, 12:59 PM   #1
Todo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 5
Get the weapon/armor type of an item

Hello everyone,

(First forgive me for my english ,it's not my native language )
I just have a question about the information we have on an item.

I use this two functions

Code:
GetItemInfo(integer bagId, integer slotIndex)
Returns: textureName icon, integer stack, integer sellPrice, bool meetsUsageRequirement, bool locked, integer equipType, integer itemStyle, integer quality

GetItemType(integer bagId, integer slotIndex)
Returns: ItemType itemType
Neither of boths returns parameters could give me the information about the type the item.
I only have the global type (1 hand weapon, 2 hand weapon, boots, head etc...)
I wanted to know if there is a way to get the precise type of an item. According to the Globals in the API there is such a group :

Code:
http://wiki.esoui.com/Globals#WeaponType
WeaponType
WEAPONTYPE_AXE
WEAPONTYPE_BOW
WEAPONTYPE_DAGGER
WEAPONTYPE_FIRE_STAFF
WEAPONTYPE_FROST_STAFF
WEAPONTYPE_HAMMER
WEAPONTYPE_HEALING_STAFF
WEAPONTYPE_LIGHTNING_STAFF
WEAPONTYPE_NONE
WEAPONTYPE_RUNE
WEAPONTYPE_SHIELD
WEAPONTYPE_SWORD
WEAPONTYPE_TWO_HANDED_AXE
WEAPONTYPE_TWO_HANDED_HAMMER
WEAPONTYPE_TWO_HANDED_SWORD
And there is the same for the Armor to know if the armor is light/medium/heavy.
I wish there is a function that return that type or a way to obtain it.

Thank you in advance guys
  Reply With Quote