diff --git a/src/APL/APL.lua b/src/APL/APL.lua index 6de3bc3..209f217 100644 --- a/src/APL/APL.lua +++ b/src/APL/APL.lua @@ -231,7 +231,7 @@ end -- Add an item to the APL ---@param item Item ----@param condition fun(...):boolean +---@param condition? fun(...):boolean ---@return APLActor function APL:AddItem(item, condition) local usableFunc = item.UsableIfFunc @@ -268,8 +268,8 @@ end -- Execute the APL function APL:Execute() for _, actor in ipairs(self.apl) do - if actor:HasTraits() and actor:Evaluate() then - if actor:Execute() then + if actor:HasTraits() then + if actor:Evaluate() and actor:Execute() then break end else diff --git a/src/Spell/Spell.lua b/src/Spell/Spell.lua index f4a5e19..824cb60 100644 --- a/src/Spell/Spell.lua +++ b/src/Spell/Spell.lua @@ -161,7 +161,7 @@ end -- Cast the spell ---@param unit Unit ----@param condition string|function +---@param condition? string|function ---@return boolean function Spell:Cast(unit, condition) if condition then @@ -317,9 +317,9 @@ function Spell:GetWasLooking() end -- Click the spell ----@param x number ----@param y number ----@param z number +---@param x number|Vector3 +---@param y? number +---@param z? number ---@return boolean function Spell:Click(x, y, z) if type(x) == 'table' then