Download
(61 Kb)
Download
Updated: 07-09-11 12:03 PM
Pictures
File Info
Updated:07-09-11 12:03 PM
Created:12-15-08 12:34 PM
Downloads:5,573
Favorites:45
MD5:
Light Meter  Popular! (More than 5000 hits)
Version: 1.6.4
by: Dagma [More]
Version 1.6.4 - Minor usability changes, re bar visibility when targeting or not targeting.

Version 1.6.3 - Some bug fixes for patch 4.2. Also added mana-bar-only mode for mages.

Light Meter is a healing estimation addon. It supports priests, shamans, druids, and paladins. Priest support is the most extensive.

Since v1.6.3, also shows only the mana bar, with Evocation and Mana Gem marks, for mages. When in mage mode, the mana bar doesn't adjust its maximum for intellect procs like Volcano card. This makes it easier for arcane mages to know when they would waste mana, when the proc ends.

Light Meter accomplishes SIX (6) things.

(1) Show predicted healing against target's health.

(2) Show your own mana in the same place.

(3) Track Power Word: Shield and Divine Aegis absorption, using a length of shield at the end of the health bar. As your target is hit, the shield grows shorter, until it is gone.

(4) Indicate incoming heals on your target, using a blue bar at the end of your own estimated healing.

(5) It also tracks your mana just below the health bar. It places tick marks on your mana bar for the expected mana gains from different abilities and a mana potion. Large gains and loss of mana are highlighted on your mana bar.

(6) Light Meter will finally track statistics on your heals and display these, estimating efficiency and throughput from your empirical data, in spell tooltips.

Note that I made this addon for my own use. It doesn't have a fancy customization interface, and it probably never will.

Type "/lm" or "/lightmeter" for options.
v1.6.1 - Added experimental support for incoming heals. They will appear as the blue segment at the end of the healing prediction bar. Some minor bug fixes for rare errors.

v1.5.0 - updated for 4.0.1 patch. No longer calculating expected heal sizes, but rather learning them from your actual casts. So cast each spell a few times, in order to get the calculations in tooltips working. Most of the shield tracking stuff hasn't been updated. Still bugs for classes other than priest.

v1.3.1 - Updated to patch 3.3. Has accumulated various fixes and more class support (partial) along the way, but I haven't been uploading intermediate versions, so I've lost track of all the changes. I still use it daily, though, so its core functionality for priests is still good.

v1.2 - Updated for patch 3.2. Also added minimal druid support, for those with druid alts.

v1.1.1 - Added '/lm showbars' command to toggle always hiding the bars, in case you just want to tooltip statistics.

v1.1.0 - Updated for Patch 3.1 talents and spells.
Optional Files (0)


Archived Files (10)
File Name
Version
Size
Author
Date
1.6.3
61kB
Dagma
07-04-11 10:35 AM
1.6.2
60kB
Dagma
11-06-10 07:59 PM
1.6.1
91kB
Dagma
11-04-10 07:52 AM
1.6.0
107kB
Dagma
10-30-10 02:54 PM
1.5.0
91kB
Dagma
10-23-10 10:14 AM
1.3.1
91kB
Dagma
05-19-10 09:02 PM
1.2
91kB
Dagma
08-17-09 12:49 PM
1.1.1
89kB
Dagma
04-16-09 05:22 PM
1.1.0
89kB
Dagma
04-14-09 08:16 PM
1.0.1
87kB
Dagma
12-15-08 12:34 PM


Post A Reply Comment Options
Unread 11-04-10, 01:59 PM  
Dagma
A Defias Bandit
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 201
Uploads: 11
The issue is that you don't have a mana potion in your inventory, I think. Should be fixed in the next update.
Originally posted by servi
I see U updated it but still i got errors as druid

Here is what i get:
Message: Interface\AddOns\LightMeter\LightMeter.lua:1248: bad argument #1 to 'find' (string expected, got nil)
Time: 11/04/10 18:46:40
Count: 248
Stack: [C]: in function `find'
Interface\AddOns\LightMeter\LightMeter.lua:1248: in function `LightMeter_OnUpdate'
[string "*:OnUpdate"]:1: in function <[string "*:OnUpdate"]:1>

Locals: (*temporary) = nil
(*temporary) = "%d+):"
(*temporary) = "string expected, got nil"

Error pop up until it shows to disable addon.
Last edited by Dagma : 11-04-10 at 07:51 PM.
Dagma is offline Report comment to moderator  
Reply With Quote
Unread 11-04-10, 11:49 AM  
servi
A Kobold Labourer

Forum posts: 0
File comments: 70
Uploads: 0
I see U updated it but still i got errors as druid

Here is what i get:
Message: Interface\AddOns\LightMeter\LightMeter.lua:1248: bad argument #1 to 'find' (string expected, got nil)
Time: 11/04/10 18:46:40
Count: 248
Stack: [C]: in function `find'
Interface\AddOns\LightMeter\LightMeter.lua:1248: in function `LightMeter_OnUpdate'
[string "*:OnUpdate"]:1: in function <[string "*:OnUpdate"]:1>

Locals: (*temporary) = nil
(*temporary) = "%d+):"
(*temporary) = "string expected, got nil"

Error pop up until it shows to disable addon.
servi is offline Report comment to moderator  
Reply With Quote
Unread 10-30-10, 02:55 PM  
Dagma
A Defias Bandit
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 201
Uploads: 11
It has worked, in limited ways, with the other healing classes for some time now. Give it a try.
Originally posted by servi
I wish U could make this addon for all healers since Visualheal isnt updated
Dagma is offline Report comment to moderator  
Reply With Quote
Unread 10-28-10, 05:13 PM  
servi
A Kobold Labourer

Forum posts: 0
File comments: 70
Uploads: 0
I wish U could make this addon for all healers since Visualheal isnt updated
servi is offline Report comment to moderator  
Reply With Quote
Unread 06-05-10, 08:48 AM  
Dagma
A Defias Bandit
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 201
Uploads: 11
Re: Pitbull4 integration

Cool stuff, Lurgllgluh. Thanks for posting the patch.

Once beta begins in earnest, I'll be updating Light Meter, I expect. In the meantime, feel free to fork the code off in any direction you like.
Dagma is offline Report comment to moderator  
Reply With Quote
Unread 06-04-10, 12:12 PM  
Lurgllgluh
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Pitbull4 integration

I use pitbull4, and wanted that to show me the lovely shield stuff LM tracks. I'm working on a "bar" based pitbull plugin along the lines of the Pitbull4_Visualheals addon, but for now I have a functional text implementation which can be layered on any pitbull frame. To set it up:

In the pitbull4 config UI, go to "modules" and "events" and enable COMBAT_LOG_EVENT_UNFILTERED and check the "all" checkbox for it.

Now go create a new luatext. Enable UNIT_AURA, UNIT_SPELLCAST_SUCCEEDED, and COMBAT_LOG_EVENT_UNFILTERED for the text, and enter the following custom code:

Code:
local POS_Left = math.floor(LightMeter_ShieldTable[GetUnitName(unit,true)] or 0)
local DA_Left = math.floor(LightMeter_DivineAegisTable[GetUnitName(unit,true)] or 0)
local result = ""
if(POS_Left > 0) then
  result = result.."|cffff0000"..POS_Left
end
if(DA_Left>0) then
  result = result.." |cff00ff00"..DA_Left
end
return result
Now position it where you want. That'll show you PW:S in red text and DA in green text on the unit frame you place it on.
Lurgllgluh is offline Report comment to moderator  
Reply With Quote
Unread 06-04-10, 11:28 AM  
Lurgllgluh
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Bug fix patch -- I think there's still another bug though

Attached is a patch file which does 4 things:

1. Fix Divine Aegis for the new combat log events which move the crit parameter
2. Fix cross-realm player name stuff, by switching all names to be GetUnitName() format, ie Name - Realm with spaces around the -, so we insert those spaces into the combat log names which don't include them
3. Fix the calculation for PW:S instant heal -- use the expected PW:S value which varies with PW:S rank not a hard-coded value.
4. Fix the Divine Aegis amount calculation to use the rank of Divine Aegis instead of assuming all 3 points in that talent.


I think there's still a bug in how damage is taken out of PW:S vs DA in LightMeter_ShieldAbsorb() -- the way the code reads now:

absorbAmount is to be absorbed between the two
If there's a PW:S, then deduct absorbAmount from that
If it goes below 0, set absorbAmount to the "overabsorb" as a negative number, and remove the PW:S [correct]

If there's a DA, then DEDUCT the absorbAmount from that -- but absorbAmount here is NEGATIVE, so you'll be increasing the DA shield


This patch will make LM work with 3.3.3, and for players below level 80

Code:
--- a/LightMeter.lua	2009-12-21 17:15:38.000000000 -0800
+++ b/LightMeter.lua	2010-06-04 09:48:53.000000000 -0700
@@ -192,10 +192,16 @@
         LightMeter_OOC = false;
     elseif event == "COMBAT_LOG_EVENT_UNFILTERED" then
     	local timestamp, logevent, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags = select(1, ...)
+    	if(sourceName) then
+	    	sourceName = sourceName:gsub("-"," - ")
+	    end
+	    if(destName) then
+			destName = destName:gsub("-"," - ")
+		end
     	local prefix,suffix = strsplit( "_" , logevent , 2 )
     	if logevent == "SPELL_HEAL" then
     		-- direct healing spell
-    		local spellID,spellName,spellSchool,amount,overhealing,crit = select( 9, ... )
+    		local spellID,spellName,spellSchool,amount,overhealing,absorbed,crit = select( 9, ... )
     		if ( sourceName == UnitName("player") and destName == LightMeterTarget ) then
                 -- player cast the spell, and landed on target, so update ghost bar
                 LightMeter_UpdateGhostBar( destName , spellID , spellName , amount , overhealing , crit )
@@ -242,7 +248,7 @@
     	end
     elseif ( event == "UNIT_MAXHEALTH" or event == "UNIT_HEALTH" ) then
     	local unitID = params[1]
-    	if ( LightMeterTarget and UnitName(unitID) == LightMeterTarget ) then
+    	if ( LightMeterTarget and GetUnitName(unitID,true) == LightMeterTarget ) then
     		LightMeterTargetMaxHealth = UnitHealthMax( unitID )
     		LightMeter_UpdateHealth( unitID )
     	end
@@ -261,6 +267,9 @@
     elseif event == "UNIT_SPELLCAST_SENT" then
     	--lmprint( table.concat( params , " | " ) )
     	local casterUnit,spellName,spellRank,spellTarget = select( 1 , ... )
+    	if(spellTarget) then
+			spellTarget = spellTarget:gsub("-", " - ")
+		end
     	if ( casterUnit == "player" and LightMeterSpellCoefs[ spellName ] ) then
     		-- source is player and spell is healing spell, so show the yellow bar
     		--lmprint( spellTarget )
@@ -276,11 +285,11 @@
     		--lmprint( "UNIT_SPELLCAST_SENT"..tostring(tid) )
     		
     		LightMeter_TargetChange( tid ) -- ensures visibility
-    		if params[2] ~= "Power Word: Shield" then
-    			LightMeter_UpdateHealingBar( params[2] , params[3] ) -- name and rank of spell
+    		if spellName ~= "Power Word: Shield" then
+    			LightMeter_UpdateHealingBar( spellName, spellRank ) -- name and rank of spell
             else
                 -- PW:S, so update the shield
-                LightMeter_UpdateShield( LightMeter_UnitFromName( params[4] ) , params[3] )
+                LightMeter_UpdateShield( LightMeter_UnitFromName( spellTarget ) )
     		end
     		LightMeter_UpdateDisplay( tid )
     		LightMeterAllFadeTimer = 5
@@ -400,23 +409,23 @@
     local unitID = nil
     local nParty = GetNumPartyMembers()
     for i = 1,nParty do
-        if UnitName("party"..i) == unitName then
+        if GetUnitName("party"..i,true) == unitName then
             unitID = "party"..i
         end
     end
     local nRaid = GetNumRaidMembers()
     for i = 1,nRaid do
-        if UnitName("raid"..i) == unitName then
+        if GetUnitName("raid"..i,true) == unitName then
             unitID = "raid"..i
         end
     end
     if not unitID then
         -- haven't found yet, so check target and focus
-        if UnitName("focus") == unitName then
+        if GetUnitName("focus",true) == unitName then
             unitID = "focus"
-        elseif UnitName("target") == unitName then
+        elseif GetUnitName("target",true) == unitName then
             unitID = "target"
-        elseif UnitName("player") == unitName then
+        elseif GetUnitName("player",true) == unitName then
         	unitID = "player"
         end
     end
@@ -432,11 +441,11 @@
 		return
 	end
 	
-    if UnitName( targetID ) then
+    if GetUnitName( targetID, true ) then
         if ( UnitIsFriend( targetID , "player" ) ) then
             -- filter out NPCs when OOC
             if ( UnitIsPlayer( targetID ) or not LightMeter_OOC ) then
-                LightMeterTarget = UnitName( targetID )
+                LightMeterTarget = GetUnitName( targetID, true )
                 LightMeterTargetHealth = UnitHealth( targetID )
                 LightMeter_UpdateHealth( targetID )
                 LightMeter_Frames.TargetName:SetText( "|cffffffff"..LightMeterTarget )
@@ -516,7 +525,7 @@
 end
 
 function LightMeter_UpdateShield( unitID , spellRank )
-	local unitName = UnitName( unitID )
+	local unitName = GetUnitName( unitID, true )
 	
 	local h = LightMeter_ExpectedHealing( nil , "Power Word: Shield" , spellRank )
 	LightMeter_AborbRecord = 0
@@ -566,7 +575,7 @@
     local nameTalent, iconPath, tier, column, currentRank = GetTalentInfo( 1 , 24 )
 	if currentRank == 0 then return end -- not specced for DA
     
-    local h = amount * 0.3 -- strength of shield is 1/3 of full amount of critical heal, including overhealing
+    local h = amount * 0.1 * currentRank -- strength of shield is 10% of full amount of critical heal, including overhealing, per rank
     --lmprint( (amount - overhealing)*.3 .. "/" .. amount*.3 )
     LightMeter_AborbRecord = 0
     
@@ -1698,7 +1707,7 @@
                 local nameTalent, iconPath, tier, column, currentRank = GetTalentInfo( 1 , 27 )
                 local talentBorrowedTime = currentRank * 0.08
                 local sp = GetSpellBonusHealing()
-                local ih = 0.2 * ( 2230 + sp * 1.881*1.5/3.5 + sp * talentBorrowedTime ) * ( 1 + talentTwinDisciplines ) * ( 1 + talentFocusedPower ) * ( 1 + talentFocusedPower ) * 1.1
+                local ih = 0.2 * ( h + sp * 1.881*1.5/3.5 + sp * talentBorrowedTime ) * ( 1 + talentTwinDisciplines ) * ( 1 + talentFocusedPower ) * ( 1 + talentFocusedPower )
                 
                 GameTooltip:AddLine("Instant heal (glyph)",1,1,1)
                 local gicon = GetItemIcon("Glyph of Power Word: Shield")
Lurgllgluh is offline Report comment to moderator  
Reply With Quote
Unread 03-08-10, 07:07 PM  
Zusterke
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Originally posted by Dagma
I remember snagging that special formula from some testing at EJ. But I can't be sure it's still valid, honestly. I haven't specced Discipline in months upon months.
We're actually going over these numbers in a discussion at
http://www.plusheal.com/viewtopic.php?p=57755
If you're interested. Apparently it caught the attention of the author of DrDamage. Personally, I'm only interested in knowing what the correct formula is. I'd like to add a link to your addon on my site for the terrific help you've given in the past. Though... if you want to, joining the discussion would be dearly appreciated.
Zusterke is offline Report comment to moderator  
Reply With Quote
Unread 03-08-10, 07:03 PM  
Dagma
A Defias Bandit
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 201
Uploads: 11
Originally posted by Zusterke
Hey Dagma,

Awesome work but I do have a question about the glyph of PW:S calculation on line 1434:
local ih = 0.2 * ( 2230 + sp * 1.881*1.5/3.5 + sp * talentBorrowedTime ) * ( 1 + talentTwinDisciplines ) * ( 1 + talentFocusedPower ) * ( 1 + talentFocusedPower )

Improved Power Word:Shield is not included and FocusedPower is doubled. Doesn't IPW:S contribute? Does FocusedPower count twice?

Cheers,
Zusterke
I remember snagging that special formula from some testing at EJ. But I can't be sure it's still valid, honestly. I haven't specced Discipline in months upon months.
Dagma is offline Report comment to moderator  
Reply With Quote
Unread 03-08-10, 03:46 AM  
Zusterke
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Hey Dagma,

Awesome work but I do have a question about the glyph of PW:S calculation on line 1434:
local ih = 0.2 * ( 2230 + sp * 1.881*1.5/3.5 + sp * talentBorrowedTime ) * ( 1 + talentTwinDisciplines ) * ( 1 + talentFocusedPower ) * ( 1 + talentFocusedPower )

Improved Power Word:Shield is not included and FocusedPower is doubled. Doesn't IPW:S contribute? Does FocusedPower count twice?

Cheers,
Zusterke
Zusterke is offline Report comment to moderator  
Reply With Quote
Unread 05-10-09, 11:19 AM  
Gako
A Fallenroot Satyr
 
Gako's Avatar

Forum posts: 29
File comments: 11
Uploads: 0
This looks sweet, must have on my priest.
Gako is offline Report comment to moderator  
Reply With Quote
Unread 03-23-09, 09:54 AM  
Crevox
A Defias Bandit
 
Crevox's Avatar
AddOn Compiler - Click to view compilations

Forum posts: 3
File comments: 28
Uploads: 2
Best idea for a Power Word: Shield ever. I want this in a unit frame addon.

On a side note, it seems to be broken on pets. It doesn't provide a meter, and casting a spell gives you a "nil" window with a huge overheal.
Last edited by Crevox : 03-23-09 at 10:07 AM.
Crevox is offline Report comment to moderator  
Reply With Quote
Unread 12-15-08, 04:04 PM  
DJJoeJoe
A Murloc Raider
 
DJJoeJoe's Avatar
AddOn Compiler - Click to view compilations

Forum posts: 5
File comments: 168
Uploads: 1
Priest only ftw
__________________

Joetest - Ner'Zhul - Disciples of Death
DJJoeJoe is offline Report comment to moderator  
Reply With Quote
Unread 12-15-08, 03:01 PM  
Dagma
A Defias Bandit
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 201
Uploads: 11
Yes, I know about VisualHeal. I don't use it. VH doesn't track shields, doesn't track mana, doesn't estimate mana gains from abilities, and doesn't provide theorycraft stats in spell tooltips.

But yeah, if all you want is the healing bar, go for VH.

Originally posted by Iboong
Did you heard about VisualHeal?
Last edited by Dagma : 12-16-08 at 01:59 PM.
Dagma is offline Report comment to moderator  
Reply With Quote
Unread 12-15-08, 01:36 PM  
Iboong
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
Did you heard about VisualHeal?

__________________
wownewsdaily.info
Iboong is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: