fix function return for globalConditions
This commit is contained in:
@@ -1152,7 +1152,7 @@ local globalConditions =
|
|||||||
type = "bool",
|
type = "bool",
|
||||||
events = {"PLAYER_REGEN_ENABLED", "PLAYER_REGEN_DISABLED"},
|
events = {"PLAYER_REGEN_ENABLED", "PLAYER_REGEN_DISABLED"},
|
||||||
globalStateUpdate = function(state)
|
globalStateUpdate = function(state)
|
||||||
state.incombat = UnitAffectingCombat("player");
|
state.incombat = UnitAffectingCombat("player") == 1 and true or false;
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
["hastarget"] = {
|
["hastarget"] = {
|
||||||
@@ -1160,7 +1160,7 @@ local globalConditions =
|
|||||||
type = "bool",
|
type = "bool",
|
||||||
events = {"PLAYER_TARGET_CHANGED", "PLAYER_ENTERING_WORLD"},
|
events = {"PLAYER_TARGET_CHANGED", "PLAYER_ENTERING_WORLD"},
|
||||||
globalStateUpdate = function(state)
|
globalStateUpdate = function(state)
|
||||||
state.hastarget = UnitExists("target");
|
state.hastarget = UnitExists("target") == 1 and true or false;
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
["attackabletarget"] = {
|
["attackabletarget"] = {
|
||||||
@@ -1168,7 +1168,7 @@ local globalConditions =
|
|||||||
type = "bool",
|
type = "bool",
|
||||||
events = {"PLAYER_TARGET_CHANGED", "UNIT_FACTION"},
|
events = {"PLAYER_TARGET_CHANGED", "UNIT_FACTION"},
|
||||||
globalStateUpdate = function(state)
|
globalStateUpdate = function(state)
|
||||||
state.attackabletarget = UnitCanAttack("player", "target");
|
state.attackabletarget = UnitCanAttack("player", "target") == 1 and true or false;
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user