Modcraft - The community dedicated to quality WoW modding!
Wrath of the Lich King Modding => Miscellaneous => Topic started by: Daweo on July 10, 2014, 08:10:37 pm
-
Hi, Modcraft.
I have problem with changing my player power regeneration. I set the energy as main power and disable regeneration in config and core then too. Energy doesnt regenerate, but ingame the GUI still show regeneration.
For example I have only 10 energy, but GUI show regen up to maximum of 100. When You want to cast spell uses energy it will show you error text. I think, that this is coded somewhere in LUA, but I cant find it.
Is there somebody who has an experience with, please?
-
Hi, Modcraft.
I have problem with changing my player power regeneration. I set the energy as main power and disable regeneration in config and core then too. Energy doesnt regenerate, but ingame the GUI still show regeneration.
For example I have only 10 energy, but GUI show regen up to maximum of 100. When You want to cast spell uses energy it will show you error text. I think, that this is coded somewhere in LUA, but I cant find it.
Is there somebody who has an experience with, please?
It is handled in FrameXMLAlternatePowerBar.lua
-
Thank You very much... :)
-
But,
this file only handles additional Mana bar. Not the power (previously Mana) bar, which is replaced with new power (Energy).
I tried to find something in FrameXML/PlayerFrame.lua but I am not good at Lua so much...
-
Hmm, in UnitFrame.lua:
function UnitFrameManaBar_OnUpdate(self)
if ( not self.disconnected and not self.lockValues ) then
local currValue = UnitPower(self.unit, self.powerType);
if ( currValue ~= self.currValue ) then
self:SetValue(currValue);
self.currValue = currValue;
TextStatusBar_UpdateTextString(self);
end
end
end
function UnitFrameManaBar_Update(statusbar, unit)
if ( not statusbar or statusbar.lockValues ) then
return;
end
if ( unit == statusbar.unit ) then
-- be sure to update the power type before grabbing the max power!
UnitFrameManaBar_UpdateType(statusbar);
local maxValue = UnitPowerMax(unit, statusbar.powerType);
statusbar:SetMinMaxValues(0, maxValue);
statusbar.disconnected = not UnitIsConnected(unit);
if ( statusbar.disconnected ) then
statusbar:SetValue(maxValue);
statusbar.currValue = maxValue;
if ( not statusbar.lockColor ) then
statusbar:SetStatusBarColor(0.5, 0.5, 0.5);
end
else
local currValue = UnitPower(unit, statusbar.powerType);
statusbar:SetValue(currValue);
statusbar.currValue = currValue;
end
end
TextStat
Try changing this. Pretty sure it is it.
Also while taking a peek I found this comment:
-- Mmmm, runic Power Bars, my favorite kind. Tastes like Death Knnigget.
Really. Game devs make such lame jokes.
-
I have the same problem, have you find any solution so far, Daweo?