Download
(20Kb)
Download
Updated: 12-04-12 08:07 PM
Pictures
File Info
Updated:12-04-12 08:07 PM
Created:unknown
Downloads:8,515
Favorites:41
MD5:
Categories:Bags, Bank, Inventory, ToolTip

QualityID  Popular! (More than 5000 hits)

Version: 5.1b.30
by: Anaral [More]

This is a very minimalistic addon that adds an item's basic info into the tooltip, in the color of the item's quality. The info includes an item's; icon, id, item level, stack count, and type with subtype. It is embedded into all possible tooltips, from Auctioneer to AtlasLoot.

QID Commands:
/qualityid or /qid displays the full list of commands:

  • /qid {toggle|on|off} -- enables or disable all info
  • /qid id -- toggles the itemid
  • /qid ilvl -- toggles the item-level
  • /qid icon --toggle the icon
  • /qid stack -- toggles the stack count
  • /qid itemtype -- toggles the type: subtype

Any questions, comments, or suggestions please post them here in the comments section.

I've returned, for who knows how long... hopefully long enough to work out all the bugs. >.<

5.1b.30
* updated toc for Blizz patch 5.1
* rewrote the addon so at least the basic info shows
* due to issues quality coloring isn't implemented yet
* temporarily disabled the ability to add top and bottom lines
* removed function to display the item's icon on the tooltip. Tuller's Tipachu is a great addon for the icon, it includes spell icons too!

4.30.28
* Updated TOC to 40300
* Fixed hex code errors, thank you to phrozenassid for the code.
3.20.27
* Updated TOC to 32000 for real this time... <<.<<
3.10.25
* Updated TOC to 32000

--3.10.24
* commented out the addition of displaying qid's info in the AtlasLootTooltip as it was causing errors for those that don't use AL.
* changed the slashcommands for adding lines before and after QID's info from toptooltip and bottooltip to topline and botline.

--3.10.21
* implemented options to add a line before and/or after QIDs info. These are not set by default. Use /qid ingame for options.
* cleaned up code
* fixed info for recipes. No more double info in recipe item tooltips! Yay! <--Special thanks to jnwhiteh for helping me with this one.
* corrected my poor coding by actually hooking into AtlasLoot's tooltip instead of replacing the function.

--3.05.20
-Added revision line for CurseForge
-added options to disable item level and itemID
-added slash commands to match

--3.05.18
*fixed savedvariables not saving between sessions.
*further fixed the itemType bug (hopefully it's finally squashed).

--3.05 r16
*fixed quality error
*changed Type to itemType

--3.05 r14 & 15:
* fixed stackCount error
* Cleaned up notes in .lua
* Changed Toc info

--3.05 r13:
* Added Saved Variables

--2.05.00.12:
* Added more info; stack count, type: subtype and icon.
* Added slashcommand toggles.
* Need to add saved variables, until then user options aren't saved between sessions.

--1.00.10: Added GNUv2GPL.txt and edited toc and lua accordingly
--1.0.0 r8: Rewrite of coding. Removed TipHookerLib dependency, made tooltip a double line.
--0.0.6: Just catching upto the svn. No changes.
--0.0.3: *whistles innocently*
--0.0.2: Cleaned up unneeded code, and a file.
--0.0.1: Original upload
Optional Files (0)


Post A Reply Comment Options
Unread 07-30-08, 01:29 PM  
Tekkub
A Molten Giant
 
Tekkub's Avatar
AddOn Author - Click to view AddOns

Forum posts: 960
File comments: 334
Uploads: 67
TipHooker is not needed at all here. There's also a lot of unneeded code in your addon. You could slim this whole thing to a few lines of code:

Code:
local origs = {}

local function OnTooltipSetItem(frame, ...)
	local name, link = frame:GetItem()
	if link then
		local id = tonumber(link:match("item:(%d+):"))
		local _, _, _, ilvl = GetItemInfo(id)
		frame:AddDoubleLine("ID:" , id)
		frame:AddDoubleLine("iLevel:" , ilvl)
	end
	if origs[frame] then return origs[frame](frame, ...) end
end

for _,frame in pairs{GameTooltip, ItemRefTooltip, ShoppingTooltip1, ShoppingTooltip2} do
	origs[frame] = frame:GetScript("OnTooltipSetItem")
	frame:SetScript("OnTooltipSetItem", OnTooltipSetItem)
end
Report comment to moderator  
Reply With Quote
Unread 07-30-08, 06:33 PM  
Anaral
A Murloc Raider
 
Anaral's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 52
Uploads: 2
Thank you for the info.

Much of the unneeded code is stuff I was messing with, which I just hadn't removed. Bad addon author, I know. I'll clean it up and update here tomorrow morning.

After playing around with the code you supplied and trying to make it work. I can't seem to get the font to color by the item's quality AND more annoyingly, the info is multiplied (twice on items, four times on recipes). I'll continue messing with both yours and some other test code I've written.
__________________
Last edited by Anaral : 07-30-08 at 07:35 PM.
Report comment to moderator  
Reply With Quote
Unread 07-31-08, 12:26 PM  
Tekkub
A Molten Giant
 
Tekkub's Avatar
AddOn Author - Click to view AddOns

Forum posts: 960
File comments: 334
Uploads: 67
You can pull the quality color directly out of the link string. Recipes will in fact call the handler twice, because there are two items set to the tip. The fact that GetItem returns the same value both times is a Blizzy bug that's been around for some time. As for why your getting double hook calls, I have no idea, it works fine for me. Perhaps you have another addon handling their hooks incorrectly?
Report comment to moderator  
Reply With Quote
Unread 08-05-08, 07:11 AM  
Anaral
A Murloc Raider
 
Anaral's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 52
Uploads: 2
As for why your getting double hook calls, I have no idea, it works fine for me. Perhaps you have another addon handling their hooks incorrectly?
The double info in regular items was due to my xml file, which for the new format, is not needed.
__________________
Report comment to moderator  
Reply With Quote
Unread 08-06-08, 10:02 AM  
Caellian
A Frostmaul Preserver
 
Caellian's Avatar

Forum posts: 281
File comments: 252
Uploads: 5
Getting this sometimes

Code:
QualityID.lua:23: attempt to index field '?' (a nil value)
Count: 1

Call Stack:
[C]: ?
QualityID.lua:23: in function 
QualityID.lua:16>
(tail call): ?
(tail call): ?
[C]: ?
[C]: in function `SetHyperlink'
Interface\AddOns\tekKompare\HoverTips.lua:9: in function <Interface\AddOns\tekKompare\HoverTips.lua:6>
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
Report comment to moderator  
Reply With Quote
Unread 08-10-08, 08:40 AM  
Anaral
A Murloc Raider
 
Anaral's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 52
Uploads: 2
Caellien, I believe the error is occuring due to tekCompares way of calling Hyperlinks. I'm pretty sure this means I need to add support for compare item addons like tekCompare. The issue doesn't stop either addon from doing its thing. So until I can figure out how to add support, I apologize for the inconvenience of the error pop-ups.

Thank you for bringing it to my attention.
__________________
Report comment to moderator  
Reply With Quote
Unread 11-21-08, 07:20 PM  
Spellshaper
A Murloc Raider
 
Spellshaper's Avatar
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 70
Uploads: 2
I get an error on line 94 sometimes due to stackCount being nil. Adding a check for nil fixed it.
__________________
"We shaman don't command the magic we wield. As mages and warlocks strain and sweat to produce a tiny flame, I ask for the elements to lend me their strength."
Report comment to moderator  
Reply With Quote
Unread 12-15-08, 11:55 AM  
Anaral
A Murloc Raider
 
Anaral's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 52
Uploads: 2
Originally posted by Spellshaper
I get an error on line 94 sometimes due to stackCount being nil. Adding a check for nil fixed it.
Finally the error has been fixed and should be pushed through by WoWI at any moment.
__________________
Report comment to moderator  
Reply With Quote
Unread 01-09-09, 03:28 PM  
kimboslice
A Defias Bandit

Forum posts: 3
File comments: 76
Uploads: 0
Excellent, just what I was looking for!

Thanks!
Report comment to moderator  
Reply With Quote
Unread 02-05-09, 01:01 AM  
metax
A Kobold Labourer

Forum posts: 0
File comments: 29
Uploads: 0
The first thing i did after installind qualityid is made text to be white. Dark text on dark background - not the best idea.
Report comment to moderator  
Reply With Quote
Unread 02-05-09, 09:23 AM  
Anaral
A Murloc Raider
 
Anaral's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 52
Uploads: 2
Originally posted by metax
The first thing i did after installind qualityid is made text to be white. Dark text on dark background - not the best idea.
They are all colors used in WoW Tooltips by default, as they are the quality colors used ingame. One of the main ideas of this addon is to provide a colorful option to the details of an item. If you think they are too dark, there are plenty of alternatives out there.
__________________
Report comment to moderator  
Reply With Quote
Unread 02-26-09, 09:49 PM  
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 918
File comments: 959
Uploads: 22
While being in Thousand Winter, I noticed that QualityID shows a lua error, when you mousesover some of the new "bound to account" items. It seems like it tries to get an ilvl, but can't.
Report comment to moderator  
Reply With Quote
Unread 02-27-09, 11:31 AM  
Anaral
A Murloc Raider
 
Anaral's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 52
Uploads: 2
Originally posted by Dawn
While being in Thousand Winter, I noticed that QualityID shows a lua error, when you mousesover some of the new "bound to account" items. It seems like it tries to get an ilvl, but can't.
Yes, this has been the bane of my experience with lua. It happens because the item isn't in your cache. I will figure this out... one day.
__________________
Report comment to moderator  
Reply With Quote
Unread 03-07-09, 10:00 PM  
ragnarok00
A Kobold Labourer

Forum posts: 0
File comments: 49
Uploads: 0
Originally posted by Anaral
Yes, this has been the bane of my experience with lua. It happens because the item isn't in your cache. I will figure this out... one day.
http://www.wowwiki.com/API_GetItemQualityColor
Use this API instead of ITEM_QUALITY_COLORS
which currently doesn't work..
Report comment to moderator  
Reply With Quote
Unread 03-11-09, 11:02 AM  
Anaral
A Murloc Raider
 
Anaral's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 52
Uploads: 2
Originally posted by Dawn
While being in Thousand Winter, I noticed that QualityID shows a lua error, when you mousesover some of the new "bound to account" items. It seems like it tries to get an ilvl, but can't.
I think I've finally nipped this bug in butt. I'll probably release it after I do some more testing, to make sure it's really gone.

Thank you Ragnarok for leading me in the right direction.
__________________
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: