Hey everybody!
Since energy- and focus-tags are to slow updated (for me), I want to increase the updatefrequency, found "power.frequentUpdates" in oUF -> Elements -> power.lua
So, my question, where do i need to cut it in to work? I've really no clue, but regarding to oUF@GitHub it needs to be placed in "Initialisation"...
Here's everything thats belongs to power:
tags.lua
Code:
oUF.Tags['fauli:power'] = function(u)
local min, max = UnitPower(u), UnitPowerMax(u)
if min~=max then
return SVal(min).."/"..SVal(max)
else
return SVal(max)
end
end
oUF.TagEvents['fauli:power'] = 'UNIT_POWER UNIT_MAXPOWER'
lib.lua
Code:
if self.mystyle == "player" or self.mystyle == "target" then
local mp = setFont(self.Health, cfg.font, 12, "NONE", retVal(self,2,2,1))
mp:SetPoint("BOTTOMRIGHT", self.Health, "BOTTOMRIGHT", -1, 1, retVal(self,-2,-2,-1), retVal(self,-3,-1,-11))
mp:SetJustifyH("RIGHT")
self:Tag(mp, "[fauli:color][fauli:power]")
end
core.lua
Code:
target = function(self)
-- unit
self.mystyle = "target"
lib.addHealthBar(self)
lib.addPowerBar(self)
-- framesize
self:SetScale(cfg.frameScale)
self:SetWidth(250)
self:SetHeight(58)
-- healthbar/powerbar
self.Health:SetPoint('TOPLEFT', self, 'TOPLEFT', 0, 0)
self.Health:SetSize(250, 32)
self.Health:SetStatusBarColor(unpack(cfg.healthBarColor))
self.Health.bg:SetVertexColor(unpack(cfg.healthBgColor))
self.Power:SetPoint('BOTTOMLEFT', self, 'BOTTOMLEFT', 0, 0)
self.Power:SetSize(250, 20)
self.Power.colorTapping = true
self.Power.colorDisconnected = true
self.Power.colorHappiness = false
self.Power.colorReaction = false
self.Power.colorPower = true
self.Power.bg.multiplier = 0.3
local myBar = CreateFrame("Statusbar", nil, self.Health)
myBar:SetWidth(self.Health:GetWidth())
myBar:SetStatusBarTexture(cfg.statusBarTexture)
myBar:SetStatusBarColor(0, 1, 0, 0.5)
myBar:SetPoint("TOPLEFT", self.Health:GetStatusBarTexture(), "TOPRIGHT", 0, 0)
myBar:SetPoint("BOTTOMLEFT", self.Health:GetStatusBarTexture(), "BOTTOMRIGHT", 0, 0)
myBar:SetFrameLevel(1)
local otherBar = CreateFrame("Statusbar", nil, self.Health)
otherBar:SetWidth(self.Health:GetWidth())
otherBar:SetStatusBarTexture(cfg.statusBarTexture)
otherBar:SetStatusBarColor(0, 1, 0, 0.5)
otherBar:SetPoint("TOPLEFT", myBar:GetStatusBarTexture(), "TOPRIGHT", 0, 0)
otherBar:SetPoint("BOTTOMLEFT", myBar:GetStatusBarTexture(), "BOTTOMRIGHT", 0, 0)
otherBar:SetFrameLevel(1)
self.HealPrediction = {
myBar = myBar,
otherBar = otherBar,
maxOverflow = 1.05 -- means 5 % overflow
}
lib.addTextTags(self, 17)
lib.addIcons(self)
lib.addCastBar(self, true)
end,
pet = function(self)
-- unit
self.mystyle = "pet"
lib.addHealthBar(self)
lib.addPowerBar(self)
-- framesize
self:SetScale(cfg.frameScale)
self:SetWidth(120)
self:SetHeight(21)
-- healthbar/powerbar
self.Health:SetPoint('TOPLEFT', self, 'TOPLEFT', 0, 0)
self.Health:SetSize(self:GetWidth(), self:GetHeight())
self.Health:SetStatusBarColor(unpack(cfg.healthBarColor))
self.Health.bg:SetVertexColor(unpack(cfg.healthBgColor))
self.Power:SetPoint('BOTTOM', self, 'BOTTOM', 0, 3)
self.Power:SetSize(self:GetWidth()-7, 2)
self.Power:SetStatusBarColor(1, 1, 1)
self.Power.bg:SetVertexColor(1, 1, 1, 0.6)
lib.addTextTags(self, 12)
lib.addIcons(self)
end,
So, where goes the magic "power.frequentUpdates = 0.1"?
Greetings, Faultier