From 8129729f8480409fd2b3fcb93c14f9983386400c Mon Sep 17 00:00:00 2001 From: Bunny67 Date: Sun, 7 Jun 2020 23:51:54 +0300 Subject: [PATCH] fix function return for globalConditions --- WeakAuras/WeakAuras.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua index bf45219..829c415 100644 --- a/WeakAuras/WeakAuras.lua +++ b/WeakAuras/WeakAuras.lua @@ -1152,7 +1152,7 @@ local globalConditions = type = "bool", events = {"PLAYER_REGEN_ENABLED", "PLAYER_REGEN_DISABLED"}, globalStateUpdate = function(state) - state.incombat = UnitAffectingCombat("player"); + state.incombat = UnitAffectingCombat("player") == 1 and true or false; end }, ["hastarget"] = { @@ -1160,7 +1160,7 @@ local globalConditions = type = "bool", events = {"PLAYER_TARGET_CHANGED", "PLAYER_ENTERING_WORLD"}, globalStateUpdate = function(state) - state.hastarget = UnitExists("target"); + state.hastarget = UnitExists("target") == 1 and true or false; end }, ["attackabletarget"] = { @@ -1168,7 +1168,7 @@ local globalConditions = type = "bool", events = {"PLAYER_TARGET_CHANGED", "UNIT_FACTION"}, globalStateUpdate = function(state) - state.attackabletarget = UnitCanAttack("player", "target"); + state.attackabletarget = UnitCanAttack("player", "target") == 1 and true or false; end }, }