From 02bb76792afad1447b759d118cfc69faa6f0e57c Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Sat, 22 Apr 2017 01:16:19 +0200 Subject: [PATCH] Improve documentation in newly added methods in SET_GROUP, correct faulty logic in SET_GROUP:AnyPartlyInZone() --- Moose Development/Moose/Core/Set.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Moose Development/Moose/Core/Set.lua b/Moose Development/Moose/Core/Set.lua index ddb6773da..aed86b81b 100644 --- a/Moose Development/Moose/Core/Set.lua +++ b/Moose Development/Moose/Core/Set.lua @@ -1001,16 +1001,15 @@ function SET_GROUP:AnyCompletelyInZone(Zone) return false end - --- Iterate the SET_GROUP and return true if at least one least one @{#UNIT} of one @{GROUP} of the @{SET_GROUP} is in @{ZONE} -- @param #SET_GROUP self -- @param Core.Zone#ZONE ZoneObject The Zone to be tested for. --- @return #boolean true if at least one of the @{Wrapper.Group#GROUP} is completly inside the @{Core.Zone#ZONE}, false otherwise. +-- @return #boolean true if at least one of the @{Wrapper.Group#GROUP} is partly or completly inside the @{Core.Zone#ZONE}, false otherwise. function SET_GROUP:AnyPartlyInZone(Zone) self:F2(Zone) local Set = self:GetSet() for GroupID, GroupData in pairs(Set) do -- For each GROUP in SET_GROUP - if GroupData:IsPartlyInZone(Zone) then + if GroupData:IsPartlyInZone(Zone) or GroupData:IsCompletelyInZone(Zone) then return true end end @@ -1020,7 +1019,7 @@ end --- Iterate the SET_GROUP and return true if no @{GROUP} of the @{SET_GROUP} is in @{ZONE} -- @param #SET_GROUP self -- @param Core.Zone#ZONE ZoneObject The Zone to be tested for. --- @return #boolean true if at least one of the @{Wrapper.Group#GROUP} is completly inside the @{Core.Zone#ZONE}, false otherwise. +-- @return #boolean true if no @{Wrapper.Group#GROUP} is inside the @{Core.Zone#ZONE} in any way, false otherwise. function SET_GROUP:NoneInZone(Zone) self:F2(Zone) local Set = self:GetSet()