Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Modules/Config/Config.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
local ECS = ECS
local ECSLoader = ECSLoader
local insert = table.insert
local LibStub = LibStub
local ReloadUI = ReloadUI

------------------------------------------------------------------
-- Modules
------------------------------------------------------------------
Expand Down Expand Up @@ -35,7 +41,7 @@ function Config.CreateWindow()
configFrame:Hide();

ECSConfigFrame = configFrame.frame;
table.insert(UISpecialFrames, "ECSConfigFrame");
insert(UISpecialFrames, "ECSConfigFrame");
end

_CreateGUI = function()
Expand Down
8 changes: 6 additions & 2 deletions Modules/Config/DefenseSection.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
local ECSLoader = ECSLoader
local IsClassic = ECS.IsClassic
local IsSpellKnown = C_SpellBook.IsSpellKnown

---@class Config
local Config = ECSLoader:ImportModule("Config")
local _Config = Config.private
Expand Down Expand Up @@ -113,7 +117,7 @@ function _Config:LoadDefenseSection()
name = function() return i18n("Defense Rating") end,
desc = function() return i18n("Shows/Hides the defense rating.") end,
width = 1.5,
hidden = function() return ECS.IsClassic end,
hidden = function() return IsClassic end,
disabled = function() return (not ExtendedCharacterStats.profile.defense.display); end,
get = function () return ExtendedCharacterStats.profile.defense.defenseRating.display; end,
set = function (_, value)
Expand Down Expand Up @@ -195,7 +199,7 @@ function _Config:LoadDefenseSection()
name = function() return i18n("Resilience") end,
desc = function() return i18n("Shows/Hides the resilience value.") end,
width = 1.5,
hidden = function() return ECS.IsClassic end,
hidden = function() return IsClassic end,
disabled = function() return (not ExtendedCharacterStats.profile.defense.display); end,
get = function () return ExtendedCharacterStats.profile.defense.resilienceRating.display; end,
set = function (_, value)
Expand Down
2 changes: 2 additions & 0 deletions Modules/Config/GeneralSection.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local ECSLoader = ECSLoader

---@class Config
local Config = ECSLoader:ImportModule("Config")
local _Config = Config.private
Expand Down
3 changes: 3 additions & 0 deletions Modules/Config/ManaSection.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
local ECSLoader = ECSLoader
local UnitHasMana = UnitHasMana

---@class Config
local Config = ECSLoader:ImportModule("Config")
local _Config = Config.private
Expand Down
23 changes: 14 additions & 9 deletions Modules/Config/MeleeSection.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
local CanDualWield = CanDualWield
local ECSLoader = ECSLoader
local IsClassic = ECS.IsClassic
local IsWotlk = ECS.IsWotlk

---@class Config
local Config = ECSLoader:ImportModule("Config")
local _Config = Config.private
Expand Down Expand Up @@ -59,7 +64,7 @@ function _Config:LoadMeleeSection()
name = function() return i18n("Armor Pen.") end,
desc = function() return i18n("Shows/Hides the armor penetration value.") end,
width = 1.5,
hidden = function() return ECS.IsClassic end,
hidden = function() return IsClassic end,
disabled = function() return (not ExtendedCharacterStats.profile.melee.display); end,
get = function () return ExtendedCharacterStats.profile.melee.penetration.display; end,
set = function (_, value)
Expand All @@ -73,7 +78,7 @@ function _Config:LoadMeleeSection()
name = function() return i18n("Armor Pen. Rating") end,
desc = function() return i18n("Shows/Hides the armor penetration rating value.") end,
width = 1.5,
hidden = function() return not ECS.IsWotlk end,
hidden = function() return not IsWotlk end,
disabled = function() return (not ExtendedCharacterStats.profile.melee.display); end,
get = function () return ExtendedCharacterStats.profile.melee.penetrationRating.display; end,
set = function (_, value)
Expand All @@ -87,7 +92,7 @@ function _Config:LoadMeleeSection()
name = function() return i18n("Expertise") end,
desc = function() return i18n("Shows/Hides the expertise value.") end,
width = 1.5,
hidden = function() return ECS.IsClassic end,
hidden = function() return IsClassic end,
disabled = function() return (not ExtendedCharacterStats.profile.melee.display); end,
get = function () return ExtendedCharacterStats.profile.melee.expertise.display; end,
set = function (_, value)
Expand All @@ -101,7 +106,7 @@ function _Config:LoadMeleeSection()
name = function() return i18n("Expertise Rating") end,
desc = function() return i18n("Shows/Hides the expertise rating.") end,
width = 1.5,
hidden = function() return ECS.IsClassic end,
hidden = function() return IsClassic end,
disabled = function() return (not ExtendedCharacterStats.profile.melee.display); end,
get = function () return ExtendedCharacterStats.profile.melee.expertiseRating.display; end,
set = function (_, value)
Expand All @@ -115,7 +120,7 @@ function _Config:LoadMeleeSection()
name = function() return i18n("Haste Rating") end,
desc = function() return i18n("Shows/Hides the melee haste rating.") end,
width = 1.5,
hidden = function() return ECS.IsClassic end,
hidden = function() return IsClassic end,
disabled = function() return (not ExtendedCharacterStats.profile.melee.display); end,
get = function () return ExtendedCharacterStats.profile.melee.hasteRating.display; end,
set = function (_, value)
Expand All @@ -129,7 +134,7 @@ function _Config:LoadMeleeSection()
name = function() return i18n("Haste Bonus") end,
desc = function() return i18n("Shows/Hides the melee haste bonus value.") end,
width = 1.5,
hidden = function() return ECS.IsClassic end,
hidden = function() return IsClassic end,
disabled = function() return (not ExtendedCharacterStats.profile.melee.display); end,
get = function () return ExtendedCharacterStats.profile.melee.hasteBonus.display; end,
set = function (_, value)
Expand Down Expand Up @@ -162,7 +167,7 @@ function _Config:LoadMeleeSection()
name = function() return i18n("Hit Rating") end,
desc = function() return i18n("Shows/Hides the melee hit rating.") end,
width = 1.5,
hidden = function() return ECS.IsClassic end,
hidden = function() return IsClassic end,
disabled = function()
return ((not ExtendedCharacterStats.profile.melee.display) or
(not ExtendedCharacterStats.profile.melee.hit.display))
Expand Down Expand Up @@ -229,7 +234,7 @@ function _Config:LoadMeleeSection()
name = function() return i18n("Glancing Blow") end,
desc = function() return i18n("Shows/Hides all glancing blow stats") end,
width = 1.5,
hidden = function() return ECS.IsWotlk end,
hidden = function() return IsWotlk end,
disabled = function() return (not ExtendedCharacterStats.profile.melee.display); end,
get = function () return ExtendedCharacterStats.profile.melee.glance.display; end,
set = function (_, value)
Expand All @@ -242,7 +247,7 @@ function _Config:LoadMeleeSection()
order = 6,
inline = true,
name = function() return i18n("Melee Glance Values") end,
hidden = function() return ECS.IsWotlk end,
hidden = function() return IsWotlk end,
args = {
meleeGlance = {
type = "toggle",
Expand Down
13 changes: 9 additions & 4 deletions Modules/Config/RangeSection.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
local ECSLoader = ECSLoader
local IsClassic = ECS.IsClassic
local IsWotlk = ECS.IsWotlk
local UnitHasRelicSlot = UnitHasRelicSlot

---@class Config
local Config = ECSLoader:ImportModule("Config")
local _Config = Config.private
Expand Down Expand Up @@ -73,7 +78,7 @@ function _Config:LoadRangeSection()
name = function() return i18n("Armor Pen. Rating") end,
desc = function() return i18n("Shows/Hides the armor penetration rating value.") end,
width = 1.5,
hidden = function() return (not ECS.IsWotlk) end,
hidden = function() return (not IsWotlk) end,
disabled = function() return (not ExtendedCharacterStats.profile.ranged.display); end,
get = function () return ExtendedCharacterStats.profile.ranged.penetrationRating.display; end,
set = function (_, value)
Expand All @@ -87,7 +92,7 @@ function _Config:LoadRangeSection()
name = function() return i18n("Haste Rating") end,
desc = function() return i18n("Shows/Hides the ranged haste rating.") end,
width = 1.5,
hidden = function() return ECS.IsClassic end,
hidden = function() return IsClassic end,
disabled = function() return (not ExtendedCharacterStats.profile.ranged.display); end,
get = function () return ExtendedCharacterStats.profile.ranged.hasteRating.display; end,
set = function (_, value)
Expand All @@ -101,7 +106,7 @@ function _Config:LoadRangeSection()
name = function() return i18n("Haste Bonus") end,
desc = function() return i18n("Shows/Hides the ranged haste bonus value.") end,
width = 1.5,
hidden = function() return ECS.IsClassic end,
hidden = function() return IsClassic end,
disabled = function() return (not ExtendedCharacterStats.profile.ranged.display); end,
get = function () return ExtendedCharacterStats.profile.ranged.hasteBonus.display; end,
set = function (_, value)
Expand Down Expand Up @@ -147,7 +152,7 @@ function _Config:LoadRangeSection()
name = function() return i18n("Hit Rating") end,
desc = function() return i18n("Shows/Hides the ranged hit rating.") end,
width = 1.5,
hidden = function() return ECS.IsClassic end,
hidden = function() return IsClassic end,
disabled = function()
return ((not ExtendedCharacterStats.profile.ranged.display) or
(not ExtendedCharacterStats.profile.ranged.hit.display))
Expand Down
2 changes: 2 additions & 0 deletions Modules/Config/SpellSchoolsSection.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local ECSLoader = ECSLoader

---@class Config
local Config = ECSLoader:ImportModule("Config")
local _Config = Config.private
Expand Down
7 changes: 5 additions & 2 deletions Modules/Config/SpellSection.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
local ECSLoader = ECSLoader
local IsClassic = ECS.IsClassic

---@class Config
local Config = ECSLoader:ImportModule("Config")
local _Config = Config.private
Expand Down Expand Up @@ -46,7 +49,7 @@ function _Config:LoadSpellSection()
name = function() return i18n("Haste Rating") end,
desc = function() return i18n("Shows/Hides the spell haste rating value.") end,
width = 1.5,
hidden = function() return ECS.IsClassic end,
hidden = function() return IsClassic end,
disabled = function() return (not ExtendedCharacterStats.profile.spell.display); end,
get = function () return ExtendedCharacterStats.profile.spell.hasteRating.display; end,
set = function (_, value)
Expand Down Expand Up @@ -92,7 +95,7 @@ function _Config:LoadSpellSection()
name = function() return i18n("Hit Rating") end,
desc = function() return i18n("Shows/Hides the spell hit rating.") end,
width = 1.5,
hidden = function() return ECS.IsClassic end,
hidden = function() return IsClassic end,
disabled = function()
return ((not ExtendedCharacterStats.profile.spell.display) or
(not ExtendedCharacterStats.profile.spell.hit.display))
Expand Down
Loading
Loading