Skip to content

Commit

Permalink
Wrath TOC
Browse files Browse the repository at this point in the history
  • Loading branch information
Resike committed Jan 29, 2024
1 parent 271a1ff commit 58a2be4
Show file tree
Hide file tree
Showing 10 changed files with 134 additions and 67 deletions.
4 changes: 2 additions & 2 deletions Gladius.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Interface: 100002
## Interface: 30403
## Title: Gladius
## Version: 8.0.1
## Version: 8.1.0
## Notes: Arena enemy unit frames.
## Author: Resike and Firebunny. Original author: Proditor
## SavedVariables: Gladius2DB
Expand Down
6 changes: 3 additions & 3 deletions Libs/AceDB-3.0/AceDB-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
-- end
-- @class file
-- @name AceDB-3.0.lua
-- @release $Id: AceDB-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 27
-- @release $Id: AceDB-3.0.lua 1306 2023-06-23 14:55:09Z nevcairiel $
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 28
local AceDB = LibStub:NewLibrary(ACEDB_MAJOR, ACEDB_MINOR)

if not AceDB then return end -- No upgrade needed
Expand Down Expand Up @@ -260,7 +260,7 @@ local factionrealmKey = factionKey .. " - " .. realmKey
local localeKey = GetLocale():lower()

local regionTable = { "US", "KR", "EU", "TW", "CN" }
local regionKey = regionTable[GetCurrentRegion()]
local regionKey = regionTable[GetCurrentRegion()] or GetCurrentRegionName() or "TR"
local factionrealmregionKey = factionrealmKey .. " - " .. regionKey

-- Actual database initialization function
Expand Down
48 changes: 24 additions & 24 deletions Libs/AceDBOptions-3.0/AceDBOptions-3.0.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--- AceDBOptions-3.0 provides a universal AceConfig options screen for managing AceDB-3.0 profiles.
-- @class file
-- @name AceDBOptions-3.0
-- @release $Id: AceDBOptions-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
-- @release $Id: AceDBOptions-3.0.lua 1304 2023-05-19 19:50:10Z nevcairiel $
local ACEDBO_MAJOR, ACEDBO_MINOR = "AceDBOptions-3.0", 15
local AceDBOptions = LibStub:NewLibrary(ACEDBO_MAJOR, ACEDBO_MINOR)

Expand Down Expand Up @@ -84,25 +84,25 @@ elseif LOCALE == "frFR" then
L["reset_desc"] = "Réinitialise le profil actuel au cas où votre configuration est corrompue ou si vous voulez tout simplement faire table rase."
L["reset_sub"] = "Réinitialise le profil actuel avec les paramètres par défaut."
elseif LOCALE == "koKR" then
L["choose"] = "저장 중인 프로필"
L["choose_desc"] = "입력창에 새로운 이름을 입력하거나 저장 중인 프로필 중 하나를 선택하여 새로운 프로필을 만들 수 있습니다."
L["choose"] = "기존 프로필"
L["choose_desc"] = "편집 상자에 이름을 입력하여 새로운 프로필을 만들거나 이미 존재하는 프로필 중 하나를 선택할 수 있습니다."
L["choose_sub"] = "현재 이용할 수 있는 프로필 중 하나를 선택합니다."
L["copy"] = "복사해오기"
L["copy_desc"] = "현재 사용 중인 프로필에 선택한 프로필의 설정을 복사합니다."
L["copy"] = "복사해 올 프로필"
L["copy_desc"] = "기존 프로필의 설정을 현재 활성화된 프로필로 복사합니다."
L["current"] = "현재 프로필:"
L["default"] = "기본값"
L["delete"] = "프로필 삭제"
L["delete_confirm"] = "정말로 선택한 프로필을 삭제할까요?"
L["delete_desc"] = "저장 공간 절약과 SavedVariables 파일의 정리를 위해 데이터베이스에서 사용하지 않는 프로필을 삭제하세요."
L["delete_sub"] = "데이터베이스의 프로필을 삭제합니다."
L["intro"] = "활성 데이터베이스 프로필을 변경할 수 있고, 각 캐릭터 별로 다른 설정을 수 있습니다."
L["delete_confirm"] = "선택한 프로필을 삭제하시겠습니까?"
L["delete_desc"] = "데이터베이스에서 기존 프로필과 사용하지 않는 프로필을 삭제하여 공간을 절약하고 SavedVariables 파일을 정리합니다."
L["delete_sub"] = "데이터베이스에서 프로필을 삭제합니다."
L["intro"] = "활성 데이터베이스 프로필을 변경할 수 있으며, 모든 캐릭터마다 서로 다른 설정을 지정할 수 있습니다."
L["new"] = "새로운 프로필"
L["new_sub"] = "새로운 프로필을 만듭니다."
L["new_sub"] = "비어 있는 프로필을 새로 만듭니다."
L["profiles"] = "프로필"
L["profiles_sub"] = "프로필 관리"
L["reset"] = "프로필 초기화"
L["reset_desc"] = "설정이 깨졌거나 처음부터 다시 설정을 원하는 경우, 현재 프로필을 기본값으로 초기화하세요."
L["reset_sub"] = "현재 프로필을 기본값으로 초기화합니다"
L["reset"] = "프로필 재설정"
L["reset_desc"] = "구성이 손상되었거나 처음부터 다시 시작하고 싶은 경우 현재 프로필을 기본값으로 재설정하세요."
L["reset_sub"] = "현재 프로필을 기본값으로 재설정합니다"
elseif LOCALE == "esES" or LOCALE == "esMX" then
L["choose"] = "Perfiles existentes"
L["choose_desc"] = "Puedes crear un nuevo perfil introduciendo un nombre en el recuadro o puedes seleccionar un perfil de los ya existentes."
Expand Down Expand Up @@ -166,31 +166,31 @@ elseif LOCALE == "zhCN" then
elseif LOCALE == "ruRU" then
L["choose"] = "Существующие профили"
L["choose_desc"] = "Вы можете создать новый профиль, введя название в поле ввода, или выбрать один из уже существующих профилей."
L["choose_sub"] = "Выбор одиного из уже доступных профилей"
L["choose_sub"] = "Выбор одного из уже доступных профилей."
L["copy"] = "Скопировать из"
L["copy_desc"] = "Скопировать настройки из выбранного профиля в активный."
L["copy_desc"] = "Копирование настроек из выбранного профиля в активный."
L["current"] = "Текущий профиль:"
L["default"] = "По умолчанию"
L["delete"] = "Удалить профиль"
L["delete_confirm"] = "Вы уверены, что вы хотите удалить выбранный профиль?"
L["delete_desc"] = "Удалить существующий и неиспользуемый профиль из БД для сохранения места, и очистить SavedVariables файл."
L["delete_sub"] = "Удаление профиля из БД"
L["intro"] = "Изменяя активный профиль, вы можете задать различные настройки модификаций для каждого персонажа."
L["delete_confirm"] = "Вы уверены, что хотите удалить выбранный профиль?"
L["delete_desc"] = "Удаление существующего и неиспользуемого профиля из базы данных для сохранения места, и очистка файла SavedVariables."
L["delete_sub"] = "Удаление профиля из базы данных."
L["intro"] = "Изменяя активный профиль, Вы можете задать разные настройки для каждого персонажа."
L["new"] = "Новый"
L["new_sub"] = "Создать новый чистый профиль"
L["new_sub"] = "Создание нового чистого профиля."
L["profiles"] = "Профили"
L["profiles_sub"] = "Управление профилями"
L["reset"] = "Сброс профиля"
L["reset_desc"] = "Сбросить текущий профиль к стандартным настройкам, если ваша конфигурация испорчена или вы хотите настроить всё заново."
L["reset"] = "Сбросить профиль"
L["reset_desc"] = "Сброс текущего профиля к стандартным настройкам, если Ваша конфигурация испорчена или Вы хотите настроить все заново."
L["reset_sub"] = "Сброс текущего профиля на стандартный"
elseif LOCALE == "itIT" then
L["choose"] = "Profili Esistenti"
L["choose_desc"] = "Puoi creare un nuovo profilo digitando il nome della casella di testo, oppure scegliendone uno tra i profili già esistenti."
L["choose_sub"] = "Seleziona uno dei profili attualmente disponibili."
L["copy"] = "Copia Da"
L["copy_desc"] = "Copia le impostazioni da un profilo esistente, nel profilo attivo in questo momento."
L["copy_desc"] = "Copia le impostazioni da un profilo esistente nel profilo attivo in questo momento."
L["current"] = "Profilo Attivo:"
L["default"] = "Standard"
L["default"] = "Predefinito"
L["delete"] = "Cancella un Profilo"
L["delete_confirm"] = "Sei sicuro di voler cancellare il profilo selezionato?"
L["delete_desc"] = "Cancella i profili non utilizzati dal database per risparmiare spazio e mantenere puliti i file di configurazione SavedVariables."
Expand Down
85 changes: 60 additions & 25 deletions Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--[[-----------------------------------------------------------------------------
ColorPicker Widget
-------------------------------------------------------------------------------]]
local Type, Version = "ColorPicker", 25
local Type, Version = "ColorPicker", 27
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end

Expand All @@ -18,6 +18,10 @@ local function ColorCallback(self, r, g, b, a, isAlpha)
if not self.HasAlpha then
a = 1
end
-- no change, skip update
if r == self.r and g == self.g and b == self.b and a == self.a then
return
end
self:SetColor(r, g, b, a)
if ColorPickerFrame:IsVisible() then
--colorpicker is still open
Expand Down Expand Up @@ -49,31 +53,62 @@ local function ColorSwatch_OnClick(frame)
ColorPickerFrame:SetFrameStrata("FULLSCREEN_DIALOG")
ColorPickerFrame:SetFrameLevel(frame:GetFrameLevel() + 10)
ColorPickerFrame:SetClampedToScreen(true)

ColorPickerFrame.func = function()
local r, g, b = ColorPickerFrame:GetColorRGB()
local a = 1 - OpacitySliderFrame:GetValue()
ColorCallback(self, r, g, b, a)
end

ColorPickerFrame.hasOpacity = self.HasAlpha
ColorPickerFrame.opacityFunc = function()
local r, g, b = ColorPickerFrame:GetColorRGB()
local a = 1 - OpacitySliderFrame:GetValue()
ColorCallback(self, r, g, b, a, true)
end

local r, g, b, a = self.r, self.g, self.b, self.a
if self.HasAlpha then
ColorPickerFrame.opacity = 1 - (a or 0)
end
ColorPickerFrame:SetColorRGB(r, g, b)

ColorPickerFrame.cancelFunc = function()
ColorCallback(self, r, g, b, a, true)
ColorPickerFrame:EnableMouse(true) -- Make sure the background isn't click-through

if ColorPickerFrame.SetupColorPickerAndShow then -- 10.2.5 color picker overhaul
local r2, g2, b2, a2 = self.r, self.g, self.b, self.a

local info = {
swatchFunc = function()
local r, g, b = ColorPickerFrame:GetColorRGB()
local a = ColorPickerFrame:GetColorAlpha()
ColorCallback(self, r, g, b, a)
end,

hasOpacity = self.HasAlpha,
opacityFunc = function()
local r, g, b = ColorPickerFrame:GetColorRGB()
local a = ColorPickerFrame:GetColorAlpha()
ColorCallback(self, r, g, b, a, true)
end,
opacity = (a2 or 1),

cancelFunc = function()
ColorCallback(self, r2, g2, b2, a2, true)
end,

r = r2,
g = g2,
b = b2,
}

ColorPickerFrame:SetupColorPickerAndShow(info)
else
ColorPickerFrame.func = function()
local r, g, b = ColorPickerFrame:GetColorRGB()
local a = 1 - OpacitySliderFrame:GetValue()
ColorCallback(self, r, g, b, a)
end

ColorPickerFrame.hasOpacity = self.HasAlpha
ColorPickerFrame.opacityFunc = function()
local r, g, b = ColorPickerFrame:GetColorRGB()
local a = 1 - OpacitySliderFrame:GetValue()
ColorCallback(self, r, g, b, a, true)
end

local r, g, b, a = self.r, self.g, self.b, self.a
if self.HasAlpha then
ColorPickerFrame.opacity = 1 - (a or 0)
end
ColorPickerFrame:SetColorRGB(r, g, b)

ColorPickerFrame.cancelFunc = function()
ColorCallback(self, r, g, b, a, true)
end

ColorPickerFrame:Show()
end

ColorPickerFrame:Show()
end
AceGUI:ClearFocus()
end
Expand Down
13 changes: 4 additions & 9 deletions Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
--[[ $Id: CallbackHandler-1.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $ ]]
local MAJOR, MINOR = "CallbackHandler-1.0", 7
--[[ $Id: CallbackHandler-1.0.lua 1298 2022-12-12 15:10:10Z nevcairiel $ ]]
local MAJOR, MINOR = "CallbackHandler-1.0", 8
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)

if not CallbackHandler then return end -- No upgrade needed

local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end}

-- Lua APIs
local error = error
local securecallfunction, error = securecallfunction, error
local setmetatable, rawget = setmetatable, rawget
local next, select, pairs, type, tostring = next, select, pairs, type, tostring

local xpcall = xpcall

local function errorhandler(err)
return geterrorhandler()(err)
end

local function Dispatch(handlers, ...)
local index, method = next(handlers)
if not method then return end
repeat
xpcall(method, errorhandler, ...)
securecallfunction(method, ...)
index, method = next(handlers, index)
until not method
end
Expand Down
2 changes: 1 addition & 1 deletion Libs/DRData-1.0/DRData-1.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ local spellsAndProvidersByCategory = {
[163505] = 1822, -- Rake (Prowl)
[202244] = 202246, -- Overrun
-- Evoker
[372245] = true, -- Terror of the Skies
[372245] = true, -- Terror of the Skies
-- Hunter
[ 24394] = 19577, -- Intimidation
-- Monk
Expand Down
33 changes: 33 additions & 0 deletions Modules/Healthbar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ local HealthBar = Gladius:NewModule("HealthBar", true, true, {
healthBarColorMonk = RAID_CLASS_COLORS["MONK"],
healthBarUseDefaultColorDemonHunter = true,
healthBarColorDemonHunter = RAID_CLASS_COLORS["DEMONHUNTER"],
healthBarUseDefaultColorEvoker = true,
healthBarColorEvoker = RAID_CLASS_COLORS["EVOKER"],
})

function HealthBar:OnEnable()
Expand Down Expand Up @@ -235,6 +237,8 @@ function HealthBar:GetBarColor(class)
return Gladius.db.healthBarColorMonk
elseif class == "DEMONHUNTER" and not Gladius.db.healthBarUseDefaultColorDemonHunter then
return Gladius.db.healthBarColorDemonHunter
elseif class == "EVOKER" and not Gladius.db.healthBarUseDefaultColorEvoker then
return Gladius.db.healthBarColorEvoker
end
return RAID_CLASS_COLORS[class]
end
Expand Down Expand Up @@ -883,6 +887,35 @@ function HealthBar:GetOptions()
end,
order = 115,
},
sep12 = {
type = "description",
name = "",
width = "full",
order = 117,
},
healthBarUseDefaultColorEvoker = {
type = "toggle",
name = L["Default evoker color"],
desc = L["Toggle evoker color"],
disabled = function()
return not Gladius.dbi.profile.modules[self.name]
end,
order = 120,
},
healthBarColorEvoker = {
type = "color",
name = L["Evoker color"],
get = function(info)
return Gladius:GetColorOption(info)
end,
set = function(info, r, g, b, a)
return Gladius:SetColorOption(info, r, g, b, 1)
end,
disabled = function()
return not Gladius.dbi.profile.modules[self.name]
end,
order = 125,
},
},
},
}
Expand Down
4 changes: 2 additions & 2 deletions Modules/Powerbar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function PowerBar:Show(unit)
local color = Gladius.db.powerBarColor
self.frame[unit]:SetStatusBarColor(color.r, color.g, color.b, color.a)
else
local powerType = UnitPowerType(unit)
local powerType = (Gladius.test and Gladius.testing[unit].powerType) or UnitPowerType(unit) or 0
local color = self:GetBarColor(powerType)
self.frame[unit]:SetStatusBarColor(color.r, color.g, color.b)
end
Expand All @@ -251,7 +251,7 @@ function PowerBar:Reset(unit)
local color = Gladius.db.powerBarColor
self.frame[unit]:SetStatusBarColor(color.r, color.g, color.b, color.a)
else
local powerType = UnitPowerType(unit)
local powerType = UnitPowerType(unit) or 0
local color = self:GetBarColor(powerType)
self.frame[unit]:SetStatusBarColor(color.r, color.g, color.b)
end
Expand Down
2 changes: 1 addition & 1 deletion Modules/Racial.lua
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function Racial:AutoFixAll()
if instanceType ~= "arena" then return end
for i = 1, 3 do
local unit = 'arena'..i
local _,race = UnitRace(unit)
local _, race = UnitRace(unit)
race = string.upper(race or 'HUMAN')
local _, _, spellTexture = GetSpellInfo(unitRaceCDs[race].spellID)
if (self.frame[unit]) then
Expand Down
4 changes: 4 additions & 0 deletions Modules/Targetbar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,10 @@ function TargetBar:GetBarColor(class)
return Gladius.db.healthBarColorDeathknight
elseif class == "MONK" and not Gladius.db.healthBarUseDefaultColorMonk then
return Gladius.db.healthBarColorMonk
elseif class == "DEMONHUNTER" and not Gladius.db.healthBarUseDefaultColorDemonHunter then
return Gladius.db.healthBarColorDemonHunter
elseif class == "EVOKER" and not Gladius.db.healthBarUseDefaultColorEvoker then
return Gladius.db.healthBarColorEvoker
end
return RAID_CLASS_COLORS[class]
end
Expand Down

0 comments on commit 58a2be4

Please sign in to comment.