From 44612d52d09604947e253e137e0180b6df8f4ac9 Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 8 Jun 2020 22:17:38 +0200 Subject: [PATCH] libhealth: set default values as config fallback --- libs/libhealth.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/libhealth.lua b/libs/libhealth.lua index 13031284..4060557e 100644 --- a/libs/libhealth.lua +++ b/libs/libhealth.lua @@ -22,8 +22,8 @@ libhealth:SetScript("OnEvent", function() -- load enable state and set functions libhealth.enabled = pfUI_config["global"]["libhealth"] == "1" and true or nil - libhealth.reqhit = tonumber(pfUI_config["global"]["libhealth_hit"]) - libhealth.reqdmg = tonumber(pfUI_config["global"]["libhealth_dmg"]) * 100 + libhealth.reqhit = (tonumber(pfUI_config["global"]["libhealth_hit"]) or 4) + libhealth.reqdmg = (tonumber(pfUI_config["global"]["libhealth_dmg"]) or 0.5) * 100 end -- return as we're not supposed to be here