Download
(2 Kb)
Download
Updated: 09-26-12 03:38 PM
Pictures
File Info
Compatibility:
Mists of Pandaria (5.0.4)
Updated:09-26-12 03:38 PM
Created:12-17-10 04:35 PM
Downloads:4,897
Favorites:52
MD5:
AiL
Version: 0.9.3
by: havoc74 [More]
Simply adds your average item level to your character frame, and adds other players' average item level to the tooltip.

*** NOTICE *** Version 0.9.1 may require you to actually click on your target to get correct results. This is a bug in Blizzard's API, sorry for the inconvenience.
12-30-2010: AiL-0.4: Bug Fix: While Inspect Frame is open, mousing over another player throws an exception. Thank you zaphon.

12-29-2010: AiL-0.3: Bug Fix: GetAiL() returning nil on a naked player unit. Thank you Krellmax and zaphon.

6-13-2012: AiL-0.6: As per comment requests, I updated AiL to update the Character Frame when an item is swapped with another. Also, as far as I can tell, the Transmog doesn't affect the addon in any way. All tests on self and other players proved to be accurate. Thank you again for the comments, and again, I apologize for not updating this addon more frequently.

6-13-2012: AiL-0.7: Quick Bug Fix - iLevel reporting as nil at load.

7-20-2012: AiL-0.8: Responded to a request to remove the "AiL -VERSION- Loaded." Chat Frame Notification.

9-1-2012: AiL-0.9: Updated to MoP Pre-Release patch 5.0.4.

9-7-2012: AiL-0.9.1: Using Skarj's suggestion, AiL works, but you may have to actually click on your target to get correct results.

9-23-2012: AiL-0.9.2: Fixed the issue of not being able to inspect a unit if AiL is enabled.

9-26-2012: AiL-0.9.3: Removed the un-needed Character Frame. This also eliminated an LUA error on showing the Character Frame.
Optional Files (0)


Archived Files (1)
File Name
Version
Size
Author
Date
 AiL
0.9.2
2kB
havoc74
09-23-12 11:26 AM


Post A Reply Comment Options
Unread 12-21-10, 04:30 PM  
havoc74
A Kobold Labourer
 
havoc74's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 32
Uploads: 4
Originally posted by Cralor
Well, I'm still having an issue getting to where I want.

Increasing INCMOD will increase the intensity, but for all of them.

Specifically, I want the iLvls that are significantly higher (like 15+) to be more red than others. Increasing the INCMOD will make iLvl 326 (lower than me) still a dark read. It's quite hard to tell the difference between that and an iLvl 352 anyway.

What should I change to achieve this?
Ok, sorry I haven't gotten back to you sooner, I work 3rd shift, and last night I worked 12 hours, I just woke up. Anyway.....

I don't want to change AiL, it was never meant to be a comparative addon, just an informative addon. But for you the answer is quite easy.

local function ColorText(iLvl)
local myLevel = tonumber(GetAIL("player"))
local color = "FFFFFF"

if iLvl >= (myLevel + 20) then
color = "FF0033" -- red
elseif iLvl >= (myLevel + 10) then
color = "FF6633" -- orange
elseif iLvl > myLevel then
color = "FFFF00" -- yellow
elseif iLvl <= myLevel then
color = "33CC00" -- green
end

return color
end

Add your ColorText function to the addon, then do this:

--GameTooltip:AddLine(format("AiL: " .. ail), r, gb, gb);
GameTooltip:AddLine(format(ColorText(ail).."AiL: "..ail.."|r"));

comment out the first line as above, and copy/paste the second line in. It uses your function and you can do it locally.
__________________
havoc74
Taerion of Hydraxis (Nelf Blood DK)
havoc74 is offline Report comment to moderator  
Reply With Quote
Unread 12-21-10, 05:41 PM  
Cralor
Mmm... cookies!!!
 
Cralor's Avatar
AddOn Author - Click to view AddOns

Forum posts: 768
File comments: 321
Uploads: 7
That was what I was going to do if you couldn't find a solution, so thanks

I had some small issues getting it included so below is the correct way to edit (if you want this functionality):

(Simply add this after the GetAiL function)
Lua Code:
  1. local function ColorText(iLvl)
  2.     local myLevel = tonumber(GetAiL("player"))
  3.     local color = "FFFFFF"
  4.  
  5.     if iLvl >= (myLevel + 20) then
  6.         color = "FF0033" -- red
  7.     elseif iLvl >= (myLevel + 10) then
  8.         color = "FF6633" -- orange
  9.     elseif iLvl > myLevel then
  10.         color = "FFFF00" -- yellow
  11.     elseif iLvl <= myLevel then
  12.         color = "33CC00" -- green
  13.     end
  14.  
  15.     return color
  16. end

and

(Find the first line, comment it, and add the second)
Lua Code:
  1. --GameTooltip:AddLine(format("AiL: " .. ail), r, gb, gb);
  2. GameTooltip:AddLine(format("|cFF"..ColorText(ail).."AiL: "..ail.."|r"));
__________________
Never be satisfied with satisfactory.
Last edited by Cralor : 12-21-10 at 05:43 PM.
Cralor is offline Report comment to moderator  
Reply With Quote
Unread 12-23-10, 11:14 PM  
zaphon
A Defias Bandit

Forum posts: 2
File comments: 35
Uploads: 0
I just picked up this mod over nivItemLevel as it doesn't cause me to get errors all the time. However, I did add a piece of code that's a bit more helpful to me (I comment out the part that adds my iLvL to the unit frame, as I didn't want to see it all the time). Instead I have added the iLvL to the Character Information Pane. Here's the diff if you want to add it (maybe as an option, whatever).

Code:
diff -rw AiL/AiL.lua AiL-changed/AiL.lua
78a79,86
> 	PAPERDOLL_STATINFO["AIL"] = {
> 		updateFunc = function(statFrame, unit)
> 			PaperDollFrame_SetLabelAndText(statFrame, "AiL", GetAiL("player"))
> 			statFrame:Show()
> 		end
> 	}
> 	tinsert(PAPERDOLL_STATCATEGORIES["GENERAL"].stats, "AIL")
>
It add's an entry called AiL right below the Item Level in the expanded Character Information Pane.
zaphon is offline Report comment to moderator  
Reply With Quote
Unread 12-24-10, 04:11 PM  
Krellmax
A Kobold Labourer

Forum posts: 1
File comments: 11
Uploads: 0
Error Message

Got the following error. Not sure what I did. I was just walking to my mailbox in Stormwind. It looks like it might be a conflict with Auctioneer's tooltip.

Date: 2010-12-24 15:01:08
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\AiL\AiL.lua line 38:
attempt to compare nil with number
Debug:
[C]: ?
AiL\AiL.lua:38:
AiL\AiL.lua:35
AiL\AiL.lua:68:
AiL\AiL.lua:62
[C]: ?
...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:327:
...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:321

Details: http://shorttext.com/t07qseiw2u
Krellmax is offline Report comment to moderator  
Reply With Quote
Unread 12-24-10, 08:40 PM  
zaphon
A Defias Bandit

Forum posts: 2
File comments: 35
Uploads: 0
Re: Error Message

Originally posted by Krellmax
Got the following error. Not sure what I did. I was just walking to my mailbox in Stormwind. It looks like it might be a conflict with Auctioneer's tooltip.

Date: 2010-12-24 15:01:08
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\AiL\AiL.lua line 38:
attempt to compare nil with number
Debug:
[C]: ?
AiL\AiL.lua:38:
AiL\AiL.lua:35
AiL\AiL.lua:68:
AiL\AiL.lua:62
[C]: ?
...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:327:
...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:321

Details: http://shorttext.com/t07qseiw2u
Oh, that's due to a bug in the GetAiL function. This to be specific.

Code:
    if (total < 1 or itn < 1) then
        return;
    end
That should be return 0; not just return; (which means it's returning nil, and the next call to get the color is attempting to do a comparison on nil). So my best guess, you moused over someone completely naked! :-)
zaphon is offline Report comment to moderator  
Reply With Quote
Unread 12-27-10, 02:28 PM  
zaphon
A Defias Bandit

Forum posts: 2
File comments: 35
Uploads: 0
Re: Re: Error Message

Originally posted by zaphon
Oh, that's due to a bug in the GetAiL function. This to be specific.

Code:
    if (total < 1 or itn < 1) then
        return;
    end
That should be return 0; not just return; (which means it's returning nil, and the next call to get the color is attempting to do a comparison on nil). So my best guess, you moused over someone completely naked! :-)
I fixed another bug as well, if you we're inspecting someone and moused over someone else, it would bug out your current inspect. So I added code to prevent AiL from computing values if the inspect frame is open.

Code:
diff -rw AiL/AiL.lua AiL-new/AiL.lua
65c65,66
< 		if (unit and CanInspect(unit)) then
---
> 		local isInspectOpen = (InspectFrame and InspectFrame:IsShown()) or (Examiner and Examiner:IsShown());
> 		if ((unit) and (CanInspect(unit)) and (not isInspectOpen)) then
zaphon is offline Report comment to moderator  
Reply With Quote
Unread 12-29-10, 04:43 PM  
havoc74
A Kobold Labourer
 
havoc74's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 32
Uploads: 4
Re: Re: Re: Error Message

Originally posted by zaphon
I fixed another bug as well, if you we're inspecting someone and moused over someone else, it would bug out your current inspect. So I added code to prevent AiL from computing values if the inspect frame is open.

Code:
diff -rw AiL/AiL.lua AiL-new/AiL.lua
65c65,66
< 		if (unit and CanInspect(unit)) then
---
> 		local isInspectOpen = (InspectFrame and InspectFrame:IsShown()) or (Examiner and Examiner:IsShown());
> 		if ((unit) and (CanInspect(unit)) and (not isInspectOpen)) then
Thank you all for bringing these bugs up to my attention. I work 3rd shift and have a family of 6, so it's hard to keep up with things at times. I apologize for any delay addressing these bugs. The first bug, GetAiL() returning nil has been fixed. The second bug I cannot duplicate in game according to the information in the post. I do understand the bug and see the fix, but are you talking about the Character frame, or the GameTooltip frame being open when you mouseover another unit?
__________________
havoc74
Taerion of Hydraxis (Nelf Blood DK)
havoc74 is offline Report comment to moderator  
Reply With Quote
Unread 12-29-10, 06:09 PM  
zaphon
A Defias Bandit

Forum posts: 2
File comments: 35
Uploads: 0
Re: Re: Re: Re: Error Message

Originally posted by havoc74
Thank you all for bringing these bugs up to my attention. I work 3rd shift and have a family of 6, so it's hard to keep up with things at times. I apologize for any delay addressing these bugs. The first bug, GetAiL() returning nil has been fixed. The second bug I cannot duplicate in game according to the information in the post. I do understand the bug and see the fix, but are you talking about the Character frame, or the GameTooltip frame being open when you mouseover another unit?
The bug is basically recreated as follows.

Click on someone, inspect them, put your mouse over an item their wearing, you should see a tooltip. Now put your mouse cursor over another player, than go back to the inspect frame, and put your mouse over a piece of gear. You won't get a tooltip at all for the item (as you are changing the inspect to scan the other player).
Last edited by zaphon : 12-29-10 at 06:10 PM.
zaphon is offline Report comment to moderator  
Reply With Quote
Unread 12-29-10, 09:57 PM  
havoc74
A Kobold Labourer
 
havoc74's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 32
Uploads: 4
Re: Re: Re: Re: Re: Error Message

Originally posted by zaphon
The bug is basically recreated as follows.

Click on someone, inspect them, put your mouse over an item their wearing, you should see a tooltip. Now put your mouse cursor over another player, than go back to the inspect frame, and put your mouse over a piece of gear. You won't get a tooltip at all for the item (as you are changing the inspect to scan the other player).
Ok, I undetstand now, thanks for clearing that up for me. I am at work now, I'll update when I get home tomorrow.

EDIT: Ok, i'm home, have slept, and now looking at your code snippet again, and it makes so much more sense to me now. lol I'll get this updated soon, I just need to do some testing and stuff.

EDIT: Ok, all fixed. Thanks again zaphon, I used your code in the update, hope that's ok
__________________
havoc74
Taerion of Hydraxis (Nelf Blood DK)
Last edited by havoc74 : 12-30-10 at 07:04 PM.
havoc74 is offline Report comment to moderator  
Reply With Quote
Unread 01-07-11, 12:56 AM  
sonix
A Defias Bandit
 
sonix's Avatar

Forum posts: 2
File comments: 19
Uploads: 0
color

could you color it please?
sonix is offline Report comment to moderator  
Reply With Quote
Unread 01-12-11, 06:49 PM  
havoc74
A Kobold Labourer
 
havoc74's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 32
Uploads: 4
Re: color

Originally posted by sonix
could you color it please?
It is colored, but, the color doesn't start to show until you get an AiL of around 284. It starts out gray, then goes to white, and eventually, a dark red.
__________________
havoc74
Taerion of Hydraxis (Nelf Blood DK)
havoc74 is offline Report comment to moderator  
Reply With Quote
Unread 01-20-11, 01:33 AM  
tsitra
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Can you also hook the event "UNIT_INVENTORY_CHANGED" to update the ilevel too?

Right now, if you equip an item from your inventory onto your character, you have to close the character sheet and reopen it to get the updated values.

That and/or the "EQUIPMENT_SWAP_FINISHED" event

Thanks! Love the addon! I'm recommending it to my guild as I'm typing.
tsitra is offline Report comment to moderator  
Reply With Quote
Unread 01-25-11, 05:41 PM  
havoc74
A Kobold Labourer
 
havoc74's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 32
Uploads: 4
Originally posted by tsitra
Can you also hook the event "UNIT_INVENTORY_CHANGED" to update the ilevel too?

Right now, if you equip an item from your inventory onto your character, you have to close the character sheet and reopen it to get the updated values.

That and/or the "EQUIPMENT_SWAP_FINISHED" event

Thanks! Love the addon! I'm recommending it to my guild as I'm typing.
tsitra - sorry it took me so long to respond, I work 3rd shift and don't have a lot of time during the week (or any time for that matter) to check messages and what not.

I see the need of your suggestion and will look into it as soon as I can. In the mean time, if you've got any coding experience, please feel free to implement your suggestion and post your code here. I probly won't be able to get to it till the weekend, I apologize for the delay. Married, and father of 4, plus a full time 3rd shift job - it gets pretty hectic around here. Thank you for your patience
__________________
havoc74
Taerion of Hydraxis (Nelf Blood DK)
havoc74 is offline Report comment to moderator  
Reply With Quote
Unread 11-30-11, 09:21 AM  
Maxen
A Deviate Faerie Dragon

Forum posts: 17
File comments: 221
Uploads: 0
Thanks for the update, but what did you do exactly ? It seems transmog is messing with the lvl now...
Maxen is offline Report comment to moderator  
Reply With Quote
Unread 12-01-11, 05:57 AM  
Olena
A Kobold Labourer

Forum posts: 0
File comments: 22
Uploads: 0
Originally Posted by Maxen
Thanks for the update, but what did you do exactly ? It seems transmog is messing with the lvl now...
I'm having the same issue - ilvl is incorrect most of the times if somebody have transmog. their gear. To see the actual ilvl, you have to inspect that character and just after that ilvl get correct amount.
Is there any way to fix that? -)
Olena is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: