Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(114 Kb)
Download
Updated: 03-27-10 02:53 PM
Pictures
File Info
Updated:03-27-10 02:53 PM
Created:unknown
Downloads:3,352
Favorites:34
MD5:
ManaPerc
Version: v1.4.3
by: phyber [More]
This is a simple addon to display in the tooltip of spells the current
and/or total mana the spell will cost, in percentage.

Example tooltip:

Blizzard North
180 Mana (t:18.1%)(c:25.5%)
This will rain down lots of icy stuff on
thine enemies to smithe them, in thy glory
  • /manaperc ? : Displays extra information about mypercentage
  • /manaperc standby : Toggles the addon's standby mode. Standby makes the addon active or inactive, though it is still loaded.
  • /manaperc total : toggles displaying mana cost in % of total mana
  • /manaperc current : toggles displaying mana cost in % of current mana
  • /manaperc colour : toggles displaying colour OR t:/c:

The original author of the Ace1 version of this addon was Instant, it was under the name of MyACEPercentage.
I've taken the addon, converted it to Ace2, optimized the tooltip processing part (the main chunk of the addon) and given it a name change.
2010-03-27:
Updated TOC

2009-04-16: v1.4.2
TOC bump for 3.1
Removed unnecessary LibDruidMana-1.0 from the package.

18/11/2008: v1.4.1
  • Upgraded for 3.0.2
  • Now works properly with Druid Mana while in forms thanks to Blizzard API changes.

07/05/2008: r70749[list][*]Upgraded to Ace3.[*]Added an options interface to the Blizzard Interface options.[*]Now using tooltip:GetSpell() and GetSpellInfo(spellName) to get spell costs. Should be much quicker than scanning the tooltip.[*]Note: Regular slash commands are disabled at the moment and executing /manaperc will bring up the GUI options window. Regular slash commands should be back soon.

r56108:
Updated TOC for WoW 2.3
Changed how we hook the tooltip.
Translation updates.

r36341:
Updated TOC for WoW 2.1

r19595:
Updated to work with 2.0.

r12343:
More optimizations! I lied yesterday, a fresh look this morning revealed more could be done. Check the changelog if you really want to know what's changed.

r12258:
Fixed missing Libs entries in the TOC.
Small optimization. Managed to throw away another unneeded local. I think this is about as optimized as it's ever going to be now.

r12087:
Fixed empty Libs directory. Not sure why it was empty.

r12082:
Initial release.
Archived Files (2)
File Name
Version
Size
Author
Date
v1.4.2
106kB
phyber
04-16-09 01:38 AM
v1.4.1
99kB
phyber
11-18-08 03:02 AM


Post A Reply Comment Options
Unread 09-26-06, 01:18 PM  
GrimStonemaul
A Kobold Labourer
AddOn Compiler - Click to view compilations

Forum posts: 1
File comments: 16
Uploads: 2
Tooltip

What tooltip mod or font are you using? I like the way your spell tooltips look. Very clean.
GrimStonemaul is offline Report comment to moderator  
Reply With Quote
Unread 09-26-06, 01:37 PM  
phyber
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 72
Uploads: 14
The font mod is ClearFont with the Calibri_v1 font.
The tooltip is skinned with oSkin.

[edit]
Oh, and I'm using TinyTip too.
[/edit]
Last edited by phyber : 09-26-06 at 01:41 PM.
phyber is offline Report comment to moderator  
Reply With Quote
Unread 09-27-06, 09:41 PM  
Iceyshadows
A Defias Bandit

Forum posts: 2
File comments: 21
Uploads: 0
Originally posted by phyber
The font mod is ClearFont with the Calibri_v1 font.
The tooltip is skinned with oSkin.

[edit]
Oh, and I'm using TinyTip too.
[/edit]
Where can I get that oSkin that you used to skin the tooltips? I can't find it here or on curse-gaming
Iceyshadows is offline Report comment to moderator  
Reply With Quote
Unread 09-28-06, 06:25 PM  
instant
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 17
File comments: 11
Uploads: 3
Nice to see someone updated it to Ace2.. Would'nt mind some credits though, heh :-)
(I am using your version now)

If you get a chance to look at the if statements, there must be a way to optimize that part of the code... although I never figured out one.
instant is offline Report comment to moderator  
Reply With Quote
Unread 09-29-06, 11:51 AM  
phyber
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 72
Uploads: 14
Instant, you still got credit.

It's in the above where it says you're the original author, you're also still listed in the ReadMe file. Infact, your original comment with the MyACEPercentage title is still in the ManaPerc.lua

Check out the processing part of the addon if you have time, it's quite optimized now. There is a version on SVN that I should upload, even more optimized.
phyber is offline Report comment to moderator  
Reply With Quote
Unread 09-29-06, 02:33 PM  
svartalfimposter
A Wyrmkin Dreamwalker
 
svartalfimposter's Avatar

Forum posts: 49
File comments: 22
Uploads: 0
Originally posted by Iceyshadows
Where can I get that oSkin that you used to skin the tooltips? I can't find it here or on curse-gaming
I got it from this compilation:
http://www.wowinterface.com/download...fo.php?id=5380
svartalfimposter is offline Report comment to moderator  
Reply With Quote
Unread 09-29-06, 05:08 PM  
phyber
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 72
Uploads: 14
Originally posted by Iceyshadows
Where can I get that oSkin that you used to skin the tooltips? I can't find it here or on curse-gaming
Sorry, didn't notice that question earlier when I was replying to stuff.
You can get the latest version from http://www.wowace.com/files/oSkin/
phyber is offline Report comment to moderator  
Reply With Quote
Unread 11-18-06, 10:51 PM  
KALIROB2k5
A Kobold Labourer

Forum posts: 0
File comments: 6
Uploads: 0
First off, great mod very helpful . But I seem to be getting the following error on logon for ManaPerc:

[2006/11/18 20:46:59-93-x2]: ManaPerc\ManaPerc.lua:62: attempt to perform arithmetic on local `line2cost' (a nil value)
ManaPerc\ManaPerc.lua:62: in function <Interface\AddOns\ManaPerc\ManaPerc.lua:54>
<unknown>:
<in C code>: ?
<in C code>: in function `pcall'
Stubby\Stubby.lua:260: in function <Interface\AddOns\Stubby\Stubby.lua:242>
<unknown>:
Venantes\Venantes.lua:1105: in function `Venantes_BuildTooltip'
<string>:"VenantesPetButton:OnEnter":2: in main chunk

---

Any idea as to the possible cause? Thanks in advanced.
KALIROB2k5 is offline Report comment to moderator  
Reply With Quote
Unread 11-20-06, 07:32 AM  
phyber
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 72
Uploads: 14
Find this line in ManaPerc.lua:
line2cost = tonumber(line2cost)

and add under that 'if not line2cost then return end'

That might help.

I have no idea why that error would happen, but from here it looks like Stubby is doing something stupid.
phyber is offline Report comment to moderator  
Reply With Quote
Unread 11-22-06, 11:15 PM  
KALIROB2k5
A Kobold Labourer

Forum posts: 0
File comments: 6
Uploads: 0
Originally posted by phyber
Find this line in ManaPerc.lua:
line2cost = tonumber(line2cost)

and add under that 'if not line2cost then return end'

That might help.

I have no idea why that error would happen, but from here it looks like Stubby is doing something stupid.
That seems to fix it (Not that easy to edit a lua file in Notepad heh), thanks a ton for the assistance Phyber . And I agree Stubby does tend to piss a few Ace addons off most the time. Thats why hopefully they get a new version out soon. (Not that I'm even all that sure what Stubby does for Auctioneer lol)
KALIROB2k5 is offline Report comment to moderator  
Reply With Quote
Unread 01-08-07, 03:22 PM  
Darthgnomer
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 7
File comments: 13
Uploads: 1
Error

I have attempted to use your addon on more than one occasion and I always recieve this error:

Darthgnomer is offline Report comment to moderator  
Reply With Quote
Unread 06-28-07, 11:42 AM  
brykrys
A Murloc Raider
 
brykrys's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 70
Uploads: 3
I received the following error message when mousing over a gem:
Code:
Message: ..\AddOns\ManaPerc\ManaPerc.lua line 77:
   bad argument #2 to 'format' (number expected, got nil)
Following other posts I disabled Stubby, and confirmed that the error still occurs.

I had a look at the code, and I think I've spotted the problem.
At line 57 you use the following code to check for the mana line in a spell:
Code:
if tipline2 and string.find(tipline2, MANA_COST) then
In the English client, MANA_COST is equal to "%d Mana". Therefore the above check will get a "false positive" if the relevant line of text is something like "+1 Mana every 5 seconds."

The error gets thrown when the next section of code can't handle this unexpected result.

Hope this helps.

(Also, your download is missing an Ace library, and another library is incorrectly named in your .toc file)
brykrys is offline Report comment to moderator  
Reply With Quote
Unread 10-11-10, 01:52 PM  
jmcgrath
A Kobold Labourer
 
jmcgrath's Avatar

Forum posts: 0
File comments: 190
Uploads: 0
Any plans for a patch 4.0.1 update?
jmcgrath is offline Report comment to moderator  
Reply With Quote
Unread 04-29-11, 10:53 PM  
jmcgrath
A Kobold Labourer
 
jmcgrath's Avatar

Forum posts: 0
File comments: 190
Uploads: 0
I guess there is no hope for 4.1 either.. =(
jmcgrath is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.