Download
(283Kb)
Download
Updated: 10-27-22 05:31 PM
Compatibility:
Dragonflight Pre-patch (10.0.0)
Updated:10-27-22 05:31 PM
Created:08-28-12 08:53 PM
Downloads:20,928
Favorites:40
MD5:

oUF Hank Fan Update  Popular! (More than 5000 hits)

Version: 10.0.1
by: gwyd [More]

This is an update of Hank's oUF_Hank addon for WoW 10.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 trying to keep it running.

== 7.0.0
Compatibility with legion

== 6.0.2
Added a 6th chi class icon when needed
Latency calculation fix for castbar

== 6.0.1
Fixed backgrounds showing for class icons
Fixed animations for players without class icons (low level paly, non-spriest)
Removed animations for eclipse bar (this is a temporary fix to make the addon work for druids, but more work is still needed)
Experimental: added support for auras on player frame

== 6.0
Updated for WoD
Moved combo points to player frame

== 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
352kB
09-27-12 10:26 AM
Patch


Post A Reply Comment Options
Unread 08-28-12, 10:13 PM  
azguz
A Murloc Raider

Forum posts: 8
File comments: 66
Uploads: 0
You are awesome. This is one of my favorite unit frames.
Report comment to moderator  
Reply With Quote
Unread 08-28-12, 11:12 PM  
TwystNeko
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
minor change to disable Rune bar for DKs

Since I want to use this addon, but don't want to delve deep into the code to try and track down the failure, I figured out how to make the Runebar toggleable.

in config.lua at line 265, put
Lua Code:
  1. RuneBarActive = false,

And change line 837 of hank_v3.lua to:
Lua Code:
  1. if unit == "player" and select(2, UnitClass("player")) == "DEATHKNIGHT" and cfg.RuneBarActive then
Report comment to moderator  
Reply With Quote
Unread 08-29-12, 06:27 AM  
gwyd
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 10
File comments: 47
Uploads: 1
Something brought up in the other thread is that if you have code in custom_modifications.lua that uses Tags, they have change (very slightly).

Use Tags.Events and Tags.Methods instead of TagEvents and Tags, respectively.
Report comment to moderator  
Reply With Quote
Unread 08-29-12, 04:18 PM  
Central
A Kobold Labourer

Forum posts: 0
File comments: 5
Uploads: 0
I'll start posting my updates here opposed to the other. Thanks for the note about the changes to tags, I have dug through the ouf documentation and must have missed that. Currently there are still a few issues, the settings in config.lua regarding placement on screen don't appear to be working:

Code:
-- Scale of all frames (1.0 = 100%)
FrameScale = 0.95,
-- Focus frame scale (size of focus frame = FrameScale * FocusFrameScale)
FocusFrameScale = 0.7,
-- Margin for player / target frames (x, y from the center of the screen)
FrameMargin = {125, 200},
-- Vertical margin for focus frame (from the center of the screen)
FocusFrameMarginY = -700,
-- Margin for boss frames (x, y from the right edge)
BossFrameMargin = {-10, -400},
No matter what I change these values to, the frames don't move. I was able to move them with ouf_moveableframes, but since the gui for that isn't working I'm not getting them placed perfect.

Apart from this, it looks like everything else is working. I'll keep you posted if I find anything else.
Report comment to moderator  
Reply With Quote
Unread 08-29-12, 05:15 PM  
gwyd
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 10
File comments: 47
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.
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)
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.
Report comment to moderator  
Reply With Quote
Unread 08-31-12, 06:35 AM  
gwyd
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 10
File comments: 47
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
Report comment to moderator  
Reply With Quote
Unread 08-31-12, 12:37 PM  
gwyd
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 10
File comments: 47
Uploads: 1
Ok, I've zipped the correct directory this time and hopefully all is well.
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!
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
}
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"
Report comment to moderator  
Reply With Quote
Unread 09-04-12, 01:20 PM  
Irongunner
A Deviate Faerie Dragon

Forum posts: 11
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.
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.
Report comment to moderator  
Reply With Quote
Unread 09-05-12, 12:44 PM  
gwyd
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 10
File comments: 47
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)?
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: