diff --git a/Libs/DF/definitions.lua b/Libs/DF/definitions.lua index b9760f654..fb172eef1 100644 --- a/Libs/DF/definitions.lua +++ b/Libs/DF/definitions.lua @@ -177,6 +177,8 @@ ---@field IsShadowlandsWow fun():boolean ---@field IsDragonflightWow fun():boolean ---@field IsWarWow fun():boolean +---@field IsTWWWow fun():boolean +---@field ExpansionHasAugEvoker fun():boolean ---@field LoadSpellCache fun(self:table, hashMap:table, indexTable:table, allSpellsSameName:table) : hashMap:table, indexTable:table, allSpellsSameName:table load all spells in the game and add them into the passed tables ---@field UnloadSpellCache fun(self:table) wipe the table contents filled with LoadSpellCache() ---@field GetCurrentClassName fun(self:table) : string return the name of the class the player is playing diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index 874ec6257..93c9a7d3d 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -187,6 +187,9 @@ function DF.IsWarWow() return false end +function DF.IsTWWWow() + return DF.IsWarWow() +end ---return true if the player is playing in the WotLK version of wow with the retail api ---@return boolean @@ -199,6 +202,10 @@ function DF.IsNonRetailWowWithRetailAPI() end DF.IsWotLKWowWithRetailAPI = DF.IsNonRetailWowWithRetailAPI -- this is still in use +function DF.ExpansionHasAugEvoker() + return DF.IsDragonflightWow() or DF.IsWarWow() +end + ---for classic wow, get the role using the texture from the talents frame local roleBySpecTextureName = { DruidBalance = "DAMAGER", diff --git a/functions/spec_augmentation.lua b/functions/spec_augmentation.lua index 91a383957..9e231bc34 100644 --- a/functions/spec_augmentation.lua +++ b/functions/spec_augmentation.lua @@ -3,6 +3,9 @@ local addonName, Details222 = ... local Details = Details local _ +---@type detailsframework +local detailsFramework = DetailsFramework + local CONST_SPELLID_EBONMIGHT = 395152 local CONST_SPELLID_SS = 413984 local CONST_SPELLID_PRESCIENCE = 410089 @@ -44,6 +47,11 @@ end local eventListener = Details:CreateEventListener() --eventListener:RegisterEvent("COMBAT_PLAYER_ENTER") eventListener:RegisterEvent("COMBAT_PLAYER_LEAVING", function(eventName, combatObject) + --check if the expansion the player is playing has the augmentation evokers + if (not detailsFramework.ExpansionHasAugEvoker()) then + return + end + --close the time on the current amount of prescience stacks the evoker have ---@type combat local combat = Details:GetCurrentCombat()