Download
(3Kb)
Download
Updated: 08-10-09 11:52 AM
Addon for:
oUF.
Pictures
File Info
Updated:08-10-09 11:52 AM
Created:01-05-09 08:38 PM
Downloads:5,632
Favorites:24
MD5:

oUF DruidHots  Popular! (More than 5000 hits)

Version: v1.5-Release
by: PProvost [More]

oUF_DruidHots is an oUF extension that adds a set of colored box "indicators" to the top of enabled frames to show you all of your current Druid heal-over-time spells.

As a healer I missed the indicators I used to use in Grid. Since I now use a custom oUF layout instead of Grid or Pitbull, I decided to hack something together. What started out as a quick little lifebloom timer quickly blossomed into a full blown Druid HOT timer.

The image shows how it looks and what they each mean. It attaches the indicators to the top left of the Health bar.

There are a few things I still want to implement:

* Some kind of indication when the Hot is about to expire. I’m going to play with blinking, fades, borders, etc. to see what works best.
* Better configuration for layout authors. Right now everything (indicator size, color, offset, spacing, ordering) are all hard-coded. I’ll put the config in a table an oUF layout author can embed in his layout code.

As with all oUF extensions, it requires that you have oUF (the base frame framework) and an oUF layout (the definition of how you want your player/party/raid frames to look) installed.

------------------------------------------------------------------------
Tagging as v1.5-Release
Updated TOC for Patch 3.2

------------------------------------------------------------------------
r14 | quaiche | 2009-05-05 00:24:57 +0000 (Tue, 05 May 2009) | 2 lines
Changed paths:
M /trunk/oUF_DruidHots.lua

Missing event parameter bug

------------------------------------------------------------------------
r13 | quaiche | 2009-05-04 23:27:21 +0000 (Mon, 04 May 2009) | 2 lines
Changed paths:
M /trunk/oUF_DruidHots.lua
M /trunk/oUF_DruidHots.toc

Added an update throttle to the UNIT_AURA handler

------------------------------------------------------------------------
r11 | quaiche | 2009-04-19 23:14:35 +0000 (Sun, 19 Apr 2009) | 2 lines
Changed paths:
M /trunk/oUF_DruidHots.lua

Fixed to handle changes made to UnitBuff() function in Patch 3.1

------------------------------------------------------------------------
r9 | quaiche | 2009-04-18 20:20:08 +0000 (Sat, 18 Apr 2009) | 2 lines
Changed paths:
M /trunk/oUF_DruidHots.toc

Updated TOC for Patch 3.1

------------------------------------------------------------------------
r8 | quaiche | 2009-03-04 16:34:46 +0000 (Wed, 04 Mar 2009) | 1 line
Changed paths:
M /trunk/oUF_DruidHots.lua

Started some code for making the extension embeddable
------------------------------------------------------------------------
r5 | quaiche | 2009-01-03 04:55:38 +0000 (Sat, 03 Jan 2009) | 2 lines
Changed paths:
M /trunk/oUF_DruidHots.lua

Minor code clean up before release.

------------------------------------------------------------------------
r4 | quaiche | 2009-01-02 08:28:35 +0000 (Fri, 02 Jan 2009) | 2 lines
Changed paths:
M /trunk/oUF_DruidHots.lua

Fixed a bug where it didn't work correctly in raids

------------------------------------------------------------------------
r3 | quaiche | 2008-12-31 10:16:05 +0000 (Wed, 31 Dec 2008) | 2 lines
Changed paths:
D /trunk/Readme.txt
A /trunk/oUF_DruidHots.lua
A /trunk/oUF_DruidHots.toc
D /trunk/oUF_LifebloomStack.lua
D /trunk/oUF_LifebloomStack.toc

Initial working version with support for Lifebloom, Regrowth, Rejuv and Wildgrowth

------------------------------------------------------------------------
r2 | quaiche | 2008-12-03 06:39:04 +0000 (Wed, 03 Dec 2008) | 1 line
Changed paths:
A /trunk/Readme.txt
A /trunk/oUF_LifebloomStack.lua
A /trunk/oUF_LifebloomStack.toc

Initial import
------------------------------------------------------------------------
r1 | root | 2008-12-03 06:31:54 +0000 (Wed, 03 Dec 2008) | 1 line
Changed paths:
A /branches
A /tags
A /trunk

"ouf_lifebloom-stack/mainline: Initial Import"
------------------------------------------------------------------------
Post A Reply Comment Options
Unread 04-30-10, 08:31 PM  
strickland
A Cyclonian

Forum posts: 40
File comments: 195
Uploads: 0
No Duration for the hots? please can someone explain how to enable duration if there is anyway to do it
Report comment to moderator  
Reply With Quote
Unread 04-28-10, 09:34 PM  
strickland
A Cyclonian

Forum posts: 40
File comments: 195
Uploads: 0
Hi to you mate, will you be kind enough to show us how to add abolish poison too? thanks =)



Originally posted by mandaji
i found!!



here the entire code now:


--[[
Name: oUF_DruidHots
Description: Provides Druid HoT indicators across the top of the unit frame

To disable the indicators for a given frame, set ignoreDruidHots
to any non-nil value, e.g.:

frame.ignoreDruidHots = true

Copyright 2008 Quaiche

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
]]

local parent = debugstack():match[[\AddOns\(.-)\]]
local global = GetAddOnMetadata(parent, 'X-oUF')
local oUF = _G[global] or oUF
local UnitBuff = _G.UnitBuff
local GetTime = _G.GetTime

assert(oUF, 'oUF not loaded')

if select(2,UnitClass("player")) ~= "DRUID" then return end

local debugf = tekDebug and tekDebug:GetFrame("oUF_DruidHots")
local function Debug(...) if debugf then debugf:AddMessage(string.join(", ", tostringall(...))) end end

-- Icon textures for local-neutral identification of buffs
local LIFEBLOOM = "Interface\\Icons\\INV_Misc_Herb_Felblossom"
local REGROWTH = "Interface\\Icons\\Spell_Nature_ResistNature"
local REJUVENATION = "Interface\\Icons\\Spell_Nature_Rejuvenation"
local WILDGROWTH = "Interface\\Icons\\Ability_Druid_Flourish"
local THORNS = "Interface\\Icons\\Spell_Nature_Thorns"
local MARK = "Interface\\Icons\\Spell_Nature_Regeneration"
local GIFT = "Interface\\Icons\\Spell_Nature_GiftoftheWild"

-- Configuration
local width, height = 4, 3
local offsetX, offsetY = 5, -2
local spacing = 2
local order = {WILDGROWTH , REGROWTH, REJUVENATION , LIFEBLOOM, THORNS, MARK, GIFT }

local hots = {
[LIFEBLOOM] = {
count = 3,
color = { r=0, g=1.0, b=0 },
},
[REGROWTH] = {
count = 1,
color = { r=0, g=0, b=1 },
},
[REJUVENATION] = {
count = 1,
color = { r=1, g=1, b=0 },
},
[WILDGROWTH] = {
count = 1,
color = { r=1, g=0.5, b=0 },
},
[THORNS] = {
count = 1,
color = { r=.1, g=1, b=.1 },
},
[MARK] = {
count = 1,
color = { r=1, g=0, b=1 },
},
[GIFT] = {
count = 1,
color = { r=1, g=0, b=1 },
},
}

local function SetStatus(object, texture, count, remaining)
for i=1,hots[texture].count do
if hots[texture].count > 1 and count >= i then
object.druidHotsIndicators[texture][i]:Show()
else
object.druidHotsIndicators[texture][i]:Hide()
end
end
end

local state = {} -- Temp table to avoid memory thrashing
local function Update(object, event, unit)
if object.unit ~= unit then return end

local i = 1
state[LIFEBLOOM] = 0
state[REGROWTH] = 0
state[REJUVENATION] = 0
state[WILDGROWTH] = 0
state[THORNS] = 0
state[MARK] = 0
state[GIFT] = 0

while true do
local name, _, texture, count, _, _, expirationTime, caster = UnitBuff(unit, i, true)
local isMine = (caster == "player")
if not name then
break
end
if isMine and hots[texture] then
local timeleft = expirationTime - GetTime()
if texture == LIFEBLOOM then
state[texture] = count
else
state[texture] = 1
end
end
i = i + 1
end

for k,v in pairs(state) do
for i=1,hots[k].count do
if i <= state[k] then
object.druidHotsIndicators[k][i]:Show()
else
object.druidHotsIndicators[k][i]:Hide()
end
end
end
end

local function initialize(object)
if object.ignoreDruidHots or object.druidHotsIndicators then return end

local i,j,k
local tex
local anchor, anchorPoint, x, y = object.Health, "TOPLEFT", offsetX, offsetY

object.druidHotsIndicators = {}
for j = 1,#order do
k = order[j]
object.druidHotsIndicators[k] = {}
for i = 1,hots[k].count do
tex = object.Health:CreateTexture(nil, "OVERLAY")
tex:SetPoint("TOPLEFT", anchor, anchorPoint, x, y)
tex:SetTexture(hots[k].color.r, hots[k].color.g, hots[k].color.b)
tex:SetHeight(height)
tex:SetWidth(width)
tex:Hide()
if j==3 then
anchor, anchorPoint, x, y = object.Health, "TOPLEFT", offsetX, offsetY-5
else
anchor, anchorPoint, x, y = tex, "TOPRIGHT", spacing, 0
end
table.insert(object.druidHotsIndicators[k],tex)
end
end

object:RegisterEvent("UNIT_AURA", Update)
end

-- Initialize the extension for existing frames and register for subsequent frames
for k, object in ipairs(oUF.objects) do initialize(object) end
oUF:RegisterInitCallback(initialize)
Report comment to moderator  
Reply With Quote
Unread 01-15-10, 11:25 AM  
mandaji
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Originally posted by mandaji
i liked your idea and did it modifying after the tex:Hide() in function initialize

if j==3 then
anchor, anchorPoint, x, y = object.Health, "TOPLEFT", offsetX, offsetY-5
else
anchor, anchorPoint, x, y = tex, "TOPRIGHT", spacing, 0
end


it´s not the best way to do that but works for now.

i wanna add two more indicators, one for thorns and another for gift of the wild or mark of the wild, where can i start searching for the name of those textures?
i found!!



here the entire code now:


--[[
Name: oUF_DruidHots
Description: Provides Druid HoT indicators across the top of the unit frame

To disable the indicators for a given frame, set ignoreDruidHots
to any non-nil value, e.g.:

frame.ignoreDruidHots = true

Copyright 2008 Quaiche

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
]]

local parent = debugstack():match[[\AddOns\(.-)\]]
local global = GetAddOnMetadata(parent, 'X-oUF')
local oUF = _G[global] or oUF
local UnitBuff = _G.UnitBuff
local GetTime = _G.GetTime

assert(oUF, 'oUF not loaded')

if select(2,UnitClass("player")) ~= "DRUID" then return end

local debugf = tekDebug and tekDebug:GetFrame("oUF_DruidHots")
local function Debug(...) if debugf then debugf:AddMessage(string.join(", ", tostringall(...))) end end

-- Icon textures for local-neutral identification of buffs
local LIFEBLOOM = "Interface\\Icons\\INV_Misc_Herb_Felblossom"
local REGROWTH = "Interface\\Icons\\Spell_Nature_ResistNature"
local REJUVENATION = "Interface\\Icons\\Spell_Nature_Rejuvenation"
local WILDGROWTH = "Interface\\Icons\\Ability_Druid_Flourish"
local THORNS = "Interface\\Icons\\Spell_Nature_Thorns"
local MARK = "Interface\\Icons\\Spell_Nature_Regeneration"
local GIFT = "Interface\\Icons\\Spell_Nature_GiftoftheWild"

-- Configuration
local width, height = 4, 3
local offsetX, offsetY = 5, -2
local spacing = 2
local order = {WILDGROWTH , REGROWTH, REJUVENATION , LIFEBLOOM, THORNS, MARK, GIFT }

local hots = {
[LIFEBLOOM] = {
count = 3,
color = { r=0, g=1.0, b=0 },
},
[REGROWTH] = {
count = 1,
color = { r=0, g=0, b=1 },
},
[REJUVENATION] = {
count = 1,
color = { r=1, g=1, b=0 },
},
[WILDGROWTH] = {
count = 1,
color = { r=1, g=0.5, b=0 },
},
[THORNS] = {
count = 1,
color = { r=.1, g=1, b=.1 },
},
[MARK] = {
count = 1,
color = { r=1, g=0, b=1 },
},
[GIFT] = {
count = 1,
color = { r=1, g=0, b=1 },
},
}

local function SetStatus(object, texture, count, remaining)
for i=1,hots[texture].count do
if hots[texture].count > 1 and count >= i then
object.druidHotsIndicators[texture][i]:Show()
else
object.druidHotsIndicators[texture][i]:Hide()
end
end
end

local state = {} -- Temp table to avoid memory thrashing
local function Update(object, event, unit)
if object.unit ~= unit then return end

local i = 1
state[LIFEBLOOM] = 0
state[REGROWTH] = 0
state[REJUVENATION] = 0
state[WILDGROWTH] = 0
state[THORNS] = 0
state[MARK] = 0
state[GIFT] = 0

while true do
local name, _, texture, count, _, _, expirationTime, caster = UnitBuff(unit, i, true)
local isMine = (caster == "player")
if not name then
break
end
if isMine and hots[texture] then
local timeleft = expirationTime - GetTime()
if texture == LIFEBLOOM then
state[texture] = count
else
state[texture] = 1
end
end
i = i + 1
end

for k,v in pairs(state) do
for i=1,hots[k].count do
if i <= state[k] then
object.druidHotsIndicators[k][i]:Show()
else
object.druidHotsIndicators[k][i]:Hide()
end
end
end
end

local function initialize(object)
if object.ignoreDruidHots or object.druidHotsIndicators then return end

local i,j,k
local tex
local anchor, anchorPoint, x, y = object.Health, "TOPLEFT", offsetX, offsetY

object.druidHotsIndicators = {}
for j = 1,#order do
k = order[j]
object.druidHotsIndicators[k] = {}
for i = 1,hots[k].count do
tex = object.Health:CreateTexture(nil, "OVERLAY")
tex:SetPoint("TOPLEFT", anchor, anchorPoint, x, y)
tex:SetTexture(hots[k].color.r, hots[k].color.g, hots[k].color.b)
tex:SetHeight(height)
tex:SetWidth(width)
tex:Hide()
if j==3 then
anchor, anchorPoint, x, y = object.Health, "TOPLEFT", offsetX, offsetY-5
else
anchor, anchorPoint, x, y = tex, "TOPRIGHT", spacing, 0
end
table.insert(object.druidHotsIndicators[k],tex)
end
end

object:RegisterEvent("UNIT_AURA", Update)
end

-- Initialize the extension for existing frames and register for subsequent frames
for k, object in ipairs(oUF.objects) do initialize(object) end
oUF:RegisterInitCallback(initialize)
Report comment to moderator  
Reply With Quote
Unread 01-15-10, 10:56 AM  
mandaji
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Originally posted by Aerials[/b]
Hi. Love this addon, but i have some requests. I dono if you're still working on this even but here goes.

would be nice if the order of the indicators could be defined in the layout.
would be nice to be able to have multiple rows for the indicators and define how many indicators per row.
also, if you could specify the position in the layout.

for example, look at oUF_WTF, the indicators are covered by the health %. what i'm trying to do is make it like this:

rejouv = 1, regrowth = 2, wild growth = 3, lifebloom = 4

1 2 3
4 4 4

in the bottom left of the portrait frame.

Thanks.

[/b]
Originally posted by PProvost
You can do this pretty easily in the oUF_DruidHots.lua file if you want, but I don't have a way of doing it from your layout right now.

On line 48 you will see a variable called order that lets you control that.

To make multiple rows, you could introduce a symbol into orders (something like "BREAK") that could tell some code in the initialize method to start a new row.

Yes, you'd be hacking the extension code, but it would let you have that now.
i liked your idea and did it modifying after the tex:Hide() in function initialize

if j==3 then
anchor, anchorPoint, x, y = object.Health, "TOPLEFT", offsetX, offsetY-5
else
anchor, anchorPoint, x, y = tex, "TOPRIGHT", spacing, 0
end


it´s not the best way to do that but works for now.

i wanna add two more indicators, one for thorns and another for gift of the wild or mark of the wild, where can i start searching for the name of those textures?
Last edited by mandaji : 01-15-10 at 10:58 AM.
Report comment to moderator  
Reply With Quote
Unread 11-16-09, 06:55 PM  
PProvost
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 13
File comments: 126
Uploads: 23
Originally posted by Aerials
Hi. Love this addon, but i have some requests. I dono if you're still working on this even but here goes.

would be nice if the order of the indicators could be defined in the layout.
would be nice to be able to have multiple rows for the indicators and define how many indicators per row.
also, if you could specify the position in the layout.

for example, look at oUF_WTF, the indicators are covered by the health %. what i'm trying to do is make it like this:

rejouv = 1, regrowth = 2, wild growth = 3, lifebloom = 4

1 2 3
4 4 4

in the bottom left of the portrait frame.

Thanks.
You can do this pretty easily in the oUF_DruidHots.lua file if you want, but I don't have a way of doing it from your layout right now.

On line 48 you will see a variable called order that lets you control that.

To make multiple rows, you could introduce a symbol into orders (something like "BREAK") that could tell some code in the initialize method to start a new row.

Yes, you'd be hacking the extension code, but it would let you have that now.
Report comment to moderator  
Reply With Quote
Unread 11-12-09, 10:58 AM  
Aerials
A Warpwood Thunder Caller
AddOn Author - Click to view AddOns

Forum posts: 92
File comments: 76
Uploads: 4
Hi. Love this addon, but i have some requests. I dono if you're still working on this even but here goes.

would be nice if the order of the indicators could be defined in the layout.
would be nice to be able to have multiple rows for the indicators and define how many indicators per row.
also, if you could specify the position in the layout.

for example, look at oUF_WTF, the indicators are covered by the health %. what i'm trying to do is make it like this:

rejouv = 1, regrowth = 2, wild growth = 3, lifebloom = 4

1 2 3
4 4 4

in the bottom left of the portrait frame.

Thanks.
Report comment to moderator  
Reply With Quote
Unread 05-09-09, 08:23 AM  
lodarn
A Kobold Labourer

Forum posts: 0
File comments: 13
Uploads: 0
I just thought of something,would it be possible to add a dot for abolish poison aswell?
Report comment to moderator  
Reply With Quote
Unread 05-06-09, 02:36 PM  
PProvost
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 13
File comments: 126
Uploads: 23
Originally posted by lodarn
seems to be fixed now!thank you very much! can't really manage without it. :^)
I'm so happy that worked! Thanks all of you for your patience.
Report comment to moderator  
Reply With Quote
Unread 05-06-09, 12:37 PM  
lodarn
A Kobold Labourer

Forum posts: 0
File comments: 13
Uploads: 0
seems to be fixed now!thank you very much! can't really manage without it. :^)
Report comment to moderator  
Reply With Quote
Unread 05-05-09, 03:46 PM  
lodarn
A Kobold Labourer

Forum posts: 0
File comments: 13
Uploads: 0
thanks for trying to fix it mate.hopefully i will get to test it properly in ulduar 25 tomorrow.ill get back with a answer then.
Report comment to moderator  
Reply With Quote
Unread 05-04-09, 06:28 PM  
PProvost
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 13
File comments: 126
Uploads: 23
I just uploaded v1.4-Release which I hope will fix the lag bug you guys were seeing. Please let me know. Thanks.
Report comment to moderator  
Reply With Quote
Unread 05-04-09, 01:34 PM  
PProvost
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 13
File comments: 126
Uploads: 23
Originally posted by lodarn
I got the same problem,just tried and disabled the ouf_hots and now i have 30isch instead och 10isch fps.

im using this addonpack

http://www.wowinterface.com/download...o=&page=2#info

would be nice if you could come up with some idea. :^)
I will dig into it today. Thanks for the confirmation.
Report comment to moderator  
Reply With Quote
Unread 05-04-09, 11:31 AM  
lodarn
A Kobold Labourer

Forum posts: 0
File comments: 13
Uploads: 0
I got the same problem,just tried and disabled the ouf_hots and now i have 30isch instead och 10isch fps.

im using this addonpack

http://www.wowinterface.com/download...o=&page=2#info

would be nice if you could come up with some idea. :^)
Report comment to moderator  
Reply With Quote
Unread 04-21-09, 01:29 PM  
PProvost
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 13
File comments: 126
Uploads: 23
Originally posted by Maneut
Ok - a little bit information

<snip>

Today on 25 it lagged again. Then I saw your new version and updated to it, because I thought maybe it's my fault of "ugly" coding. But with no success.

With activated oUF_DruidHots I have 2-7 fps, deactivated 35+


EDIT: To verify I just tested it in Alterac and Warsong. Alterac Valley unplayable, Warsong no problems.
Okay, I will do some testing in large raids and see if I can repro this. I'd love to know if anyone else is having this issue.

Also, can you tell me exactly which oUF addons you are using? Which layout? Which other plugins?

Thanks!
Report comment to moderator  
Reply With Quote
Unread 04-20-09, 05:29 PM  
Maneut
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 4
Uploads: 1
Ok - a little bit information


Last week I entered Ulduar25 - still with the old version - and recognized that when I entered combat my fps dropped from 40 to 5.
I disabled MSBT, Filger, Recount and every other addon that I suspect to cause the framelag. But nothing worked.

On Friday/Saturday/Sunday I raided Ulduar10 - still with the old version - and had no lags at all. Due to having a second tree in the raid on Sat I change

Code:
if isMine  and hots[texture] then
to
Code:
if isMine == "player" and hots[texture] then
show only my HoTs.

Today on 25 it lagged again. Then I saw your new version and updated to it, because I thought maybe it's my fault of "ugly" coding. But with no success.

With activated oUF_DruidHots I have 2-7 fps, deactivated 35+


EDIT: To verify I just tested it in Alterac and Warsong. Alterac Valley unplayable, Warsong no problems.
Last edited by Maneut : 04-20-09 at 05:53 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: