Download
(285 Kb)
Download
Updated: 03-28-13 04:12 PM
Compatibility:
Thunder Isle (5.2)
Landfall (5.1)
Mists of Pandaria (5.0.4)
Updated:03-28-13 04:12 PM
Created:08-28-12 08:53 PM
Downloads:4,374
Favorites:23
MD5:
Categories:Graphic UI Mods, Suites
oUF Hank Fan Update for 5.0
Version: 5.2.0
by: gwyd [More]
This is an update of Hank's oUF_Hank addon for WoW 5.0.

Dependancies: oUF by haste.

Optional Dependancies:
oUF_WarlockSpecBars - by tukz
oUF_TotemBar (included) - updated by ckaotik

Note: Development code can be found on github

All credit goes to Hank. I am only updating it to work with WoW 5.0.
== 5.2.0
.toc bump
Fixed tag display for untaggable mobs -ckaotik
Updated moonkin eclipse cast counter formulas -ckaotik

== 5.1.0 ==
.toc bump
vehicle health fix
updated dispel types

== 5.0.5 ==
Fixed .toc file after breaking it.

== 5.0.5 ==
Added Warlock and Shaman power bars courtesy of ckaotik.
Updated config to parse focus frame correctly.

== 5.0.4c ==
Added back config functionality
Optional Files (1)
File Name
Version
Size
Author
Date
Type
0.1
352kB
09-27-12 10:26 AM
Patch


Archived Files (5)
File Name
Version
Size
Author
Date
5.1.0
284kB
gwyd
12-17-12 05:42 PM
5.0.5b
289kB
gwyd
10-07-12 04:08 PM
5.0.5
287kB
gwyd
08-31-12 12:38 PM
5.0.4c
294kB
gwyd
08-29-12 05:12 PM
5.0.4
294kB
gwyd
08-28-12 08:53 PM


Post A Reply Comment Options
Unread 09-09-12, 02:00 AM  
prawnz
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
Re: Re: Holy Power icons doesn't gray out

Originally Posted by gwyd
Originally Posted by prawnz
Is it me or is the holy power icon doesn't gray out if you don't have any. I kept seeing its always max when I am not in combat.
How much holy power do you have? Does it show all icons filled or just one? How long after combat (enough time to go away or right after)?
5 holy power, icons are filled filled when there is 0 holy power before even combat begins. Also they don't turn grey at all..
prawnz is offline Report comment to moderator  
Reply With Quote
Unread 09-08-12, 08:47 PM  
gwyd
A Defias Bandit
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 22
Uploads: 1
I've been trying to keep up to date with haste's oUF github repository so when he is ready for release, oUF_hank will be too. I'm not going to push an update to wowinterface until oUF stabilizes. If you want to pull dev versions you are more than welcome to from github
gwyd is offline Report comment to moderator  
Reply With Quote
Unread 09-06-12, 01:43 AM  
Irongunner
A Deviate Faerie Dragon

Forum posts: 10
File comments: 6
Uploads: 0
Re: Re: Problem with castbar icon on fade animation

Originally Posted by gwyd
I don't think I've seen this error (but I'm not sure I fully understand it). I haven't had a chance to try out your code yet. Is it specific casts/textures or specific scenarios in which this happens?
This is what happens randomly (no specific cast / scenario, but occurs quite often):

- You start a cast: oUF_Hank shows a castbar with the spell icon on the left side
- When the cast ends you can see a colored box (cast success/failure) at the spot where the castbar was
- This colored element plays a fade-out animation and is called the "animation dummy" in oUF_Hank
- It is initialized when the castbar is being created
- In order to show the same spell icon on this animation dummy as could be seen during the cast, the dummy has to be updated accordingly
- This happens inside the PostCastStart and PostChannelStart functions in the line:
Lua Code:
  1. castbar.Dummy.Icon:SetTexture(castbar.Icon:GetTexture())
- Unfortunately the :GetTexture() call sometimes returns nil. In these cases the dummy / fade out animation does not show a spell icon or the spell icon of a previous cast

Interestingly the problem does not exist if I do the same stuff inside the castbar.OnUpdate function, which is supported by oUF too. Unfortunately if this function is registered, the castbar does not update automatically (you have to handle the updating on your own). That's why my solution for the moment looks like this:

Lua Code:
  1. -- PostCastStart / PostChannelStart:
  2. -- replace: castbar.Dummy.Icon:SetTexture(castbar.Icon:GetTexture())
  3. -- by: castbar.Dummy.IconTexture = nil
  4.  
  5. -- PostCastSucceeded / PostCastStop / PostChannelStop:
  6. -- add castbar.Dummy.Icon:SetTexture(castbar.Dummy.IconTexture)
  7.    
  8. local coreCastbarUpdate = function(castbar, elapsed)
  9.     -- insert code from oUF core castbar.lua onUpdate(..) here
  10. end
  11.  
  12. oUF_Iron.OnUpdate = function(castbar, elapsed)
  13.     if castbar.Dummy.IconTexture == nil then
  14.         local texture = castbar.Icon:GetTexture()
  15.         if texture ~= nil then
  16.             castbar.Dummy.IconTexture = texture
  17.         end
  18.     end
  19.     coreCastbarUpdate(castbar, elapsed)
  20. end
  21.  
  22. -- Register cb.OnUpdate = oUF_Iron.OnUpdate at castbar creation
Last edited by Irongunner : 09-06-12 at 03:01 AM.
Irongunner is offline Report comment to moderator  
Reply With Quote
Unread 09-05-12, 12:47 PM  
gwyd
A Defias Bandit
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 22
Uploads: 1
Re: Problem with castbar icon on fade animation

Originally Posted by Irongunner
I am using parts of the old oUF_Hank in my UI, for example the castbar. I am experiencing the following problem: http://www.wowinterface.com/forums/s...ad.php?t=44124

Do you see this problem with your updated version too?
I don't think I've seen this error (but I'm not sure I fully understand it). I haven't had a chance to try out your code yet. Is it specific casts/textures or specific scenarios in which this happens?
gwyd is offline Report comment to moderator  
Reply With Quote
Unread 09-05-12, 12:44 PM  
gwyd
A Defias Bandit
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 22
Uploads: 1
Re: Holy Power icons doesn't gray out

Originally Posted by prawnz
Is it me or is the holy power icon doesn't gray out if you don't have any. I kept seeing its always max when I am not in combat.
How much holy power do you have? Does it show all icons filled or just one? How long after combat (enough time to go away or right after)?
gwyd is offline Report comment to moderator  
Reply With Quote
Unread 09-05-12, 02:47 AM  
prawnz
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
Holy Power icons doesn't gray out

Is it me or is the holy power icon doesn't gray out if you don't have any. I kept seeing its always max when I am not in combat.
prawnz is offline Report comment to moderator  
Reply With Quote
Unread 09-04-12, 01:20 PM  
Irongunner
A Deviate Faerie Dragon

Forum posts: 10
File comments: 6
Uploads: 0
Problem with castbar icon on fade animation

I am using parts of the old oUF_Hank in my UI, for example the castbar. I am experiencing the following problem: http://www.wowinterface.com/forums/s...ad.php?t=44124

Do you see this problem with your updated version too?

If you want to debug it inside the code, you can do the following in PostCastStart:

Lua Code:
  1. local texture = castbar.Icon:GetTexture()
  2. if texture ~= nil then
  3.     castbar.Dummy.Icon:SetTexture(texture)
  4.     ChatFrame1:AddMessage("Set texture " .. texture .. " for dummy icon on cast: " .. name)
  5. else
  6.     ChatFrame1:AddMessage("Could not set texture for dummy icon on cast: " .. name)
  7. end
Last edited by Irongunner : 09-04-12 at 01:23 PM.
Irongunner is offline Report comment to moderator  
Reply With Quote
Unread 09-02-12, 02:59 PM  
edgarrin
A Kobold Labourer

Forum posts: 0
File comments: 6
Uploads: 0
I got It

oUF.TagEvents["customlevel"] = "UNIT_LEVEL"
oUF.Tags["customlevel"] = function(unit)

had to be changed to

oUF.Tags.Events["customlevel"] = "UNIT_LEVEL"
oUF.Tags.Methods["customlevel"] = function(unit)

and in tags.lua "UNIT_LEVEL" had to be added to

oUF.Tags.Events["statusName"] = "UNIT_NAME_UPDATE PLAYER_FLAGS_CHANGED UNIT_LEVEL UNIT_FACTION INSTANCE_ENCOUNTER_ENGAGE_UNIT"
edgarrin is offline Report comment to moderator  
Reply With Quote
Unread 09-01-12, 01:48 PM  
edgarrin
A Kobold Labourer

Forum posts: 0
File comments: 6
Uploads: 0
Thank you!

First off Thank you SO MUCH for getting this working on 5.0.4!

Secondly this is not my original mod (I give full credit to whomever did) but I have altered it and have been trying without successful to update to function post 5.0.4. The Mod is to show the level + exp value to you for normal mobs and for Bosses, Rares, and Elites it would say that next to the name. If anyone has advice to get this working I would be incredible grateful. If I stab blinded at it and make it work I will post that too.


--------------------------------------------------------------------------
-- Target Hook (Rare/Elite/??)
--------------------------------------------------------------------------

oUF.TagEvents["customlevel"] = "UNIT_LEVEL"
oUF.Tags["customlevel"] = function(unit)
local tL
local c = UnitClassification(unit)
if c == "worldboss" then
tL = "Boss"
elseif c == "rare" then
tL = "Rare"
elseif c == "elite" then
tL = "Elite"
else
local plus = _TAGS['plus'](unit)
local level = _TAGS['level'](unit)
if(plus) then
tL = "Elite"
else
tL = level
end
end

local mylevel, ulevel, lvlcolor = UnitLevel("player"), UnitLevel(unit)
if ulevel < 1 then
lvlcolor = {1, 0, 0}
elseif (ulevel >= (mylevel + 5)) then
lvlcolor = {1, .10, .10}
elseif (ulevel >= (mylevel + 3)) then
lvlcolor = {1, .5, .25}
elseif (ulevel <= (mylevel - 9)) then
lvlcolor = {.7, .7, .7}
elseif (ulevel <= (mylevel - 3)) then
lvlcolor = {0.25, 0.75, 0.25}
elseif (ulevel <= (mylevel - 2)) then
lvlcolor = {1, 1, 0}
elseif (ulevel <= (mylevel + 2)) then
lvlcolor = {1, 1, 0}
else
lvlcolor = {0, 1, 0}
end

return ("|cFF%.2x%.2x%.2x%s|r"):format(lvlcolor[1] * 255, lvlcolor[2] * 255, lvlcolor[3] * 255, tL)
end

oUF_Hank_hooks.TargetName = {
sharedStyle = function(self, unit)
if unit == "target" then
self:Tag(self.name, "[customlevel] [statusName]")
end
end
}
edgarrin is offline Report comment to moderator  
Reply With Quote
Unread 08-31-12, 06:31 PM  
Central
A Kobold Labourer

Forum posts: 0
File comments: 5
Uploads: 0
Those of us that have still been using this layout really appreciate the work you've put into getting it going. Thank you!
Central is offline Report comment to moderator  
Reply With Quote
Unread 08-31-12, 12:37 PM  
gwyd
A Defias Bandit
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 22
Uploads: 1
Ok, I've zipped the correct directory this time and hopefully all is well.
gwyd is offline Report comment to moderator  
Reply With Quote
Unread 08-31-12, 06:35 AM  
gwyd
A Defias Bandit
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 22
Uploads: 1
Originally Posted by dc_roenfanz
Your updated version still isn't pulling from config. I pulled the zip just now, and the values are still hardcoded
You sir, are absolutely correct. I must have zipped the wrong files. I'm out of town this weekend (and at the airport atm) so I will try and get something up this weekend if I can, if not, Monday for sure.

In the mean time, just uncommenting what you showed there and deleting the other lines will work. Additionally, do the same for the lines just below it:

lua Code:
  1. -- for i = 1, MAX_BOSS_FRAMES do
  2. --  oUF:Spawn("boss" .. i, "oUF_boss" .. i):SetPoint("RIGHT", UIParent, cfg.BossFrameMargin[1], -55 * (i - 1) - cfg.BossFrameMargin[2])
  3. --  _G["oUF_boss" .. i]:SetScale(cfg.FrameScale * cfg.BossFrameScale)
  4. -- end
  5. for i = 1, MAX_BOSS_FRAMES do
  6.     oUF:Spawn("boss" .. i, "oUF_boss" .. i):SetPoint("RIGHT", UIParent, -45, -55 * (i - 1) - 130)
  7.     _G["oUF_boss" .. i]:SetScale(cfg.FrameScale * cfg.BossFrameScale)
  8. end
gwyd is offline Report comment to moderator  
Reply With Quote
Unread 08-30-12, 09:23 PM  
tweeeak
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Changes to allow resizing by config and life color changing

For some reason the function on custom_modifications.lua was not working very well. Dynamically changing color according to life level was not functional. The solution was to change hank_v3.lua, adding the code in red. I know, the solution is not pretty, but that is all my (lack of) skill allowed me to do.

-- This is where the magic happens. Handle health update, display digit textures
oUF_Hank.UpdateHealth = function(self)
local h, hMax

-- In vehicle
if self.unit == "player" and UnitHasVehicleUI("player") then
h, hMax = UnitHealth("pet"), UnitHealthMax("pet")
else
h, hMax = UnitHealth(self.unit), UnitHealthMax(self.unit)
end
-- AHDCH - Made color change together accordign to life level.
if UnitIsConnected(self.unit) and not UnitIsGhost(self.unit) and not UnitIsDead(self.unit) then
for i = 1, 4 do
self.healthFill[5 - i]:SetVertexColor(1 - h / hMax, h / hMax, 0)
--self.healthFill[5 - i]:SetVertexColor(h,h,h)
end
end


In addition, I'd recommend adding the following functions to your custom_modifications.lua. Makes it pretty when you select a player.



oUF.Tags.Methods["classColor"] = function(unit)
local color = RAID_CLASS_COLORS[select(2, UnitClass(unit))]
return ("FF%.2x%.2x%.2x"):format(color.r * 255, color.g * 255, color.b * 255)
end

oUF.Tags.Events["myperpp"]=oUF.Tags.Events["perpp"]

oUF.Tags.Methods["myperpp"] = function(u)
local m = UnitPowerMax(u)
local color = cfg.colors.power["MANA"] or cfg.colors.power["FUEL"]
if(m == 0) then
return 0
else
return ("|cFF%.2x%.2x%.2x%s|r"):format(color[1] * 255, color[2] * 255, color[3] * 255, math.floor(UnitPower(u)/m*100+.5))
end
end

--------------------------------------------------------------------------
-- Mana %
--------------------------------------------------------------------------

oUF_Hank_hooks.MyHealth = {
sharedStyle = function(self, unit)
if unit == "player" then self:Tag(self.power, "[myperpp]")
end
end,
}

--------------------------------------------------------------------------
-- Class colored ToT, TToT, ToF
--------------------------------------------------------------------------

oUF_Hank_hooks.ClassToT_etc = {
sharedStyle = function(self, unit)
if unit == "targettarget" or unit == "focustarget" then self:Tag(self.name, "|c[classColor][smartName] @ [perhp]%|r")
end
end,
}

--------------------------------------------------------------------------
-- Hide ToTT
--------------------------------------------------------------------------

oUF_Hank_hooks.HideFrames = {
sharedStyle = function(self, unit)
if unit == "targettargettarget" then
self:SetAttribute("initial-height", 1)
self:SetAttribute("initial-width", 1)
self:SetAlpha(0)
end
end,

Sorry if that is not the place for that. I just really loved your amazing work and the fact that I was able to recycle the old code I had stashed. I am hoping it can help somebody.

Cheers.
tweeeak is offline Report comment to moderator  
Reply With Quote
Unread 08-30-12, 06:47 PM  
dc_roenfanz
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 9
File comments: 38
Uploads: 3
Originally Posted by gwyd
Good catch. I had had to make some changes early on to what it loaded from config because of some bugs. After fixing the bugs, I forgot to make it pull from config again. It should be good to go now. If you are using oUF_MoveableFrames, I'm not sure how much of the config is respected because I haven't really looked into it.
Your updated version still isn't pulling from config. I pulled the zip just now, and the values are still hardcoded:

Lua Code:
  1. -- oUF:Spawn("player", "oUF_player"):SetPoint("RIGHT", UIParent, "CENTER", -cfg.FrameMargin[1], -cfg.FrameMargin[2])
  2. -- oUF:Spawn("pet", "oUF_pet"):SetPoint("BOTTOMRIGHT", oUF_player, "TOPRIGHT")
  3. -- oUF:Spawn("target", "oUF_target"):SetPoint("LEFT", UIParent, "CENTER", cfg.FrameMargin[1], -cfg.FrameMargin[2])
  4. -- oUF:Spawn("targettarget", "oUF_ToT"):SetPoint("BOTTOMLEFT", oUF_target, "TOPLEFT")
  5. -- oUF:Spawn("targettargettarget", "oUF_ToTT"):SetPoint("BOTTOMLEFT", oUF_ToT, "TOPLEFT")
  6. -- oUF:Spawn("focus", "oUF_focus"):SetPoint("CENTER", UIParent, "CENTER", -cfg.FocusFrameMargin[1], -cfg.FocusFrameMargin[2])
  7. -- oUF:Spawn("focustarget", "oUF_ToF"):SetPoint("BOTTOMLEFT", oUF_focus, "TOPLEFT", 0, 5)
  8. oUF:Spawn("player", "oUF_player"):SetPoint("CENTER", UIParent, -250, -135)
  9. oUF:Spawn("pet", "oUF_pet"):SetPoint("BOTTOMRIGHT", oUF_player, "TOPRIGHT")
  10. oUF:Spawn("target", "oUF_target"):SetPoint("CENTER", UIParent, 285, -135)
  11. oUF:Spawn("targettarget", "oUF_ToT"):SetPoint("BOTTOMLEFT", oUF_target, "TOPLEFT")
  12. oUF:Spawn("targettargettarget", "oUF_ToTT"):SetPoint("BOTTOMLEFT", oUF_ToT, "TOPLEFT")
  13. oUF:Spawn("focus", "oUF_focus"):SetPoint("LEFT", UIParent, 20, 26)
  14. oUF:Spawn("focustarget", "oUF_ToF"):SetPoint("BOTTOMLEFT", oUF_focus, "TOPLEFT", 0, 5)
dc_roenfanz is offline Report comment to moderator  
Reply With Quote
Unread 08-29-12, 05:15 PM  
gwyd
A Defias Bandit
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 22
Uploads: 1
Good catch. I had had to make some changes early on to what it loaded from config because of some bugs. After fixing the bugs, I forgot to make it pull from config again. It should be good to go now. If you are using oUF_MoveableFrames, I'm not sure how much of the config is respected because I haven't really looked into it.
gwyd is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: