Skip to content

Commit

Permalink
check before applying
Browse files Browse the repository at this point in the history
  • Loading branch information
eltreum0 committed Aug 6, 2022
1 parent 3e5fcc7 commit aab1643
Showing 1 changed file with 25 additions and 10 deletions.
35 changes: 25 additions & 10 deletions ElvUI_EltreumUI/Layouts/UpdateSettings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ function ElvUI_EltreumUI:UpdateSettings()
E.private.general.normTex = "Asphyxia-Norm"

--update to current hp method
if E.db["unitframe"]["units"]["player"]["customTexts"] and E.db["unitframe"]["units"]["player"]["customTexts"]["EltreumStatus"] then
if E.db["unitframe"]["units"]["player"]["customTexts"] and E.db["unitframe"]["units"]["player"]["customTexts"]["EltreumHealth"]then
E.db["unitframe"]["units"]["player"]["customTexts"]["EltreumHealth"]["text_format"] = "[eltruism:hpstatus{5,3}]"
E.db["unitframe"]["units"]["target"]["customTexts"]["EltreumTargetHealth"]["text_format"] = "[eltruism:hpstatus{5,3}]"
E.db["unitframe"]["units"]["targettarget"]["customTexts"]["EltreumTargetTargetHealth"]["text_format"] = "[eltruism:hpstatusnopc{5,3}]"
Expand All @@ -188,16 +188,31 @@ function ElvUI_EltreumUI:UpdateSettings()
E.db["unitframe"]["units"]["raid40"]["customTexts"]["EltreumRaid40Health"]["text_format"] = "[eltruism:hpstatusnopc{5,3}]"
E.db["unitframe"]["units"]["party"]["customTexts"]["EltreumPartyHealth"]["text_format"] = "[eltruism:hpstatusnopc{5,3}]"

E.db["unitframe"]["units"]["player"]["customTexts"]["EltreumStatus"]["enable"] = false
E.db["unitframe"]["units"]["target"]["customTexts"]["EltreumStatus"]["enable"] = false
E.db["unitframe"]["units"]["targettarget"]["customTexts"]["EltreumStatus"]["enable"] = true
E.db["unitframe"]["units"]["targettarget"]["customTexts"]["EltreumTargetTargetHealth"]["enable"] = false
E.db["unitframe"]["units"]["party"]["customTexts"]["EltreumStatus"]["enable"] = false
E.db["unitframe"]["units"]["raid40"]["customTexts"]["EltreumStatus"]["enable"] = false
E.db["unitframe"]["units"]["raid"]["customTexts"]["EltreumStatus"]["enable"] = false
E.db["unitframe"]["units"]["arena"]["customTexts"]["EltreumStatus"]["enable"] = false
if E.db["unitframe"]["units"]["player"]["customTexts"]["EltreumStatus"] then
E.db["unitframe"]["units"]["player"]["customTexts"]["EltreumStatus"]["enable"] = false
end
if E.db["unitframe"]["units"]["target"]["customTexts"]["EltreumStatus"] then
E.db["unitframe"]["units"]["target"]["customTexts"]["EltreumStatus"]["enable"] = false
end
if E.db["unitframe"]["units"]["targettarget"]["customTexts"]["EltreumStatus"] then
E.db["unitframe"]["units"]["targettarget"]["customTexts"]["EltreumStatus"]["enable"] = true
end
if E.db["unitframe"]["units"]["party"]["customTexts"]["EltreumStatus"] then
E.db["unitframe"]["units"]["party"]["customTexts"]["EltreumStatus"]["enable"] = false
end
if E.db["unitframe"]["units"]["targettarget"]["customTexts"]["EltreumTargetTargetHealth"] then
E.db["unitframe"]["units"]["targettarget"]["customTexts"]["EltreumTargetTargetHealth"]["enable"] = false
end
if E.db["unitframe"]["units"]["raid40"]["customTexts"]["EltreumStatus"] then
E.db["unitframe"]["units"]["raid40"]["customTexts"]["EltreumStatus"]["enable"] = false
end
if E.db["unitframe"]["units"]["raid"]["customTexts"]["EltreumStatus"] then
E.db["unitframe"]["units"]["raid"]["customTexts"]["EltreumStatus"]["enable"] = false
end
if E.db["unitframe"]["units"]["arena"]["customTexts"]["EltreumStatus"] then
E.db["unitframe"]["units"]["arena"]["customTexts"]["EltreumStatus"]["enable"] = false
end
end


ElvUI_EltreumUI:Print(L["Settings for Eltruism were applied."])
end

0 comments on commit aab1643

Please sign in to comment.