Sea.wow.item
Talk0
98,452pages on
this wiki
this wiki
Contents |
This article is a part of the documentation of the Sea function library
A child of Sea.wow, which is a library of Sea, Sea.wow.item contains item classification and modification functions.
getInventoryItemName
Gets an inventory item name.
-- getInventoryItemName( bag, slot ) -- -- Gets the name of the item in the specified bag/slot -- -- Args: -- (int bag, int slot) -- bag - 0 through 8, the bag number -- slot - index within the bag -- -- Returns: -- (string name) -- name - the item's name
classifyInventoryItem
Returns structure data about an item.
-- classifyInventoryItem(bag, slot, tooltipBase) -- -- Returns a great deal of useful information about an item. -- -- Return: -- Table[ -- .classification -- .name -- .quality -- .count -- .minLevel -- .unique -- .soulbound -- .bindOnPickup -- .bindOnEquip -- .quest -- ] itemInfo;
getInventoryItemInfoStrings
Returns the strings associated with an item.
-- getInventoryItemInfoStrings ( bag, slot [, tooltip] ) -- -- Obtains all information about a bag/slot and returns it as an array -- -- Args: -- (int bag, int slot, string tooltipbase ) -- -- Returns: -- (table[row][.left .right] strings) -- string - the string data of the tooltip
classifyItemStrings
Converts strings into item information.
-- classifyItemStrings(strings, itemCount, quality) -- -- Args: -- -- strings - array of strings that mimic the tooltip of the item to classify -- itemCount - optional number that indicates the number of items -- quality - optional number that indicates the quality of the item -- -- Returns a great deal of useful information about an item. -- The tooltip strings must be gathered from the item, using the -- getInventoryItemInfoStrings syntax. -- -- -- Return: -- Table[ -- .classification -- .name -- .quality -- .count -- .minLevel -- .unique -- .soulbound -- .bindOnPickup -- .bindOnEquip -- .quest -- ] itemInfo;
getItemInfo
getItemInfo(itemlink [, tooltipName])
Returns a table describing the item specified by itemlink. itemlink should be a string of the form "11:0:33:44", i.e. the normal form for creating an item tooltip, with or without the "item: prefix".
Args:
* itemlink - string containing a link to the item * tooltipName - name of tooltip to use; default to GameTooltip
Returns:
A table describing the item. Not all of these fields will be present; they will vary depending on the type of item:
-- item = {
-- name = "item name",
--
-- bind = "equip" | "pickup" | "use",
--
-- -- type
-- type = "armor" | "weapon" | "jewelry" | "shield" | "tabard" | "offhand" | "bag",
-- slot = "shirt" | "chest" | "back" | "feet" | "hands" | "legs" | "shoulder" | "waist" | "wrist" |
-- "1h" | "2h" | "main" | "off" | "ranged" |
-- "ring" | "necklace" | "trinket",
--
-- -- item quality, 0 being poor, 1 = white, 2 = green, 3 = blue, 4 = purple, 5/6 = undiscovered
-- quality = 0 .. 6,
--
-- -- item level, if known (not the required level!)
-- itemlevel = 30,
--
-- -- required level and class(es), if any
-- reqlevel = 30,
-- reqclass = { "Warrior", "Hunter", ... },
-- reqrace = { "Orc", "Troll", ... },
--
-- -- required skill and level, if any
-- reqskill = "skill name",
-- reqskilllevel = 123,
--
-- -- durability
-- cur_durability = 15,
-- max_durability = 120,
--
-- -- weapon speed and dps
-- speed = 0.0000,
-- dps = 0.0000,
-- damage_min = 123,
-- damage_max = 234,
--
-- -- stat bonus data
-- stat = {
-- armor = 1234,
-- hp = 100,
-- mana = 100,
-- sta = 10,
-- int = 10,
-- agi = 10,
-- spi = 10,
-- str = 10,
-- block = 35,
-- },
--
-- -- resist data
-- resist = {
-- all = 123,
-- Fire = 15,
-- Frost = 17,
-- ...
-- },
--
-- -- additional effects on an item
-- effect = {
-- on_equip = { "Something", "Another something" },
-- on_hit = { "Somethin", "Another something" },
-- on_use = { "Something", "Another something" },
-- cast = { "item casts a spell" },
-- },
--
-- -- if items are part of a set
-- setname = "Some set name",
-- setitems = N, -- total number of items in set
--
-- -- enchant data
-- enchant = {
-- temp_name = "temporary enchantment name",
-- temp_timeleft = 12345, -- temp enchantment time left
--
-- type = "ac" | "buff" | "resist" | "damage" | "proc";
-- armor_value = N,
--
-- damage_kind = "type of damage",
-- damage_value = "amount of damage",
--
-- resist_kind = "type of resist, or 'all'",
-- resist_value = "amount of resist",
--
-- proc = "proc name",
-- buff = "buff name"
-- },
--
-- -- cooldown remaining in seconds
-- cooldown = 12345,
--
-- -- misc is a table of various stuff that doesn't fit in elsewhere
-- misc = {
-- quest = 1,
-- conjured = 1,
-- madeby = "string",
-- nodrop = 1,
-- openable = 1,
-- randomenchant = 1, (item has a random enchant, e.g. tradeskill items with <Random Enchant>)
-- readable = 1,
-- setbonus = { "foo", "bar" }, (list of set bonuses displayed)
-- signable = 1,
-- soulbound = 1,
-- charges = #,
-- alreadyknown = 1, (tradeskill recipe is already known)
-- beingsquest = 1,
-- unique = N, (unique item, N is max you can have)
-- unsellable = 1,
-- gift = "sender", ("Wrapped by <sender>")
-- written = "author"
-- },
-- }