From ae0beddcca2b1a0d2462732b702e135c3e686a4e Mon Sep 17 00:00:00 2001 From: ck Date: Sun, 28 Jan 2024 22:01:14 -0600 Subject: [PATCH] Fix some self references? --- src/EventManager/EventManager.lua | 8 +++++++- src/Spell/Spell.lua | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/EventManager/EventManager.lua b/src/EventManager/EventManager.lua index 1e001a8..a35a4c1 100644 --- a/src/EventManager/EventManager.lua +++ b/src/EventManager/EventManager.lua @@ -9,7 +9,13 @@ local Tinkr, Bastion = ... ---@field wowEventHandlers table ---@field selfCombatEventHandlers table ---@field CombatEventHandlers table -local EventManager = {} +local EventManager = { + events = {}, + eventHandlers = {}, + wowEventHandlers = {}, + selfCombatEventHandlers = {}, + CombatEventHandlers = {}, +} EventManager.__index = EventManager -- Constructor diff --git a/src/Spell/Spell.lua b/src/Spell/Spell.lua index 901ff81..dbc52b8 100644 --- a/src/Spell/Spell.lua +++ b/src/Spell/Spell.lua @@ -35,6 +35,7 @@ local Tinkr, Bastion = ... ---@class Bastion.Spell ---@field auras table ---@field CastableIfFunc false | fun(self:Bastion.Spell):boolean +---@field conditions { [string]: { func: fun(self:Bastion.Spell):boolean } } ---@field damage number ---@field damageFormula false | fun(self:Bastion.Spell):number ---@field lastCastAt number | false @@ -91,10 +92,11 @@ function Spell:New(id) self.lastCastAt = false self.lastCastAttempt = false self.OnCastFunc = false + self.overrides = {} self.PostCastFunc = false + self.PreCastFunc = false self.release_at = false self.conditions = {} - self.overrides = {} self.spellID = id self.traits = { cast = {