From 8e5268229a44c8bca2453ca64fcb89ad508d8331 Mon Sep 17 00:00:00 2001 From: LyLo Date: Fri, 25 Aug 2023 19:30:46 -0400 Subject: [PATCH 1/3] Bug Fix on APL traits --- src/APL/APL.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 From 15920cecb3ffe1e30c2bc0da1bfe4a30cc517b4c Mon Sep 17 00:00:00 2001 From: LyLo Date: Tue, 29 Aug 2023 18:53:07 -0400 Subject: [PATCH 2/3] Typing fix --- src/Spell/Spell.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 From b43166be76d1ab68ea6eadaee3197c29f2c7f9a2 Mon Sep 17 00:00:00 2001 From: 4n0n <4n0n@tinkr.site> Date: Thu, 31 Aug 2023 16:44:11 -0500 Subject: [PATCH 3/3] Era --- src/AuraTable/AuraTable.lua | 12 ++++++------ src/Unit/Unit.lua | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/AuraTable/AuraTable.lua b/src/AuraTable/AuraTable.lua index b7e7a2c..3874e05 100644 --- a/src/AuraTable/AuraTable.lua +++ b/src/AuraTable/AuraTable.lua @@ -118,7 +118,7 @@ end -- Get a units buffs ---@return nil function AuraTable:GetUnitBuffs() - if Tinkr.classic then + if Tinkr.classic or Tinkr.era then for i = 1, 40 do local aura = Bastion.Aura:New(self.unit, i, 'HELPFUL') @@ -157,7 +157,7 @@ end -- Get a units debuffs ---@return nil function AuraTable:GetUnitDebuffs() - if Tinkr.classic then + if Tinkr.classic or Tinkr.era then for i = 1, 40 do local aura = Bastion.Aura:New(self.unit, i, 'HARMFUL') @@ -279,7 +279,7 @@ function AuraTable:Find(spell) if a:IsUp() then -- Handle expired and non refreshed dropoffs not coming in UNIT_AURA return a else - if not Tinkr.classic then + if not Tinkr.classic or Tinkr.era then self:RemoveInstanceID(a:GetAuraInstanceID()) end end @@ -305,7 +305,7 @@ function AuraTable:FindMy(spell) if a:IsUp() then -- Handle expired and non refreshed dropoffs not coming in UNIT_AURA return a else - if not Tinkr.classic then + if not Tinkr.classic or Tinkr.era then self:RemoveInstanceID(a:GetAuraInstanceID()) end end @@ -334,7 +334,7 @@ function AuraTable:FindFrom(spell, source) return a end else - if not Tinkr.classic then + if not Tinkr.classic or Tinkr.era then self:RemoveInstanceID(a:GetAuraInstanceID()) end end @@ -362,7 +362,7 @@ function AuraTable:FindTheirs(spell) return a end else - if not Tinkr.classic then + if not Tinkr.classic or Tinkr.era then self:RemoveInstanceID(a:GetAuraInstanceID()) end end diff --git a/src/Unit/Unit.lua b/src/Unit/Unit.lua index 581a964..d9cd4ef 100644 --- a/src/Unit/Unit.lua +++ b/src/Unit/Unit.lua @@ -596,7 +596,7 @@ end ---@param unit Unit | nil ---@return number function Unit:GetComboPoints(unit) - if Tinkr.classic then + if Tinkr.classic or Tinkr.era then if not unit then return 0 end @@ -607,7 +607,7 @@ end ---@return number function Unit:GetComboPointsMax() - if Tinkr.classic then + if Tinkr.classic or Tinkr.era then return 5 end return UnitPowerMax(self:GetOMToken(), 4) @@ -617,7 +617,7 @@ end ---@param unit Unit | nil ---@return number function Unit:GetComboPointsDeficit(unit) - if Tinkr.classic then + if Tinkr.classic or Tinkr.era then return self:GetComboPointsMax() - self:GetComboPoints(unit) end return self:GetComboPointsMax() - self:GetComboPoints()