diff --git a/HealBot.lua b/HealBot.lua index 7a2214a..a8bcad5 100644 --- a/HealBot.lua +++ b/HealBot.lua @@ -6,10 +6,7 @@ local _scale=0; local CalcEquipBonus=false; -local InitCalcEquipBonus=false; -local FlagEquipUpdate1=1; -local FlagEquipUpdate2=1; -local NeedEquipUpdate=0; +local HealBot_EquipChangeTimer = 0; local HealValue=0; local InitSpells=1; local DebugDebuff=false; @@ -734,39 +731,23 @@ function HealBot_OnUpdate(this,arg1) HealBot_HealsIn={}; HealBot_Healers={}; HealsIn_Timer=0; - InitCalcEquipBonus=true end - if FlagEquipUpdate1>0 and FlagEquipUpdate2>0 then - FlagEquipUpdate1=0; - FlagEquipUpdate2=0; - NeedEquipUpdate=1; - elseif FlagEquipUpdate1>0 then - FlagEquipUpdate1=FlagEquipUpdate1+1; - if FlagEquipUpdate1>1 then - FlagEquipUpdate1=0; - end - elseif FlagEquipUpdate2>0 then - FlagEquipUpdate2=FlagEquipUpdate2+1; - if FlagEquipUpdate2>1 then - FlagEquipUpdate2=0; - end - end - if NeedEquipUpdate>0 and InitCalcEquipBonus then - NeedEquipUpdate=NeedEquipUpdate+1; - if NeedEquipUpdate>1 then + + if HealBot_EquipChangeTimer > 0 then + HealBot_EquipChangeTimer = HealBot_EquipChangeTimer - arg1 + if HealBot_EquipChangeTimer <= 0 then + HealBot_EquipChangeTimer = 0 HealBot_BonusScanner:ScanEquipment() CalcEquipBonus=true; - InitCalcEquipBonus=false; - NeedEquipUpdate=0; - HealBot_RecalcSpells(); - end + HealBot_RecalcSpells(); + end end + if InitSpells>1 then InitSpells=InitSpells+1; if InitSpells>2 then local cnt=HealBot_InitSpells(); InitSpells=0; - InitCalcEquipBonus=true; end end if Delay_RecalcParty>0 then @@ -1233,12 +1214,12 @@ function HealBot_OnEvent_PartyMemberEnable(this,unit) end function HealBot_OnEvent_PlayerEquipmentChanged(this) - FlagEquipUpdate1=1; + HealBot_EquipChangeTimer = 1; end function HealBot_OnEvent_PlayerEquipmentChanged2(this,unit) if unit=="player" then - FlagEquipUpdate2=1; + HealBot_EquipChangeTimer = 1; end end @@ -1253,7 +1234,7 @@ function HealBot_OnEvent_TalentsChanged(this, arg1) end function HealBot_OnEvent_BagUpdate(this,bag) - if FlagEquipUpdate1==0 and FlagEquipUpdate2==0 then + if HealBot_EquipChangeTimer==0 then HealBot_RecalcSpells(); end end @@ -1261,7 +1242,7 @@ end function HealBot_OnEvent_BagUpdateCooldown(this,bag) if not bag then bag = "undef" - elseif FlagEquipUpdate1==0 and FlagEquipUpdate2==0 then + elseif HealBot_EquipChangeTimer==0 then HealBot_RecalcSpells(); end end diff --git a/HealBot_Action.lua b/HealBot_Action.lua index 6625968..53c9ab1 100644 --- a/HealBot_Action.lua +++ b/HealBot_Action.lua @@ -3,7 +3,7 @@ function HealBot_Action_SetTexture(bar, btexture) if btexture == 10 then bar:SetStatusBarTexture("Interface\\Buttons\\WHITE8X8"); else - HealBot_Action_SetTexture(bar, btexture); + bar:SetStatusBarTexture("Interface\\TargetingFrame\\UI-StatusBar"); end end local headerno=0; @@ -205,6 +205,7 @@ function HealBot_Action_EnableButton(button) bar3:SetMinMaxValues(0, state.maxMana) bar3:SetValue(state.mana) bar3:SetStatusBarColor(pr, pg, pb, HealBot_Config.Barcola[HealBot_Config.Current_Skin]) + HealBot_Action_SetTexture(bar3, HealBot_Config.btexture[HealBot_Config.Current_Skin]) bar3:Show() bar3:SetHeight(bheight * 0.2) end @@ -714,8 +715,9 @@ if not HealBot_IsFighting then numBars=numBars-1; end - OffsetY = 10; - OffsetX = 10; + local bpadding = (HealBot_Config.bpadding and HealBot_Config.bpadding[HealBot_Config.Current_Skin]) or 10 + OffsetY = bpadding; + OffsetX = bpadding; MaxOffsetY=0; if cols>(numBars-numHeaders) then @@ -738,7 +740,7 @@ if not HealBot_IsFighting then if h==ceil((numBars)/cols) and z + + + + + + + + + + + getglobal(this:GetName().."Text"):SetText("For Healers Only"); + this:SetChecked(HealBot_Config.ManaBarsHealersOnly); + + + if (this:GetChecked()) then + HealBot_Config.ManaBarsHealersOnly = 1; + else + HealBot_Config.ManaBarsHealersOnly = 0; + end + HealBot_Action_Refresh(); + + + @@ -1710,6 +1733,38 @@ HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINBCSPACE,0,25) HealBot_Options_BarBCSpaceS_OnValueChanged(this) + + + + + + + + + + + + + + HealBot_Options_val_OnLoad(this,"Frame Padding",0,50) + HealBot_Options_FramePaddingS_OnValueChanged(this) + + + + + + + + + + + + + + + HealBot_Options_val_OnLoad(this,"Solid Border",1,10) + HealBot_Options_BorderThicknessS_OnValueChanged(this) +