Download
(21Kb)
Download
Updated: 01-15-14 06:50 AM
Pictures
File Info
Updated:01-15-14 06:50 AM
Created:11-17-10 12:15 AM
Downloads:7,505
Favorites:74
MD5:

Shot Glass Raid Frames  Popular! (More than 5000 hits)

Version: 3.2
by: danltiger, Pinghansen

Shot Glass is a lightweight raid frame, which can be configured to show specific Aura Indicators, in addition to Health, Incoming Healing, Mana, Aggro, Range, and Target.

No Libraries are used, and the code is very simple, which makes it a nice learning tool for people who are learning to program their own raid frames.

Feature Highlights

  • Incoming Heals: You'll see incoming heals as a subtle, semi-transparent bar, indicating the future health of the unit.
  • Aura Indicators: Along the top edge of each unit frame, there are three circular indicators. On the bottom edge, there are three triangular indicators. Stacks are displayed below the indicator.
  • Aggro Indicator: A red border will light up around any unit that acquires aggro.
  • Range: Units out of your range will shrink in size.
  • Mana: Only mana is indicated; Rage, Runic Power, Energy, etc are not shown.

Aura Configuration
I've included two configuration files with the current package. (For Druid and Priest) Feel free to use those files as a template for your own customization.

The configuration file is simply an addon with "## Dependencies: ShotGlass" in the TOC file. You can access the 'TrackedAuras' table from your LUA file. Alternatively, you can edit the included file. An example:

Code:
local TrackedAuras = ShotGlassRaidFrames.TrackedAuras

TrackedAuras[GetSpellInfo(774)] = {position = 1, color = {r = .8,g = 0, b = .8, a = 1},}		-- Rejuvenation
TrackedAuras["Rejuvenation"] = {position = 1, color = {r = .8,g = 0, b = .8, a = 1},}
Note: You can find the spell ID# from Wowhead.

Character Profiles
The "Addon" button on your Character Selection Screen will allow you to Enable or Disable the Aura List for each character.




I'm not going to bug you by popping up an ad whenever you hit "Download". If you enjoy this addon and want to send a monetary "Thank You", please visit our Pledgie page by clicking on the button, above.

3.1:
- TOC Bump

3.0:
- Updated for MoP

2.3:
- Tracked auras can now be assigned a custom function for color and stack text. (See ShotGlass_Druid for an example)
- Delegate functions are passed a table, 'aura', containing information about the evaluated aura: aura.color, aura.stacks, aura.expiration, aura.position, aura.name
- Changed font to Blizzard's Arial Narrow. This will make life easier for international clients, and reduces the whole ZIP package to 15kb.
- Command line has returned: /shotglass [show|hide|lock|unlock]

2.1 & 2.2:
- Trying to fix the overlap bug. I've disabled the option for the frames to grow to the right, until it's fixed.

2.0:
+ TOC Bump for 4.3
+ Auras will display a countdown from 5 seconds (it will replace stack-count text, temporarily)
+ Added GUI Interface panel
+ Added quick link to interface panel, via right-click on the drag handle
- Removed slash commands, except for /shotglass (which will bring up the new interface panel)

1.15:
Merely a TOC bump for 4.2

1.14:
DUH! When you bump the TOC, then you should do it correctly. /facepalm

1.13:
Merely a TOC bump for 4.1

1.12:
Bug Fix: Priority bug.
Integrated ShotGlass_Priest.

1.11:
Implemented slash-commands. See readme.txt for a list of commands.

0.10:
Bug Fix: Priority Bug.

0.9:
Added Vehicle Support, Spell Priority, External Configuration for Auras.

0.4-0.8:
Clique Support, Bug fixes, Incoming Heals.

0.3:
Bug Fix: Certain events reset the attributes of the unit frame, breaking the link. This update will restore those links when attributes are changed.
Optional Files (2)
File Name
Version
Size
Author
Date
Type
0.3
893B
04-27-11 12:38 PM
Addon
0.3
1kB
02-13-11 04:47 PM
Addon


Post A Reply Comment Options
Unread 03-03-11, 07:29 AM  
Pinghansen
Certified Insane
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 75
Uploads: 2
Suggestions/hints wanted

I would like suggestions on how to implement three things:
  1. Tooltips on mouseover
  2. Right-click menu
  3. Pet sub-frames

I'm looking for pointers on how to implement the features in code, not for how they should look or work.

I'm sure that there are some pretty obvious and simple solutions to both tooltips and menus, but I've been unable to find them in my reference material.

Pet frames are somewhat more complex, but if I could get started

I'm using the first edition of "World of Warcraft programming" for reference, so a page number may be all I need.
Report comment to moderator  
Reply With Quote
Unread 03-03-11, 03:11 AM  
moggan
A Murloc Raider

Forum posts: 4
File comments: 12
Uploads: 0
What bothers me, is that I'm not quite sure how Lua handles the operator precedence.
It is indeed your last example. I have the Lua 5.1 reference manual in front of me as I type
If you are familiar with C it's basically the same operator precedence.

I did not have time to make any testing yesterday unfortunately. Hopefully I'll get it tested tonight or at the very latest on Friday.
Report comment to moderator  
Reply With Quote
Unread 03-02-11, 07:27 AM  
Pinghansen
Certified Insane
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 75
Uploads: 2
Originally posted by moggan
Yes, that's how I think it should look as well.
What bothers me, is that I'm not quite sure how Lua handles the operator precedence.

is it
Code:
not (aura.priority or aura.priority > priority[aura.position])
or
Code:
not (aura.priority or aura.priority) > priority[aura.position]
or
Code:
(not (aura.priority) or aura.priority) > priority[aura.position]
or
Code:
(not(aura.priority)) or (aura.priority > priority[aura.position])
It should be the latter, but ....

Like with calculators, given the expression 2 + 4 * 3. The correct result is 14, but some will return 18.
Last edited by Pinghansen : 03-02-11 at 07:29 AM.
Report comment to moderator  
Reply With Quote
Unread 03-02-11, 06:52 AM  
moggan
A Murloc Raider

Forum posts: 4
File comments: 12
Uploads: 0
Originally posted by Pinghansen
Perhaps something like this:
Yes, that's how I think it should look as well.

I'll put it to the test when I get home. Now I only need to figure out how to reproduce it (need to be hit with magic, curse and disease in that order I figure, given my configuration).

Thanks for the swift reply!
Report comment to moderator  
Reply With Quote
Unread 03-02-11, 06:04 AM  
Pinghansen
Certified Insane
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 75
Uploads: 2
Originally posted by moggan
This statement will terminate the loop
I have not yet had a chance to test this properly, but I am pretty sure it is wrong the way it is now
I'd say that you are right.

Perhaps something like this:
Code:
if not aura.priority or aura.priority > priority[aura.position] then
    indicator = self.Graphics.Indicators[aura.position]
    ApplyIndicatorStyle(indicator, aura.color, stacks)
    priority[aura.position] = aura.priority
end
The loop above should be modified as well.

I'll not be playing for a short while, so it would be nice if you could test it.
Report comment to moderator  
Reply With Quote
Unread 03-02-11, 05:12 AM  
moggan
A Murloc Raider

Forum posts: 4
File comments: 12
Uploads: 0
Hi,

First of all, thanks for this addon. I like it a lot

I have a small issue though. I was noticing on my priest that I was not always seeing the debuff indicators light up properly. So I had a look at the code and I think I have found a bug in the aura priority logic:
Code:
  if aura.priority and aura.priority < priority[aura.position] then break end
This statement will terminate the loop (break terminates the innermost loop) if at any time you find a buff/debuff that shares an indicator position with a previous, higher priority buff/debuff.

But this means that any remaining buffs/debuffs will not be processed at all, which is not what you want.

I have not yet had a chance to test this properly, but I am pretty sure it is wrong the way it is now
Report comment to moderator  
Reply With Quote
Unread 02-19-11, 01:18 AM  
unstoppixel
An Aku'mai Servant
 
unstoppixel's Avatar
AddOn Compiler - Click to view compilations

Forum posts: 37
File comments: 131
Uploads: 2
Thumbs up Class Role Icons

I'm digging all the updates since I last checked out this addon! If you added the class role icons it'd be perfect!
__________________
Report comment to moderator  
Reply With Quote
Unread 02-18-11, 12:36 PM  
enkil80
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 22
Uploads: 1
nice, thanks for the update
about the tooltip I get this strange behavior , I've noticed that if I move the cursor from right to left into a specific frame (person) I get tooltip, and if I take it from the top to bottom into other person I dont get it. Maybe its just me, still thanks
Last edited by enkil80 : 02-18-11 at 12:39 PM.
Report comment to moderator  
Reply With Quote
Unread 02-18-11, 06:45 AM  
Pinghansen
Certified Insane
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 75
Uploads: 2
ShotGlass has been upgraded to 1.11

Version 1.11 of ShotGlass Raid Frames has been uploaded.

The changes are slash-commands for changing various settings, like scale, position and some display options. The state of those changes are saved.

Until further, the changes are saved per-character. This can be changed to per-account.

Things to come:
We are researching adding right-click menus and mouseover tooltips to the frames. Don't hold your breath, as the picture is still very blurred
Last edited by Pinghansen : 02-18-11 at 07:37 AM.
Report comment to moderator  
Reply With Quote
Unread 02-13-11, 04:54 PM  
Pinghansen
Certified Insane
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 75
Uploads: 2
Updated the priest spells

I've updated the Priest Spells for ShotGlass. Just some changes to colors to make them more intuitive.
Report comment to moderator  
Reply With Quote
Unread 01-03-11, 02:10 PM  
danltiger
A Murloc Raider
 
danltiger's Avatar
AddOn Author - Click to view AddOns

Forum posts: 9
File comments: 1522
Uploads: 13
Definitely, if someone could send me a link on how to do it. I'm pretty busy right now, and don't have a lot of free time. It'd be a whole lot quicker if I got a kickstart on the research.

Originally posted by BooFer
Any chance to include the right click options for marking, uninviting or leaving group etc?
__________________
Author Portal
Tidy Plates, Tidy Threat, and Tidy Bar
Report comment to moderator  
Reply With Quote
Unread 01-03-11, 10:29 AM  
BooFer
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 12
File comments: 26
Uploads: 2
Any chance to include the right click options for marking, uninviting or leaving group etc?
Report comment to moderator  
Reply With Quote
Unread 12-13-10, 06:23 PM  
danltiger
A Murloc Raider
 
danltiger's Avatar
AddOn Author - Click to view AddOns

Forum posts: 9
File comments: 1522
Uploads: 13
Re: Re: Re: Is there a way to scale them?

it's "ShotGlassRaidFrames" I think. If I recall,the object name was changed.



Originally posted by Jason
I am not finding this to work. when i set it to 2 or say 1.5, the frame just vanishes from my screen. when i remove the line it comes back.
__________________
Author Portal
Tidy Plates, Tidy Threat, and Tidy Bar
Report comment to moderator  
Reply With Quote
Unread 12-13-10, 03:47 PM  
Jason
A Defias Bandit
Premium Member

Forum posts: 2
File comments: 29
Uploads: 0
Re: Re: Is there a way to scale them?

[i]Add this line near the end of the file:

ShotGlass:SetScale(2)

... where "2" stands for the scale multiplier. 2 = 200% size.
I am not finding this to work. when i set it to 2 or say 1.5, the frame just vanishes from my screen. when i remove the line it comes back.
Report comment to moderator  
Reply With Quote
Unread 12-12-10, 11:47 PM  
danltiger
A Murloc Raider
 
danltiger's Avatar
AddOn Author - Click to view AddOns

Forum posts: 9
File comments: 1522
Uploads: 13
Ha! Heya Toran ;-)

It doesn't show pets in a party. I haven't figured out how to do that, yet.

It's "completely configurable" ... assuming you know a lot of LUA...

Originally posted by Toran
Saw a screenie of these and thought immediately that danltiger must be involved. They are damn sexeh.

Few questions:
  • Does it show pets in party and raid (haven't had a chance to try yet, sorry)?
  • Configurable frame growth direction? I assume default is left and bottom from anchor icon? -- Edit: looking at the code, seems like it goes right and down, which is perfect.
__________________
Author Portal
Tidy Plates, Tidy Threat, and Tidy Bar
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: