diff --git a/KkthnxUI/Config/AuraWatchGUI.lua b/KkthnxUI/Config/AuraWatchGUI.lua
index 0f0af554..7024b48a 100644
--- a/KkthnxUI/Config/AuraWatchGUI.lua
+++ b/KkthnxUI/Config/AuraWatchGUI.lua
@@ -525,9 +525,9 @@ local function CreatePanel()
-- Main
local groups = {
- L["Player Aura"], -- 1 PlayerBuff
+ -- L["Player Aura"], -- 1 PlayerBuff
L["Special Aura"], -- 2 SPECIAL
- L["Target Aura"], -- 3 TargetDebuff
+ -- L["Target Aura"], -- 3 TargetDebuff
L["Warning"], -- 4 Warning
L["Focus Aura"], -- 5 FOCUS
L["Spell Cooldown"], -- 6 CD
@@ -538,15 +538,15 @@ local function CreatePanel()
}
local preSet = {
- [1] = { 1, false },
- [2] = { 1, true },
- [3] = { 2, true },
- [4] = { 2, false },
- [5] = { 3, false },
+ --[1] = { 1, false },
+ [1] = { 1, true },
+ -- [3] = { 2, true },
+ [2] = { 2, false },
+ [3] = { 3, false },
+ [4] = { 1, false },
+ [5] = { 1, false },
[6] = { 1, false },
[7] = { 1, false },
- [8] = { 1, false },
- [9] = { 1, false },
}
local tabs = {}
@@ -750,7 +750,7 @@ local function CreatePanel()
tabs[i]:SetScript("OnLeave", tabOnLeave)
end
- for i = 1, 10 do
+ for i = 1, 8 do
createGroupSwitcher(tabs[i].Page, i)
end
diff --git a/KkthnxUI/Config/Elements/AuraWatchList/DH.lua b/KkthnxUI/Config/Elements/AuraWatchList/DH.lua
index ee93b0b5..18fa1747 100644
--- a/KkthnxUI/Config/Elements/AuraWatchList/DH.lua
+++ b/KkthnxUI/Config/Elements/AuraWatchList/DH.lua
@@ -6,32 +6,6 @@ if K.Class ~= "DEMONHUNTER" then
end
local list = {
- ["Player Aura"] = { -- 玩家光环组
- { AuraID = 207693, UnitID = "player" }, -- 灵魂盛宴
- },
- ["Target Aura"] = { -- 目标光环组
- { AuraID = 198813, UnitID = "target", Caster = "player" }, -- 复仇回避
- { AuraID = 179057, UnitID = "target", Caster = "player" }, -- 混乱新星
- { AuraID = 207690, UnitID = "target", Caster = "player" }, -- 血滴子
- { AuraID = 206491, UnitID = "target", Caster = "player" }, -- 涅墨西斯
- { AuraID = 213405, UnitID = "target", Caster = "player" }, -- 战刃大师
- { AuraID = 185245, UnitID = "target", Caster = "player" }, -- 折磨
- { AuraID = 204490, UnitID = "target", Caster = "player" }, -- 沉默咒符
- { AuraID = 204598, UnitID = "target", Caster = "player" }, -- 烈焰咒符
- { AuraID = 204843, UnitID = "target", Caster = "player" }, -- 锁链咒符
- { AuraID = 207407, UnitID = "target", Caster = "player" }, -- 灵魂切削
- { AuraID = 207744, UnitID = "target", Caster = "player" }, -- 烈火烙印
- { AuraID = 207771, UnitID = "target", Caster = "player" }, -- 烈火烙印
- { AuraID = 224509, UnitID = "target", Caster = "player" }, -- 幽魂炸弹
- { AuraID = 210003, UnitID = "target", Caster = "player" }, -- 锋锐之刺
- { AuraID = 207685, UnitID = "target", Caster = "player" }, -- 悲苦咒符
- { AuraID = 211881, UnitID = "target", Caster = "player" }, -- 邪能爆发
- { AuraID = 247456, UnitID = "target", Caster = "player" }, -- 脆弱
- { AuraID = 258860, UnitID = "target", Caster = "player" }, -- 黑暗鞭笞
- { AuraID = 268178, UnitID = "target", Caster = "player" }, -- 虚空掠夺者
- { AuraID = 323802, UnitID = "target", Caster = "player" }, -- 恶魔追击
- { AuraID = 317009, UnitID = "target", Caster = "player" }, -- 罪孽烙印
- },
["Special Aura"] = { -- 玩家重要光环组
{ AuraID = 162264, UnitID = "player" }, -- 恶魔变形
{ AuraID = 187827, UnitID = "player" }, -- 恶魔变形
diff --git a/KkthnxUI/Config/Elements/AuraWatchList/DK.lua b/KkthnxUI/Config/Elements/AuraWatchList/DK.lua
index 1951f44f..f50f15e3 100644
--- a/KkthnxUI/Config/Elements/AuraWatchList/DK.lua
+++ b/KkthnxUI/Config/Elements/AuraWatchList/DK.lua
@@ -6,32 +6,6 @@ if K.Class ~= "DEATHKNIGHT" then
end
local list = {
- ["Player Aura"] = { -- 玩家光环组
- { AuraID = 3714, UnitID = "player" }, -- 冰霜之路
- { AuraID = 53365, UnitID = "player" }, -- 不洁之力
- { AuraID = 59052, UnitID = "player" }, -- 白霜
- { AuraID = 81340, UnitID = "player" }, -- 末日突降
- { AuraID = 111673, UnitID = "pet" }, -- 控制亡灵
- { AuraID = 215377, UnitID = "player" }, -- 巨口饿了
- { AuraID = 219788, UnitID = "player" }, -- 埋骨之所
- },
- ["Target Aura"] = { -- 目标光环组
- { AuraID = 55078, UnitID = "target", Caster = "player" }, -- 血之疫病
- { AuraID = 55095, UnitID = "target", Caster = "player" }, -- 冰霜疫病
- { AuraID = 56222, UnitID = "target", Caster = "player" }, -- 黑暗命令
- { AuraID = 45524, UnitID = "target", Caster = "player" }, -- 寒冰锁链
- { AuraID = 191587, UnitID = "target", Caster = "player" }, -- 恶性瘟疫
- { AuraID = 211793, UnitID = "target", Caster = "player" }, -- 冷库严冬
- { AuraID = 221562, UnitID = "target", Caster = "player" }, -- 窒息
- { AuraID = 108194, UnitID = "target", Caster = "player" }, -- 窒息
- { AuraID = 206940, UnitID = "target", Caster = "player" }, -- 鲜血印记
- { AuraID = 206977, UnitID = "target", Caster = "player" }, -- 血之镜像
- { AuraID = 207167, UnitID = "target", Caster = "player" }, -- 致盲冰雨
- { AuraID = 194310, UnitID = "target", Caster = "player" }, -- 溃烂之伤
- { AuraID = 156004, UnitID = "target", Caster = "player" }, -- 亵渎
- { AuraID = 191748, UnitID = "target", Caster = "player" }, -- 诸界之灾
- { AuraID = 312202, UnitID = "target", Caster = "player" }, -- 失格者之梏
- },
["Special Aura"] = { -- 玩家重要光环组
{ AuraID = 63560, UnitID = "pet" }, -- 黑暗突变
{ AuraID = 47568, UnitID = "player" }, -- 符文武器增效
diff --git a/KkthnxUI/Config/Elements/AuraWatchList/Druid.lua b/KkthnxUI/Config/Elements/AuraWatchList/Druid.lua
index 066deed4..cc0957ee 100644
--- a/KkthnxUI/Config/Elements/AuraWatchList/Druid.lua
+++ b/KkthnxUI/Config/Elements/AuraWatchList/Druid.lua
@@ -6,50 +6,6 @@ if K.Class ~= "DRUID" then
end
local list = {
- ["Player Aura"] = { -- 玩家光环组
- { AuraID = 5215, UnitID = "player" }, -- 潜行
- { AuraID = 1850, UnitID = "player" }, -- 急奔
- { AuraID = 137452, UnitID = "player" }, -- 野性位移
- { AuraID = 102416, UnitID = "player" }, -- 野性冲锋:泳速
- { AuraID = 774, UnitID = "player", Caster = "player" }, -- 回春术
- { AuraID = 8936, UnitID = "player", Caster = "player" }, -- 愈合
- { AuraID = 33763, UnitID = "player", Caster = "player" }, -- 生命绽放
- { AuraID = 188550, UnitID = "player", Caster = "player" }, -- 生命绽放,橙装
- { AuraID = 48438, UnitID = "player", Caster = "player" }, -- 野性成长
- { AuraID = 102351, UnitID = "player", Caster = "player" }, -- 塞纳里奥结界
- { AuraID = 155777, UnitID = "player", Caster = "player" }, -- 萌芽
- },
- ["Target Aura"] = { -- 目标光环组
- { AuraID = 99, UnitID = "target", Caster = "player" }, -- 夺魂咆哮
- { AuraID = 339, UnitID = "target", Caster = "player" }, -- 纠缠根须
- { AuraID = 774, UnitID = "target", Caster = "player" }, -- 回春术
- { AuraID = 1079, UnitID = "target", Caster = "player" }, -- 割裂
- { AuraID = 5211, UnitID = "target", Caster = "player" }, -- 蛮力猛击
- { AuraID = 6795, UnitID = "target", Caster = "player" }, -- 低吼
- { AuraID = 8936, UnitID = "target", Caster = "player" }, -- 愈合
- { AuraID = 50259, UnitID = "target", Caster = "player" }, -- 野性冲锋:晕眩
- { AuraID = 45334, UnitID = "target", Caster = "player" }, -- 野性冲锋:定身
- { AuraID = 33763, UnitID = "target", Caster = "player" }, -- 生命绽放
- { AuraID = 188550, UnitID = "target", Caster = "player" }, -- 生命绽放,橙装
- { AuraID = 48438, UnitID = "target", Caster = "player" }, -- 野性成长
- { AuraID = 61391, UnitID = "target", Caster = "player" }, -- 台风
- { AuraID = 81261, UnitID = "target", Caster = "player" }, -- 日光术
- { AuraID = 155722, UnitID = "target", Caster = "player" }, -- 斜掠
- { AuraID = 203123, UnitID = "target", Caster = "player" }, -- 割碎
- { AuraID = 106830, UnitID = "target", Caster = "player" }, -- 痛击
- { AuraID = 192090, UnitID = "target", Caster = "player" }, -- 痛击
- { AuraID = 164812, UnitID = "target", Caster = "player" }, -- 月火术
- { AuraID = 155625, UnitID = "target", Caster = "player" }, -- 月火术
- { AuraID = 164815, UnitID = "target", Caster = "player" }, -- 阳炎术
- { AuraID = 102359, UnitID = "target", Caster = "player" }, -- 群体缠绕
- { AuraID = 202347, UnitID = "target", Caster = "player" }, -- 星辰耀斑
- { AuraID = 127797, UnitID = "target", Caster = "player" }, -- 乌索尔旋风
- { AuraID = 208253, UnitID = "target", Caster = "player" }, -- 加尼尔的精华
- { AuraID = 155777, UnitID = "target", Caster = "player" }, -- 萌芽
- { AuraID = 102342, UnitID = "target", Caster = "player" }, -- 铁木树皮
- { AuraID = 102351, UnitID = "target", Caster = "player" }, -- 塞纳里奥结界
- { AuraID = 200389, UnitID = "target", Caster = "player" }, -- 栽培
- },
["Special Aura"] = { -- 玩家重要光环组
{ AuraID = 5217, UnitID = "player" }, -- 猛虎之怒
{ AuraID = 48517, UnitID = "player" }, -- 日蚀
diff --git a/KkthnxUI/Config/Elements/AuraWatchList/Evoker.lua b/KkthnxUI/Config/Elements/AuraWatchList/Evoker.lua
index a1605805..999150ca 100644
--- a/KkthnxUI/Config/Elements/AuraWatchList/Evoker.lua
+++ b/KkthnxUI/Config/Elements/AuraWatchList/Evoker.lua
@@ -6,15 +6,6 @@ if K.Class ~= "EVOKER" then
end
local list = {
- ["Player Aura"] = { -- 玩家光环组
- { AuraID = 370454, UnitID = "player" }, -- 聚能冲击
- { AuraID = 370840, UnitID = "player" }, -- 移情者
- },
- ["Target Aura"] = { -- 目标光环组
- { AuraID = 355689, UnitID = "target", Caster = "player" }, -- 山崩
- { AuraID = 372048, UnitID = "target", Caster = "player" }, -- 压迫怒吼
- { AuraID = 370452, UnitID = "target", Caster = "player" }, -- 碎裂星辰
- },
["Special Aura"] = { -- 玩家重要光环组
{ AuraID = 358267, UnitID = "player" }, -- 悬空
{ AuraID = 375087, UnitID = "player" }, -- 狂龙之怒
diff --git a/KkthnxUI/Config/Elements/AuraWatchList/Hunter.lua b/KkthnxUI/Config/Elements/AuraWatchList/Hunter.lua
index 6e670d19..9bc220f8 100644
--- a/KkthnxUI/Config/Elements/AuraWatchList/Hunter.lua
+++ b/KkthnxUI/Config/Elements/AuraWatchList/Hunter.lua
@@ -6,70 +6,6 @@ if K.Class ~= "HUNTER" then
end
local list = {
- ["Player Aura"] = { -- 玩家光环组
- { AuraID = 136, UnitID = "pet" }, -- 治疗宠物
- { AuraID = 19577, UnitID = "pet" }, -- 胁迫
- { AuraID = 160058, UnitID = "pet" }, -- 厚皮
- { AuraID = 90361, UnitID = "player" }, -- 灵魂治愈
- { AuraID = 35079, UnitID = "player" }, -- 误导
- { AuraID = 61648, UnitID = "player" }, -- 变色龙守护
- { AuraID = 199483, UnitID = "player" }, -- 伪装
- { AuraID = 118922, UnitID = "player" }, -- 迅疾如风
- { AuraID = 164857, UnitID = "player" }, -- 生存专家
- { AuraID = 186258, UnitID = "player" }, -- 猎豹守护
- { AuraID = 246152, UnitID = "player" }, -- 倒刺射击
- { AuraID = 246851, UnitID = "player" }, -- 倒刺射击
- { AuraID = 246852, UnitID = "player" }, -- 倒刺射击
- { AuraID = 246853, UnitID = "player" }, -- 倒刺射击
- { AuraID = 246854, UnitID = "player" }, -- 倒刺射击
- { AuraID = 203924, UnitID = "player" }, -- 守护屏障
- { AuraID = 197161, UnitID = "player" }, -- 灵龟守护回血
- { AuraID = 160007, UnitID = "player" }, -- 上升气流(双头龙)
- { AuraID = 260249, UnitID = "player" }, -- 掠食者
- { AuraID = 231390, UnitID = "player", Combat = true }, -- 开拓者
- { AuraID = 164273, UnitID = "player", Combat = true, Value = true }, -- 独来独往
- { AuraID = 260242, UnitID = "player" }, -- 弹无虚发
- { AuraID = 342076, UnitID = "player" }, -- 行云流水
- { AuraID = 389020, UnitID = "player" }, -- 子弹风暴
- { AuraID = 424571, UnitID = "player" }, -- 风行者的指引
- },
- ["Target Aura"] = { -- 目标光环组
- { AuraID = 3355, UnitID = "target", Caster = "player" }, -- 冰冻陷阱
- { AuraID = 5116, UnitID = "target", Caster = "player" }, -- 震荡射击
- { AuraID = 19386, UnitID = "target", Caster = "player" }, -- 翼龙钉刺
- { AuraID = 24394, UnitID = "target", Caster = "pet" }, -- 胁迫
- { AuraID = 321538, UnitID = "target", Caster = "pet" }, -- 血溅十方
- { AuraID = 117526, UnitID = "target" }, -- 束缚射击
- { AuraID = 257284, UnitID = "target", Caster = "player" }, -- 猎人印记
- { AuraID = 131894, UnitID = "target", Caster = "player" }, -- 夺命黑鸦
- { AuraID = 199803, UnitID = "target", Caster = "player" }, -- 精确瞄准
- { AuraID = 195645, UnitID = "target", Caster = "player" }, -- 摔绊
- { AuraID = 202797, UnitID = "target", Caster = "player" }, -- 蝰蛇钉刺
- { AuraID = 202900, UnitID = "target", Caster = "player" }, -- 毒蝎钉刺
- { AuraID = 224729, UnitID = "target", Caster = "player" }, -- 爆裂射击
- { AuraID = 213691, UnitID = "target", Caster = "player" }, -- 驱散射击
- { AuraID = 162480, UnitID = "target", Caster = "player" }, -- 精钢陷阱
- { AuraID = 162487, UnitID = "target", Caster = "player" }, -- 精钢陷阱
- { AuraID = 259491, UnitID = "target", Caster = "player" }, -- 毒蛇钉刺
- { AuraID = 271788, UnitID = "target", Caster = "player" }, -- 毒蛇钉刺
- { AuraID = 269747, UnitID = "target", Caster = "player" }, -- 野火炸弹
- { AuraID = 270339, UnitID = "target", Caster = "player" }, -- 散射炸弹
- { AuraID = 270343, UnitID = "target", Caster = "player" }, -- 内出血
- { AuraID = 271049, UnitID = "target", Caster = "player" }, -- 动荡炸弹
- { AuraID = 270332, UnitID = "target", Caster = "player", Flash = true }, -- 信息素炸弹
- --{AuraID = 259277, UnitID = "target", Caster = "pet"}, -- 杀戮命令
- { AuraID = 277959, UnitID = "target", Caster = "player" }, -- 稳固瞄准
- { AuraID = 217200, UnitID = "target", Caster = "player" }, -- 倒刺射击
- { AuraID = 336746, UnitID = "target", Caster = "player" }, -- 魂铸余烬,橙装
- { AuraID = 328275, UnitID = "target", Caster = "player" }, -- 野性印记
- { AuraID = 324149, UnitID = "target", Caster = "player" }, -- 劫掠射击
- { AuraID = 308498, UnitID = "target", Caster = "player" }, -- 共鸣箭
- { AuraID = 333526, UnitID = "target", Caster = "player" }, -- 尖刺果实
- { AuraID = 375893, UnitID = "target", Caster = "player" }, -- 死亡飞轮
- { AuraID = 424567, UnitID = "target", Caster = "player", Flash = true }, -- 狂野本能
-
- { AuraID = 410167, UnitID = "target", Caster = "player" }, -- 破甲,生存4T
- },
["Special Aura"] = { -- 玩家重要光环组
{ AuraID = 19574, UnitID = "player" }, -- 狂野怒火
{ AuraID = 54216, UnitID = "player" }, -- 主人的召唤
diff --git a/KkthnxUI/Config/Elements/AuraWatchList/Mage.lua b/KkthnxUI/Config/Elements/AuraWatchList/Mage.lua
index 8e0ad210..87089279 100644
--- a/KkthnxUI/Config/Elements/AuraWatchList/Mage.lua
+++ b/KkthnxUI/Config/Elements/AuraWatchList/Mage.lua
@@ -6,47 +6,6 @@ if K.Class ~= "MAGE" then
end
local list = {
- ["Player Aura"] = { -- 玩家光环组
- { AuraID = 130, UnitID = "player" }, -- 缓落
- { AuraID = 32612, UnitID = "player" }, -- 隐形术
- { AuraID = 87023, UnitID = "player" }, -- 灸灼
- { AuraID = 11426, UnitID = "player" }, -- 寒冰护体
- { AuraID = 235313, UnitID = "player" }, -- 烈焰护体
- { AuraID = 235450, UnitID = "player" }, -- 棱光屏障
- { AuraID = 110960, UnitID = "player" }, -- 强化隐形术
- { AuraID = 157644, UnitID = "player" }, -- 强化烟火之术
- },
- ["Target Aura"] = { -- 目标光环组
- { AuraID = 118, UnitID = "target", Caster = "player" }, -- 变形术
- { AuraID = 122, UnitID = "target", Caster = "player" }, -- 冰霜新星
- { AuraID = 12654, UnitID = "target", Caster = "player" }, -- 点燃
- { AuraID = 11366, UnitID = "target", Caster = "player" }, -- 炎爆术
- { AuraID = 31661, UnitID = "target", Caster = "player" }, -- 龙息术
- { AuraID = 82691, UnitID = "target", Caster = "player" }, -- 冰霜之环
- { AuraID = 31589, UnitID = "target", Caster = "player" }, -- 减速
- { AuraID = 33395, UnitID = "target", Caster = "pet" }, -- 冰冻术
- { AuraID = 28271, UnitID = "target", Caster = "player" }, -- 变形术
- { AuraID = 28272, UnitID = "target", Caster = "player" }, -- 变形术
- { AuraID = 61305, UnitID = "target", Caster = "player" }, -- 变形术
- { AuraID = 61721, UnitID = "target", Caster = "player" }, -- 变形术
- { AuraID = 61780, UnitID = "target", Caster = "player" }, -- 变形术
- { AuraID = 126819, UnitID = "target", Caster = "player" }, -- 变形术
- { AuraID = 161353, UnitID = "target", Caster = "player" }, -- 变形术
- { AuraID = 161354, UnitID = "target", Caster = "player" }, -- 变形术
- { AuraID = 161355, UnitID = "target", Caster = "player" }, -- 变形术
- { AuraID = 161372, UnitID = "target", Caster = "player" }, -- 变形术
- { AuraID = 157981, UnitID = "target", Caster = "player" }, -- 冲击波
- { AuraID = 217694, UnitID = "target", Caster = "player" }, -- 活动炸弹
- { AuraID = 114923, UnitID = "target", Caster = "player" }, -- 虚空风暴
- { AuraID = 205708, UnitID = "target", Caster = "player" }, -- 寒冰箭
- { AuraID = 212792, UnitID = "target", Caster = "player" }, -- 冰锥术
- { AuraID = 157997, UnitID = "target", Caster = "player" }, -- 寒冰新星
- { AuraID = 210134, UnitID = "target", Caster = "player" }, -- 奥术侵蚀
- { AuraID = 199786, UnitID = "target", Caster = "player" }, -- 冰川尖刺
- { AuraID = 210824, UnitID = "target", Caster = "player" }, -- 大法师之触
- { AuraID = 307443, UnitID = "target", Caster = "player" }, -- 摧残火花
- { AuraID = 314793, UnitID = "target", Caster = "player" }, -- 折磨之镜
- },
["Special Aura"] = { -- 玩家重要光环组
{ AuraID = 66, UnitID = "player" }, -- 隐形术
{ AuraID = 45438, UnitID = "player" }, -- 寒冰屏障
diff --git a/KkthnxUI/Config/Elements/AuraWatchList/Monk.lua b/KkthnxUI/Config/Elements/AuraWatchList/Monk.lua
index 3f285bf1..b969407e 100644
--- a/KkthnxUI/Config/Elements/AuraWatchList/Monk.lua
+++ b/KkthnxUI/Config/Elements/AuraWatchList/Monk.lua
@@ -6,35 +6,6 @@ if K.Class ~= "MONK" then
end
local list = {
- ["Player Aura"] = { -- 玩家光环组
- { AuraID = 119085, UnitID = "player" }, -- 真气突
- { AuraID = 101643, UnitID = "player" }, -- 魂体双分
- { AuraID = 202090, UnitID = "player" }, -- 禅院教诲
- { AuraID = 119611, UnitID = "player" }, -- 复苏之雾
- { AuraID = 195381, UnitID = "player" }, -- 治疗之风
- { AuraID = 213177, UnitID = "player" }, -- 利涉大川
- { AuraID = 199407, UnitID = "player" }, -- 脚步轻盈
- },
- ["Target Aura"] = { -- 目标光环组
- { AuraID = 115078, UnitID = "target", Caster = "player" }, -- 分筋错骨
- { AuraID = 116189, UnitID = "target", Caster = "player" }, -- 豪镇八方
- { AuraID = 115804, UnitID = "target", Caster = "player" }, -- 致死之伤
- { AuraID = 115080, UnitID = "target", Caster = "player" }, -- 轮回之触
- { AuraID = 123586, UnitID = "target", Caster = "player" }, -- 翔龙在天
- { AuraID = 116706, UnitID = "target", Caster = "player" }, -- 金刚震
- { AuraID = 205320, UnitID = "target", Caster = "player" }, -- 风领主之击
- { AuraID = 116841, UnitID = "target", Caster = "player" }, -- 迅如猛虎
- { AuraID = 119381, UnitID = "target", Caster = "player" }, -- 扫堂腿
- { AuraID = 116844, UnitID = "target", Caster = "player" }, -- 平心之环
- { AuraID = 121253, UnitID = "target", Caster = "player" }, -- 醉酿投
- { AuraID = 214326, UnitID = "target", Caster = "player" }, -- 爆炸酒桶
- { AuraID = 123725, UnitID = "target", Caster = "player" }, -- 火焰之息
- { AuraID = 116849, UnitID = "target", Caster = "player" }, -- 作茧缚命
- { AuraID = 119611, UnitID = "target", Caster = "player" }, -- 复苏之雾
- { AuraID = 191840, UnitID = "target", Caster = "player" }, -- 精华之泉
- { AuraID = 198909, UnitID = "target", Caster = "player" }, -- 赤精之歌
- { AuraID = 124682, UnitID = "target", Caster = "player" }, -- 氤氲之雾
- },
["Special Aura"] = { -- 玩家重要光环组
{ AuraID = 125174, UnitID = "player" }, -- 业报之触
{ AuraID = 116768, UnitID = "player" }, -- 幻灭踢
diff --git a/KkthnxUI/Config/Elements/AuraWatchList/Paladin.lua b/KkthnxUI/Config/Elements/AuraWatchList/Paladin.lua
index 903979c4..5b0121af 100644
--- a/KkthnxUI/Config/Elements/AuraWatchList/Paladin.lua
+++ b/KkthnxUI/Config/Elements/AuraWatchList/Paladin.lua
@@ -6,33 +6,6 @@ if K.Class ~= "PALADIN" then
end
local list = {
- ["Player Aura"] = { -- 玩家光环组
- { AuraID = 188370, UnitID = "player" }, -- 奉献
- { AuraID = 197561, UnitID = "player" }, -- 复仇者的勇气
- { AuraID = 269571, UnitID = "player" }, -- 狂热
- { AuraID = 114250, UnitID = "player" }, -- 无私自愈
- { AuraID = 281178, UnitID = "player" }, -- 愤怒之剑
- { AuraID = 182104, UnitID = "player" }, -- 闪耀之光
- },
- ["Target Aura"] = { -- 目标光环组
- { AuraID = 853, UnitID = "target", Caster = "player" }, -- 制裁之锤
- { AuraID = 31935, UnitID = "target", Caster = "player" }, -- 复仇者之盾
- { AuraID = 53563, UnitID = "target", Caster = "player" }, -- 圣光道标
- { AuraID = 62124, UnitID = "target", Caster = "player" }, -- 清算之手
- { AuraID = 156910, UnitID = "target", Caster = "player" }, -- 信仰道标
- { AuraID = 183218, UnitID = "target", Caster = "player" }, -- 妨害之手
- { AuraID = 197277, UnitID = "target", Caster = "player" }, -- 审判
- { AuraID = 214222, UnitID = "target", Caster = "player" }, -- 审判
- { AuraID = 205273, UnitID = "target", Caster = "player" }, -- 灰烬觉醒
- { AuraID = 105421, UnitID = "target", Caster = "player" }, -- 盲目之光
- { AuraID = 200654, UnitID = "target", Caster = "player" }, -- 提尔的拯救
- { AuraID = 223306, UnitID = "target", Caster = "player" }, -- 赋予信仰
- { AuraID = 196941, UnitID = "target", Caster = "player" }, -- 圣光审判
- { AuraID = 209202, UnitID = "target", Caster = "player" }, -- 提尔之眼
- { AuraID = 204301, UnitID = "target", Caster = "player" }, -- 祝福之盾
- { AuraID = 204079, UnitID = "target", Caster = "player" }, -- 决一死战
- { AuraID = 343527, UnitID = "target", Caster = "player" }, -- 处决审判
- },
["Special Aura"] = { -- 玩家重要光环组
{ AuraID = 498, UnitID = "player" }, -- 圣佑术
{ AuraID = 642, UnitID = "player" }, -- 圣盾术
diff --git a/KkthnxUI/Config/Elements/AuraWatchList/Priest.lua b/KkthnxUI/Config/Elements/AuraWatchList/Priest.lua
index 37630ea8..d4da5cc5 100644
--- a/KkthnxUI/Config/Elements/AuraWatchList/Priest.lua
+++ b/KkthnxUI/Config/Elements/AuraWatchList/Priest.lua
@@ -6,40 +6,6 @@ if K.Class ~= "PRIEST" then
end
local list = {
- ["Player Aura"] = { -- 玩家光环组
- { AuraID = 586, UnitID = "player" }, -- 渐隐术
- { AuraID = 45242, UnitID = "player" }, -- 专注意志
- { AuraID = 121557, UnitID = "player" }, -- 天堂之羽
- { AuraID = 194022, UnitID = "player" }, -- 意志坚定
- { AuraID = 214121, UnitID = "player" }, -- 身心合一
- },
- ["Target Aura"] = { -- 目标光环组
- { AuraID = 139, UnitID = "target", Caster = "player" }, -- 恢复
- { AuraID = 589, UnitID = "target", Caster = "player" }, -- 暗言术:痛
- { AuraID = 8122, UnitID = "target", Caster = "player" }, -- 心灵尖啸
- { AuraID = 15487, UnitID = "target", Caster = "player" }, -- 沉默
- { AuraID = 34914, UnitID = "target", Caster = "player" }, -- 吸血鬼之触
- { AuraID = 41635, UnitID = "target", Caster = "player" }, -- 愈合祷言
- { AuraID = 205369, UnitID = "target", Caster = "player" }, -- 心灵炸弹
- { AuraID = 217673, UnitID = "target", Caster = "player" }, -- 心灵尖刺
- { AuraID = 208065, UnitID = "target", Caster = "player" }, -- 图雷之光
- { AuraID = 200196, UnitID = "target", Caster = "player" }, -- 圣言术:罚
- { AuraID = 200200, UnitID = "target", Caster = "player" }, -- 圣言术:罚
- { AuraID = 214121, UnitID = "target", Caster = "player" }, -- 身心合一
- { AuraID = 121557, UnitID = "target", Caster = "player" }, -- 天堂之羽
- { AuraID = 204263, UnitID = "target", Caster = "player" }, -- 闪光力场
- { AuraID = 194384, UnitID = "target", Caster = "player" }, -- 救赎
- { AuraID = 214621, UnitID = "target", Caster = "player" }, -- 教派分歧
- { AuraID = 152118, UnitID = "target", Caster = "player" }, -- 意志洞悉
- { AuraID = 204213, UnitID = "target", Caster = "player" }, -- 净化邪恶
- { AuraID = 335467, UnitID = "target", Caster = "player" }, -- 噬灵疫病
- { AuraID = 323673, UnitID = "target", Caster = "player" }, -- 控心术
- { AuraID = 342132, UnitID = "target", Caster = "player" }, -- 盛怒法夜
- { AuraID = 325203, UnitID = "target", Caster = "player" }, -- 邪恶灌注
- { AuraID = 17, UnitID = "target", Caster = "player", Value = true }, -- 真言术:盾
- { AuraID = 208772, UnitID = "target", Caster = "player", Value = true }, -- 惩击
- { AuraID = 271466, UnitID = "target", Caster = "player", Value = true }, -- 微光屏障
- },
["Special Aura"] = { -- 玩家重要光环组
{ AuraID = 17, UnitID = "player", Caster = "player" }, -- 真言术:盾
{ AuraID = 194384, UnitID = "player", Caster = "player" }, -- 救赎
diff --git a/KkthnxUI/Config/Elements/AuraWatchList/Rogue.lua b/KkthnxUI/Config/Elements/AuraWatchList/Rogue.lua
index aa1ebdc9..55b4dc21 100644
--- a/KkthnxUI/Config/Elements/AuraWatchList/Rogue.lua
+++ b/KkthnxUI/Config/Elements/AuraWatchList/Rogue.lua
@@ -6,43 +6,6 @@ if K.Class ~= "ROGUE" then
end
local list = {
- ["Player Aura"] = { -- 玩家光环组
- { AuraID = 1784, UnitID = "player" }, -- 潜行
- { AuraID = 115191, UnitID = "player" }, -- 潜行
- { AuraID = 2983, UnitID = "player" }, -- 疾跑
- { AuraID = 36554, UnitID = "player" }, -- 暗影步
- { AuraID = 197603, UnitID = "player" }, -- 黑暗之拥
- { AuraID = 270070, UnitID = "player" }, -- 隐藏之刃
- },
- ["Target Aura"] = { -- 目标光环组
- { AuraID = 408, UnitID = "target", Caster = "player" }, -- 肾击
- { AuraID = 703, UnitID = "target", Caster = "player" }, -- 锁喉
- { AuraID = 1833, UnitID = "target", Caster = "player" }, -- 偷袭
- { AuraID = 6770, UnitID = "target", Caster = "player" }, -- 闷棍
- { AuraID = 2094, UnitID = "target", Caster = "player" }, -- 致盲
- { AuraID = 1330, UnitID = "target", Caster = "player" }, -- 锁喉
- { AuraID = 1776, UnitID = "target", Caster = "player" }, -- 凿击
- { AuraID = 1943, UnitID = "target", Caster = "player" }, -- 割裂
- { AuraID = 79140, UnitID = "target", Caster = "player" }, -- 宿敌
- { AuraID = 16511, UnitID = "target", Caster = "player" }, -- 出血
- { AuraID = 192759, UnitID = "target", Caster = "player" }, -- 君王之灾
- { AuraID = 192425, UnitID = "target", Caster = "player" }, -- 毒素冲动
- { AuraID = 200803, UnitID = "target", Caster = "player" }, -- 苦痛毒液
- { AuraID = 137619, UnitID = "target", Caster = "player" }, -- 死亡标记
- { AuraID = 195452, UnitID = "target", Caster = "player" }, -- 夜刃
- { AuraID = 209786, UnitID = "target", Caster = "player" }, -- 赤喉之咬
- { AuraID = 196958, UnitID = "target", Caster = "player" }, -- 暗影打击
- { AuraID = 196937, UnitID = "target", Caster = "player" }, -- 鬼魅攻击
- { AuraID = 192925, UnitID = "target", Caster = "player" }, -- 遇刺者之血
- { AuraID = 245389, UnitID = "target", Caster = "player" }, -- 淬毒之刃
- { AuraID = 121411, UnitID = "target", Caster = "player" }, -- 猩红风暴
- { AuraID = 255909, UnitID = "target", Caster = "player" }, -- 欺凌
- { AuraID = 316220, UnitID = "target", Caster = "player" }, -- 洞悉弱点
- { AuraID = 315341, UnitID = "target", Caster = "player" }, -- 正中眉心
- { AuraID = 328305, UnitID = "target", Caster = "player" }, -- 败血刃伤
- { AuraID = 323654, UnitID = "target", Caster = "player" }, -- Flagellation
- { AuraID = 324073, UnitID = "target", Caster = "player" }, -- 锯齿骨刺
- },
["Special Aura"] = { -- 玩家重要光环组
{ AuraID = 1966, UnitID = "player" }, -- 佯攻
{ AuraID = 5171, UnitID = "player" }, -- 切割
@@ -64,7 +27,7 @@ local list = {
{ AuraID = 202754, UnitID = "player" }, -- 隐秘刀刃
{ AuraID = 193356, UnitID = "player", Text = L["Combo"] }, -- 强势连击,骰子
{ AuraID = 193357, UnitID = "player", Text = L["Crit"] }, -- 暗鲨涌动,骰子
- { AuraID = 193358, UnitID = "player", Text = L["AttackSpeed"] }, -- 大乱斗,骰子
+ { AuraID = 193358, UnitID = "player", Text = L["Attack Speed"] }, -- 大乱斗,骰子
{ AuraID = 193359, UnitID = "player", Text = L["CD"] }, -- 双巧手,骰子
{ AuraID = 199603, UnitID = "player", Text = L["Strike"] }, -- 骷髅黑帆,骰子
{ AuraID = 199600, UnitID = "player", Text = L["Power"] }, -- 埋藏的宝藏,骰子
diff --git a/KkthnxUI/Config/Elements/AuraWatchList/Shaman.lua b/KkthnxUI/Config/Elements/AuraWatchList/Shaman.lua
index c5e22ef2..f3ee6e4c 100644
--- a/KkthnxUI/Config/Elements/AuraWatchList/Shaman.lua
+++ b/KkthnxUI/Config/Elements/AuraWatchList/Shaman.lua
@@ -6,30 +6,6 @@ if K.Class ~= "SHAMAN" then
end
local list = {
- ["Player Aura"] = { -- 玩家光环组
- { AuraID = 546, UnitID = "player" }, -- 水上行走
- { AuraID = 195222, UnitID = "player" }, -- 风暴之鞭
- { AuraID = 198293, UnitID = "player" }, -- 疾风
- { AuraID = 197211, UnitID = "player" }, -- 空气之怒
- { AuraID = 260881, UnitID = "player" }, -- 幽灵狼
- { AuraID = 192106, UnitID = "player", Timeless = true }, -- 闪电护盾
- },
- ["Target Aura"] = { -- 目标光环组
- { AuraID = 61295, UnitID = "target", Caster = "player" }, -- 激流
- { AuraID = 51514, UnitID = "target", Caster = "player" }, -- 妖术
- { AuraID = 210873, UnitID = "target", Caster = "player" }, -- 妖术
- { AuraID = 211004, UnitID = "target", Caster = "player" }, -- 妖术
- { AuraID = 211010, UnitID = "target", Caster = "player" }, -- 妖术
- { AuraID = 211015, UnitID = "target", Caster = "player" }, -- 妖术
- { AuraID = 188389, UnitID = "target", Caster = "player" }, -- 烈焰震击
- { AuraID = 118905, UnitID = "target", Caster = "player" }, -- 闪电奔涌图腾
- { AuraID = 188089, UnitID = "target", Caster = "player" }, -- 大地之刺
- { AuraID = 197209, UnitID = "target", Caster = "player" }, -- 避雷针
- { AuraID = 207778, UnitID = "target", Caster = "player" }, -- 蒺藜
- { AuraID = 207400, UnitID = "target", Caster = "player" }, -- 先祖活力
- { AuraID = 269808, UnitID = "target", Caster = "player" }, -- 元素外露
- { AuraID = 334168, UnitID = "target", Caster = "player" }, -- 鞭笞烈焰
- },
["Special Aura"] = { -- 玩家重要光环组
{ AuraID = 73920, UnitID = "player" }, -- 治疗之雨
{ AuraID = 53390, UnitID = "player" }, -- 潮汐奔涌
diff --git a/KkthnxUI/Config/Elements/AuraWatchList/Warlock.lua b/KkthnxUI/Config/Elements/AuraWatchList/Warlock.lua
index 3652760d..f81f1846 100644
--- a/KkthnxUI/Config/Elements/AuraWatchList/Warlock.lua
+++ b/KkthnxUI/Config/Elements/AuraWatchList/Warlock.lua
@@ -6,45 +6,6 @@ if K.Class ~= "WARLOCK" then
end
local list = {
- ["Player Aura"] = { -- 玩家光环组
- { AuraID = 5697, UnitID = "player" }, -- 无尽呼吸
- { AuraID = 48018, UnitID = "player" }, -- 恶魔法阵
- { AuraID = 108366, UnitID = "player" }, -- 灵魂榨取
- { AuraID = 119899, UnitID = "player" }, -- 灼烧主人
- { AuraID = 196099, UnitID = "player" }, -- 牺牲魔典
- },
- ["Target Aura"] = { -- 目标光环组
- { AuraID = 603, UnitID = "target", Caster = "player" }, -- 末日降临
- { AuraID = 980, UnitID = "target", Caster = "player" }, -- 痛楚
- { AuraID = 710, UnitID = "target", Caster = "player" }, -- 放逐术
- { AuraID = 6358, UnitID = "target", Caster = "pet" }, -- 魅惑
- { AuraID = 89766, UnitID = "target", Caster = "pet" }, -- 巨斧投掷
- { AuraID = 6789, UnitID = "target", Caster = "player" }, -- 死亡缠绕
- { AuraID = 5484, UnitID = "target", Caster = "player" }, -- 恐惧嚎叫
- { AuraID = 27243, UnitID = "target", Caster = "player" }, -- 腐蚀之种
- { AuraID = 17877, UnitID = "target", Caster = "player" }, -- 暗影灼烧
- { AuraID = 48181, UnitID = "target", Caster = "player" }, -- 鬼影缠身
- { AuraID = 63106, UnitID = "target", Caster = "player" }, -- 生命虹吸
- { AuraID = 30283, UnitID = "target", Caster = "player" }, -- 暗影之怒
- { AuraID = 32390, UnitID = "target", Caster = "player" }, -- 暗影之拥
- { AuraID = 80240, UnitID = "target", Caster = "player" }, -- 浩劫
- { AuraID = 146739, UnitID = "target", Caster = "player" }, -- 腐蚀术
- { AuraID = 316099, UnitID = "target", Caster = "player" }, -- 痛苦无常
- { AuraID = 342938, UnitID = "target", Caster = "player" }, -- 痛苦无常(PVP蔓延痛苦)
- { AuraID = 118699, UnitID = "target", Caster = "player" }, -- 恐惧
- { AuraID = 205181, UnitID = "target", Caster = "player" }, -- 暗影烈焰
- { AuraID = 157736, UnitID = "target", Caster = "player" }, -- 献祭
- { AuraID = 196414, UnitID = "target", Caster = "player" }, -- 根除
- { AuraID = 199890, UnitID = "target", Caster = "player" }, -- 语言诅咒
- { AuraID = 199892, UnitID = "target", Caster = "player" }, -- 虚弱诅咒
- { AuraID = 270569, UnitID = "target", Caster = "player" }, -- 来自阴影
- { AuraID = 278350, UnitID = "target", Caster = "player" }, -- 邪恶污染
- { AuraID = 205179, UnitID = "target", Caster = "player" }, -- 诡异魅影
- { AuraID = 265931, UnitID = "target", Caster = "player" }, -- 燃烧
- { AuraID = 312321, UnitID = "target", Caster = "player" }, -- 碎魂奉纳
- { AuraID = 325640, UnitID = "target", Caster = "player" }, -- 灵魂腐化
- { AuraID = 322170, UnitID = "target", Caster = "player" }, -- 灾祸降临
- },
["Special Aura"] = { -- 玩家重要光环组
{ AuraID = 89751, UnitID = "pet" }, -- 魔刃风暴
{ AuraID = 216695, UnitID = "player" }, -- 被折磨的灵魂
diff --git a/KkthnxUI/Config/Elements/AuraWatchList/Warrior.lua b/KkthnxUI/Config/Elements/AuraWatchList/Warrior.lua
index 470dc1e5..77a825cf 100644
--- a/KkthnxUI/Config/Elements/AuraWatchList/Warrior.lua
+++ b/KkthnxUI/Config/Elements/AuraWatchList/Warrior.lua
@@ -6,29 +6,6 @@ if K.Class ~= "WARRIOR" then
end
local list = {
- ["Player Aura"] = { -- 玩家光环组
- { AuraID = 32216, UnitID = "player" }, -- 胜利
- { AuraID = 202602, UnitID = "player" }, -- 投入战斗
- { AuraID = 200954, UnitID = "player" }, -- 战争疤痕
- { AuraID = 202573, UnitID = "player" }, -- 报复
- { AuraID = 202574, UnitID = "player" }, -- 报复
- },
- ["Target Aura"] = { -- 目标光环组
- { AuraID = 355, UnitID = "target", Caster = "player" }, -- 嘲讽
- { AuraID = 772, UnitID = "target", Caster = "player" }, -- 撕裂
- { AuraID = 1715, UnitID = "target", Caster = "player" }, -- 断筋
- { AuraID = 1160, UnitID = "target", Caster = "player" }, -- 挫志怒吼
- { AuraID = 6343, UnitID = "target", Caster = "player" }, -- 雷霆一击
- { AuraID = 5246, UnitID = "target", Caster = "player" }, -- 破胆
- { AuraID = 12323, UnitID = "target", Caster = "player" }, -- 刺耳怒吼
- { AuraID = 105771, UnitID = "target", Caster = "player" }, -- 冲锋:定身
- { AuraID = 132169, UnitID = "target", Caster = "player" }, -- 风暴之锤
- { AuraID = 132168, UnitID = "target", Caster = "player" }, -- 震荡波
- { AuraID = 208086, UnitID = "target", Caster = "player" }, -- 巨人打击
- { AuraID = 115804, UnitID = "target", Caster = "player" }, -- 致死
- { AuraID = 280773, UnitID = "target", Caster = "player" }, -- 破城者
- { AuraID = 317491, UnitID = "target", Caster = "player", Value = true }, -- 有罪
- },
["Special Aura"] = { -- 玩家重要光环组
{ AuraID = 871, UnitID = "player" }, -- 盾墙
{ AuraID = 1719, UnitID = "player" }, -- 战吼
diff --git a/KkthnxUI/Config/Elements/FilterLists/AuraWatchSpells.lua b/KkthnxUI/Config/Elements/FilterLists/AuraWatchSpells.lua
index c9261f8f..49ee655c 100644
--- a/KkthnxUI/Config/Elements/FilterLists/AuraWatchSpells.lua
+++ b/KkthnxUI/Config/Elements/FilterLists/AuraWatchSpells.lua
@@ -9,15 +9,24 @@ local UIParent = UIParent
local AuraWatchList = {}
local groups = {
- ["Player Aura"] = { "LEFT", 6, "ICON", 30, { "BOTTOMRIGHT", UIParent, "BOTTOM", -160, 432 } },
- ["Target Aura"] = { "RIGHT", 6, "ICON", 36, { "BOTTOMLEFT", UIParent, "BOTTOM", 160, 468 } },
- ["Special Aura"] = { "LEFT", 6, "ICON", 36, { "BOTTOMRIGHT", UIParent, "BOTTOM", -160, 468 } },
+ -- ["Player Aura"] = { "LEFT", 6, "ICON", 30, { "BOTTOMRIGHT", UIParent, "BOTTOM", -160, 432 } },
+ -- ["Target Aura"] = { "RIGHT", 6, "ICON", 36, { "BOTTOMLEFT", UIParent, "BOTTOM", 160, 468 } },
+ -- ["Special Aura"] = { "LEFT", 6, "ICON", 36, { "BOTTOMRIGHT", UIParent, "BOTTOM", -160, 468 } },
+ -- ["Focus Aura"] = { "RIGHT", 6, "ICON", 35, { "BOTTOMLEFT", UIParent, "LEFT", 5, -230 } },
+ -- ["Spell Cooldown"] = { "UP", 6, "BAR", 20, { "BOTTOMRIGHT", UIParent, "BOTTOM", -380, 140 }, 150 },
+ -- ["Enchant Aura"] = { "LEFT", 6, "ICON", 36, { "BOTTOMRIGHT", UIParent, "BOTTOM", -160, 510 } },
+ -- ["Raid Buff"] = { "LEFT", 6, "ICON", 42, { "CENTER", UIParent, "CENTER", -220, 300 } },
+ -- ["Raid Debuff"] = { "RIGHT", 6, "ICON", 42, { "CENTER", UIParent, "CENTER", 220, 300 } },
+ -- ["Warning"] = { "RIGHT", 6, "ICON", 42, { "BOTTOMLEFT", UIParent, "BOTTOM", 160, 510 } },
+ -- ["InternalCD"] = { "UP", 6, "BAR", 20, { "BOTTOMRIGHT", UIParent, "BOTTOM", -425, 600 }, 150 },
+
+ ["Special Aura"] = { "LEFT", 6, "ICON", 30, { "BOTTOMRIGHT", UIParent, "BOTTOM", -160, 432 } },
["Focus Aura"] = { "RIGHT", 6, "ICON", 35, { "BOTTOMLEFT", UIParent, "LEFT", 5, -230 } },
["Spell Cooldown"] = { "UP", 6, "BAR", 20, { "BOTTOMRIGHT", UIParent, "BOTTOM", -380, 140 }, 150 },
- ["Enchant Aura"] = { "LEFT", 6, "ICON", 36, { "BOTTOMRIGHT", UIParent, "BOTTOM", -160, 510 } },
+ ["Enchant Aura"] = { "LEFT", 6, "ICON", 36, { "BOTTOMRIGHT", UIParent, "BOTTOM", -160, 468 } },
["Raid Buff"] = { "LEFT", 6, "ICON", 42, { "CENTER", UIParent, "CENTER", -220, 300 } },
["Raid Debuff"] = { "RIGHT", 6, "ICON", 42, { "CENTER", UIParent, "CENTER", 220, 300 } },
- ["Warning"] = { "RIGHT", 6, "ICON", 42, { "BOTTOMLEFT", UIParent, "BOTTOM", 160, 510 } },
+ ["Warning"] = { "RIGHT", 6, "ICON", 36, { "BOTTOMLEFT", UIParent, "BOTTOM", 160, 468 } },
["InternalCD"] = { "UP", 6, "BAR", 20, { "BOTTOMRIGHT", UIParent, "BOTTOM", -425, 600 }, 150 },
}
diff --git a/KkthnxUI/Config/Elements/FilterLists/AutoQuest.lua b/KkthnxUI/Config/Elements/FilterLists/AutoQuest.lua
index 5750819b..6d8ac7cb 100644
--- a/KkthnxUI/Config/Elements/FilterLists/AutoQuest.lua
+++ b/KkthnxUI/Config/Elements/FilterLists/AutoQuest.lua
@@ -2,48 +2,49 @@ local C = KkthnxUI[2]
C.AutoQuestData = {
IgnoreQuestNPC = {
- [88570] = true,
- [87391] = true,
- [111243] = true,
- [108868] = true,
- [101462] = true,
- [43929] = true,
- [14847] = true,
- [119388] = true,
- [114719] = true,
- [121263] = true,
- [126954] = true,
- [124312] = true,
- [103792] = true,
- [101880] = true,
- [141584] = true,
- [142063] = true,
- [143388] = true,
- [98489] = true,
- [135690] = true,
- [105387] = true,
- [93538] = true,
- [154534] = true,
- [150987] = true,
- [150563] = true,
- [143555] = true,
- [168430] = true,
- [160248] = true,
- [127037] = true,
- [326027] = true,
- [162804] = true,
+ [88570] = true, -- Fate-Twister Tiklal
+ [87391] = true, -- Fate-Twister Seress
+ [111243] = true, -- Archmage Lan'dalock
+ [108868] = true, -- Hunter's Order Hall
+ [101462] = true, -- Reaves
+ [43929] = true, -- 4000
+ [14847] = true, -- Darkmoon
+ [119388] = true, -- Chief Hatton
+ [114719] = true, -- Merchant Selim
+ [121263] = true, -- Grand Artificer Rommel
+ [126954] = true, -- Tulayn
+ [124312] = true, -- Tulayn
+ [103792] = true, -- Grivata
+ [101880] = true, -- Tektek
+ [141584] = true, -- Zul'win
+ [142063] = true, -- Tezlan
+ [143388] = true, -- Drudza
+ [98489] = true, -- Shipwrecked Prisoner
+ [135690] = true, -- Undead Captain
+ [105387] = true, -- Andus
+ [93538] = true, -- Darynis
+ [154534] = true, -- Abandoned Slum Achang
+ [150987] = true, -- Shaun Vicks, Stratholme
+ [150563] = true, -- Skakite, Mecha Gun Order Daily
+ [143555] = true, -- Sand Hilberman, Zuldazar PvP Quartermaster
+ [168430] = true, -- Dakteris, Green Challenge
+ [160248] = true, -- Archivist Fian, Sinful Soul Fragment
+ [127037] = true, -- Nabiru
+ [326027] = true, -- Transport Station Recycling Generator DX-82
+ [162804] = true, -- Ve'nari
},
IgnoreGossipNPC = {
-
- [86945] = true,
- [86933] = true,
- [86927] = true,
- [86934] = true,
- [86682] = true,
- [86964] = true,
- [86946] = true,
-
+ -- Bodyguards
+ [86945] = true, -- Aeda Brightdawn (Horde)
+ [86933] = true, -- Vivianne (Horde)
+ [86927] = true, -- Delvar Ironfist (Alliance)
+ [86934] = true, -- Defender Illona (Alliance)
+ [86682] = true, -- Tormmok
+ [86964] = true, -- Leorajh
+ [86946] = true, -- Talonpriest Ishaal
+
+ -- Sassy Imps
[95139] = true,
[95141] = true,
[95142] = true,
@@ -54,119 +55,118 @@ C.AutoQuestData = {
[95200] = true,
[95201] = true,
- [79740] = true,
- [79953] = true,
- [84268] = true,
- [84511] = true,
- [84684] = true,
- [117871] = true,
- [155101] = true,
- [155261] = true,
- [150122] = true,
- [150131] = true,
-
- [173021] = true,
- [171589] = true,
- [171787] = true,
- [171795] = true,
- [171821] = true,
- [172558] = true,
- [172572] = true,
- [175513] = true,
- [165196] = true,
- [180458] = true,
- [182681] = true,
- [183262] = true,
- [184587] = true,
+ -- Misc NPCs
+ [79740] = true, -- Warmaster Zog (Horde)
+ [79953] = true, -- Lieutenant Thorn (Alliance)
+ [84268] = true, -- Lieutenant Thorn (Alliance)
+ [84511] = true, -- Lieutenant Thorn (Alliance)
+ [84684] = true, -- Lieutenant Thorn (Alliance)
+ [117871] = true, -- War Councilor Victoria (Class Challenges @ Broken Shore)
+ [155101] = true, -- Elemental Essence Integrator
+ [155261] = true, -- Shaun Vicks, Stratholme
+ [150122] = true, -- Honor Hold Mage
+ [150131] = true, -- Stormwind Mage
+
+ [173021] = true, -- Glyphic Tauren
+ [171589] = true, -- General Draven
+ [171787] = true, -- Scribe Addalyce
+ [171795] = true, -- Countess Meara
+ [171821] = true, -- Baroness Draka
+ [172558] = true, -- Ela, the Pathfinder (Tutor)
+ [172572] = true, -- Theristra Balevine (Tutor)
+ [175513] = true, -- Naslya, Judicator of Pride
+ [165196] = true, -- Court of Ashes, Xy'tal
+ [180458] = true, -- Court of Ashes, Emperor's Illusion
+ [182681] = true, -- Zaremothides, Enhanced Console
+ [183262] = true, -- Zaremothides, Echomimic Originator
+ [184587] = true, -- Market, T'apiksh
},
AutoSelectFirstOptionList = {
- [97004] = true,
- [96782] = true,
- [93188] = true,
- [107486] = true,
- [167839] = true,
- },
-
- AutoGossipTypes = {
- ["taxi"] = true,
- ["gossip"] = true,
- ["banker"] = true,
- ["vendor"] = true,
- ["trainer"] = true,
+ [97004] = true, -- "Red" Jack Findle, Rogue Class Hall
+ [96782] = true, -- Lucian Trias, Rogue Class Hall
+ [93188] = true, -- Mongar, Rogue Class Hall
+ [107486] = true, -- Stars' Private Investigator
+ [167839] = true, -- Soul Residue, Tower Climb
},
IgnoreInstances = {
- [1571] = true,
- [1626] = true,
+ [1571] = true, -- Withered J'im
+ [1626] = true, -- Twisting Corridors
},
SkipConfirmNPCs = {
- [57850] = true,
- [55382] = true,
- [54334] = true,
+ [57850] = true, -- Teleportologist Fozlebub
+ [55382] = true, -- Darkmoon Faire Mystic Mage (Horde)
+ [54334] = true, -- Darkmoon Faire Mystic Mage (Alliance)
},
ItemBlacklist = {
- [31690] = 79343,
- [31691] = 79340,
- [31692] = 79341,
-
- [29443] = 71635,
- [29444] = 71636,
- [29445] = 71637,
- [29446] = 71638,
- [29451] = 71715,
- [29456] = 71951,
- [29457] = 71952,
- [29458] = 71953,
- [29464] = 71716,
-
- ["progress_79264"] = 79264,
- ["progress_79265"] = 79265,
- ["progress_79266"] = 79266,
- ["progress_79267"] = 79267,
- ["progress_79268"] = 79268,
-
- ["38180"] = 122424,
- ["38193"] = 122423,
- ["38182"] = 122418,
- ["38196"] = 122417,
- ["38179"] = 122400,
- ["38192"] = 122404,
- ["38194"] = 122420,
- ["38202"] = 122419,
- ["38178"] = 122402,
- ["38191"] = 122406,
- ["38184"] = 122413,
- ["38198"] = 122414,
- ["38177"] = 122403,
- ["38190"] = 122399,
- ["38181"] = 122421,
- ["38195"] = 122422,
- ["38185"] = 122411,
- ["38199"] = 122409,
- ["38187"] = 122412,
- ["38201"] = 122410,
- ["38186"] = 122408,
- ["38200"] = 122407,
- ["38183"] = 122416,
- ["38197"] = 122415,
- ["38176"] = 122405,
- ["38189"] = 122401,
-
- [31664] = 88604,
+ -- Inscription weapons
+ [31690] = 79343, -- Inscribed Tiger Staff
+ [31691] = 79340, -- Inscribed Crane Staff
+ [31692] = 79341, -- Inscribed Serpent Staff
+
+ -- Darkmoon Faire artifacts
+ [29443] = 71635, -- Imbued Crystal
+ [29444] = 71636, -- Monstrous Egg
+ [29445] = 71637, -- Mysterious Grimoire
+ [29446] = 71638, -- Ornate Weapon
+ [29451] = 71715, -- A Treatise on Strategy
+ [29456] = 71951, -- Banner of the Fallen
+ [29457] = 71952, -- Captured Insignia
+ [29458] = 71953, -- Fallen Adventurer's Journal
+ [29464] = 71716, -- Soothsayer's Runes
+
+ -- Tiller Gifts
+ ["progress_79264"] = 79264, -- Ruby Shard
+ ["progress_79265"] = 79265, -- Blue Feather
+ ["progress_79266"] = 79266, -- Jade Cat
+ ["progress_79267"] = 79267, -- Lovely Apple
+ ["progress_79268"] = 79268, -- Marsh Lily
+
+ -- Garrison scouting missives
+ ["38180"] = 122424, -- Scouting Missive: Broken Precipice
+ ["38193"] = 122423, -- Scouting Missive: Broken Precipice
+ ["38182"] = 122418, -- Scouting Missive: Darktide Roost
+ ["38196"] = 122417, -- Scouting Missive: Darktide Roost
+ ["38179"] = 122400, -- Scouting Missive: Everbloom Wilds
+ ["38192"] = 122404, -- Scouting Missive: Everbloom Wilds
+ ["38194"] = 122420, -- Scouting Missive: Gorian Proving Grounds
+ ["38202"] = 122419, -- Scouting Missive: Gorian Proving Grounds
+ ["38178"] = 122402, -- Scouting Missive: Iron Siegeworks
+ ["38191"] = 122406, -- Scouting Missive: Iron Siegeworks
+ ["38184"] = 122413, -- Scouting Missive: Lost Veil Anzu
+ ["38198"] = 122414, -- Scouting Missive: Lost Veil Anzu
+ ["38177"] = 122403, -- Scouting Missive: Magnarok
+ ["38190"] = 122399, -- Scouting Missive: Magnarok
+ ["38181"] = 122421, -- Scouting Missive: Mok'gol Watchpost
+ ["38195"] = 122422, -- Scouting Missive: Mok'gol Watchpost
+ ["38185"] = 122411, -- Scouting Missive: Pillars of Fate
+ ["38199"] = 122409, -- Scouting Missive: Pillars of Fate
+ ["38187"] = 122412, -- Scouting Missive: Shattrath Harbor
+ ["38201"] = 122410, -- Scouting Missive: Shattrath Harbor
+ ["38186"] = 122408, -- Scouting Missive: Skettis
+ ["38200"] = 122407, -- Scouting Missive: Skettis
+ ["38183"] = 122416, -- Scouting Missive: Socrethar's Rise
+ ["38197"] = 122415, -- Scouting Missive: Socrethar's Rise
+ ["38176"] = 122405, -- Scouting Missive: Stonefury Cliffs
+ ["38189"] = 122401, -- Scouting Missive: Stonefury Cliffs
+
+ -- Misc
+ [31664] = 88604, -- Nat's Fishing Journal
},
CashRewards = {
- [45724] = 1e5,
- [64491] = 2e6,
-
- [138127] = 15,
- [138129] = 11,
- [138131] = 24,
- [138123] = 15,
- [138125] = 16,
- [138133] = 27,
+ [45724] = 1e5, -- Champion's Purse
+ [64491] = 2e6, -- Royal Reward
+
+ -- Items from the Sixtrigger brothers quest chain in Stormheim
+ [138127] = 15, -- Mysterious Coin, 15 copper
+ [138129] = 11, -- Swatch of Priceless Silk, 11 copper
+ [138131] = 24, -- Magical Sprouting Beans, 24 copper
+ [138123] = 15, -- Shiny Gold Nugget, 15 copper
+ [138125] = 16, -- Crystal Clear Gemstone, 16 copper
+ [138133] = 27, -- Elixir of Endless Wonder, 27 copper
},
}
diff --git a/KkthnxUI/Config/GUI.lua b/KkthnxUI/Config/GUI.lua
index b9706d1e..3c998bef 100644
--- a/KkthnxUI/Config/GUI.lua
+++ b/KkthnxUI/Config/GUI.lua
@@ -500,7 +500,6 @@ local Automation = function(self)
-- Invite Management sub-section
Window:CreateSection("Invite Management")
- Window:CreateSwitch("Automation", "AutoBlockStrangerInvites", L["Block Invites From Strangers"])
Window:CreateSwitch("Automation", "AutoInvite", L["Accept Invites From Friends & Guild Members"])
Window:CreateSwitch("Automation", "AutoDeclineDuels", L["Decline PvP Duels"])
Window:CreateSwitch("Automation", "AutoDeclinePetDuels", L["Decline Pet Duels"])
@@ -520,12 +519,13 @@ local Automation = function(self)
Window:CreateSection("Miscellaneous Options")
Window:CreateSwitch("Automation", "AutoCollapse", L["Auto Collapse Objective Tracker"])
Window:CreateSwitch("Automation", "AutoGoodbye", L["Say Goodbye After Dungeon Completion"])
- Window:CreateSwitch("Automation", "AutoOpenItems", L["Auto Open Items In Your Inventory"])
Window:CreateSwitch("Automation", "AutoKeystone", newFeatureIcon .. L["Auto Place Mythic Keystones"])
+ Window:CreateSwitch("Automation", "AutoOpenItems", L["Auto Open Items In Your Inventory"])
Window:CreateSwitch("Automation", "AutoRelease", L["Auto Release in Battlegrounds & Arenas"])
Window:CreateSwitch("Automation", "AutoScreenshot", L["Auto Screenshot Achievements"])
Window:CreateSwitch("Automation", "AutoSetRole", L["Auto Set Your Role In Groups"])
Window:CreateSwitch("Automation", "AutoSkipCinematic", L["Auto Skip All Cinematics/Movies"])
+ Window:CreateSwitch("Automation", "AutoSummon", L["Auto Accept Summon Requests"])
Window:CreateSwitch("Automation", "NoBadBuffs", L["Automatically Remove Annoying Buffs"])
end
@@ -629,7 +629,6 @@ local Chat = function(self)
-- Chat appearance
Window:CreateSection("Appearance")
Window:CreateSwitch("Chat", "Emojis", L["Show Emojis In Chat"] .. emojiExampleIcon)
- Window:CreateSwitch("Chat", "RoleIcons", L["Show Role Icons In Chat"])
Window:CreateSwitch("Chat", "ChatItemLevel", L["Show ItemLevel on ChatFrames"])
Window:CreateDropdown("Chat", "TimestampFormat", L["Custom Chat Timestamps"])
@@ -648,28 +647,21 @@ local Chat = function(self)
Window:CreateSection(L["Fading"])
Window:CreateSwitch("Chat", "Fading", L["Fade Chat Text"])
Window:CreateSlider("Chat", "FadingTimeVisible", L["Fading Chat Visible Time"], 5, 120, 1)
-
- Window:CreateSection(FILTERS)
- Window:CreateSwitch("Chat", "EnableFilter", enableTextColor .. L["Enable Chat Filter"])
- Window:CreateSwitch("Chat", "BlockSpammer", L["Block Repeated Spammer Messages"])
- Window:CreateSwitch("Chat", "BlockStranger", L["Block Whispers From Strangers"])
- Window:CreateSlider("Chat", "FilterMatches", L["Filter Matches Number"], 1, 3, 1)
- Window:CreateEditBox("Chat", "ChatFilterList", L["ChatFilter BlackList"], "Enter words you want blacklisted|n|nUse SPACES between each word|n|nPress enter when you are done", UpdateFilterList)
- Window:CreateEditBox("Chat", "ChatFilterWhiteList", L["ChatFilter WhiteList"], "Enter words you want whitelisted|n|nUse SPACES between each word|n|nPress enter when you are done", UpdateFilterWhiteList)
end
local DataText = function(self)
local Window = self:CreateWindow(L["DataText"])
Window:CreateSection(GENERAL)
+ Window:CreateSwitch("DataText", "Coords", L["Enable Positon Coords"])
Window:CreateSwitch("DataText", "Friends", L["Enable Friends Info"])
Window:CreateSwitch("DataText", "Gold", L["Enable Currency Info"])
Window:CreateSwitch("DataText", "Guild", L["Enable Guild Info"])
Window:CreateSwitch("DataText", "Latency", L["Enable Latency Info"])
Window:CreateSwitch("DataText", "Location", L["Enable Minimap Location"])
+ Window:CreateSwitch("DataText", "Spec", "Enable Specialization Info")
Window:CreateSwitch("DataText", "System", L["Enable System Info"])
Window:CreateSwitch("DataText", "Time", L["Enable Minimap Time"])
- Window:CreateSwitch("DataText", "Coords", L["Enable Positon Coords"])
-- Section: Icon Colors
Window:CreateSection("Icon Colors")
@@ -696,6 +688,8 @@ local General = function(self)
Window:CreateSwitch("General", "NoTutorialButtons", L["Disable 'Some' Blizzard Tutorials"])
Window:CreateSwitch("General", "VersionCheck", L["Enable Version Checking"])
+ Window:CreateDropdown("General", "GlowMode", "Button Glow Mode")
+
-- Border Style
Window:CreateDropdown("General", "BorderStyle", L["Border Style"])
diff --git a/KkthnxUI/Config/Settings.lua b/KkthnxUI/Config/Settings.lua
index afcb0807..4f311d47 100644
--- a/KkthnxUI/Config/Settings.lua
+++ b/KkthnxUI/Config/Settings.lua
@@ -131,7 +131,6 @@ C["Announcements"] = {
-- Automation
C["Automation"] = {
AutoKeystone = false,
- AutoBlockStrangerInvites = false,
AutoCollapse = false,
AutoDeclineDuels = false,
AutoDeclinePetDuels = false,
@@ -150,7 +149,7 @@ C["Automation"] = {
AutoSummon = false,
NoBadBuffs = false,
WhisperInvite = "inv+",
- WhisperInviteGuildFriends = false,
+ WhisperInviteRestriction = true, -- Testing
}
C["Inventory"] = {
@@ -230,25 +229,18 @@ C["Auras"] = {
-- Chat
C["Chat"] = {
- BlockSpammer = true,
Background = true,
- BlockStranger = false,
- ChatFilterList = "%*",
- ChatFilterWhiteList = "",
ChatItemLevel = true,
ChatMenu = true,
Emojis = false,
Enable = true,
- EnableFilter = true,
Fading = true,
FadingTimeVisible = 100,
- FilterMatches = 1,
Freedom = true,
Height = 170,
Lock = true,
LogMax = 0,
OldChatNames = false,
- RoleIcons = false,
Sticky = false,
WhisperColor = true,
Width = 400,
@@ -276,6 +268,7 @@ C["DataText"] = {
IconColor = { 102 / 255, 157 / 255, 255 / 255 },
Latency = true,
Location = true,
+ Spec = false,
System = true,
Time = true,
}
@@ -324,6 +317,15 @@ C["General"] = {
Profiles = {
Options = {},
},
+ GlowMode = {
+ Options = {
+ ["Pixel"] = 1,
+ ["Autocast"] = 2,
+ ["Action Button"] = 3,
+ ["Proc Glow"] = 4,
+ },
+ Value = 3,
+ },
}
-- Loot
@@ -406,6 +408,7 @@ C["Misc"] = {
ShowWowHeadLinks = false,
SlotDurability = false,
TradeTabs = false,
+ EasyMarking = false,
EasyMarkKey = {
Options = {
["CTRL"] = 1,
@@ -454,7 +457,7 @@ C["Nameplate"] = {
InsecureColor = { 1, 0, 0 },
InsideView = true,
MaxAuras = 5,
- MinAlpha = 1,
+ MinAlpha = 0.6,
MinScale = 1,
CVarOnlyNames = false,
CVarShowNPCs = false,
diff --git a/KkthnxUI/Core/AddOns.lua b/KkthnxUI/Core/AddOns.lua
index fe78e134..3e19fbb7 100644
--- a/KkthnxUI/Core/AddOns.lua
+++ b/KkthnxUI/Core/AddOns.lua
@@ -266,6 +266,8 @@ local function ForceCursorTrail()
return
end
+ print(C_AddOns.IsAddOnLoaded("CursorTrail"))
+
if CursorTrail_PlayerConfig then
table_wipe(CursorTrail_PlayerConfig)
end
diff --git a/KkthnxUI/Core/CheckVersion.lua b/KkthnxUI/Core/CheckVersion.lua
index eef0207b..270783b5 100644
--- a/KkthnxUI/Core/CheckVersion.lua
+++ b/KkthnxUI/Core/CheckVersion.lua
@@ -16,28 +16,24 @@ local GetTime = GetTime
local IsInGroup = IsInGroup
local IsInGuild = IsInGuild
-local lastVCTime = 0
-local isVCInit
-local UIUpdateNotice
-
-local function HandleVersionTag(version)
- local major, minor = string_split(".", version)
- major, minor = tonumber(major), tonumber(minor)
+local lastVCTime, isVCInit = 0
+local tn = tonumber
+local function HandleVersonTag(version)
+ local major, minor = strsplit(".", version)
+ major, minor = tn(major), tn(minor)
if K.LibBase64:CV(major) then
major, minor = 0, 0
-
if K.isDeveloper and author then
print("Moron: " .. author)
end
end
-
return major, minor
end
function Module:VersionCheck_Compare(new, old, author)
- local new1, new2 = HandleVersionTag(new, author)
- local old1, old2 = HandleVersionTag(old)
+ local new1, new2 = HandleVersonTag(new, author)
+ local old1, old2 = HandleVersonTag(old)
if new1 > old1 or (new1 == old1 and new2 > old2) then
return "IsNew"
elseif new1 < old1 or (new1 == old1 and new2 < old2) then
@@ -45,70 +41,79 @@ function Module:VersionCheck_Compare(new, old, author)
end
end
+function Module:CreateUpdateNoticeFrame()
+ local frame = CreateFrame("Frame", "KKUI_UpdateNotice", UIParent)
+ frame:SetSize(420, 150)
+ frame:SetPoint("CENTER", UIParent, "CENTER")
+ frame:CreateBorder()
+
+ frame.Texture = frame:CreateTexture(nil, "OVERLAY")
+ frame.Texture:SetTexture("Interface\\HELPFRAME\\HelpIcon-ReportAbuse")
+ frame.Texture:SetPoint("TOP", frame, "TOP", 0, 8)
+
+ frame.Text = frame:CreateFontString(nil, "OVERLAY")
+ frame.Text:SetWidth(400)
+ frame.Text:SetFontObject(K.UIFont)
+ frame.Text:SetFont(select(1, frame.Text:GetFont()), 15, select(3, frame.Text:GetFont()))
+ frame.Text:SetPoint("CENTER", frame, "CENTER")
+
+ frame.EditBox = CreateFrame("EditBox", nil, frame)
+ frame.EditBox:SetPoint("BOTTOM", frame, "BOTTOM", 0, 8)
+ frame.EditBox:SetWidth(330)
+ frame.EditBox:SetHeight(19)
+ frame.EditBox:SetMultiLine(false)
+ frame.EditBox:SetAutoFocus(false)
+ frame.EditBox:SetFontObject(K.UIFont)
+ frame.EditBox:CreateBorder()
+
+ frame.EditBox.Text = frame.EditBox:CreateFontString(nil, "OVERLAY")
+ frame.EditBox.Text:SetFontObject(K.UIFont)
+ frame.EditBox.Text:SetPoint("BOTTOM", frame.EditBox, "TOP", 0, 2)
+
+ frame.OkayButton = CreateFrame("Button", nil, frame)
+ frame.OkayButton:SetPoint("TOP", frame, "BOTTOM", 0, -6)
+ frame.OkayButton:SetSize(420, 24)
+ frame.OkayButton:SkinButton()
+ frame.OkayButton:SetScript("OnClick", function()
+ if frame:IsShown() then
+ frame:Hide()
+ end
+ end)
+
+ frame.OkayButton.Text = frame.OkayButton:CreateFontString(nil, "ARTWORK")
+ frame.OkayButton.Text:SetFontObject(K.UIFont)
+ frame.OkayButton.Text:SetFont(select(1, frame.OkayButton.Text:GetFont()), 13, select(3, frame.OkayButton.Text:GetFont()))
+ frame.OkayButton.Text:SetText("I am going to update right now")
+ frame.OkayButton.Text:SetTextColor(0, 1, 0)
+ frame.OkayButton.Text:SetPoint("CENTER", frame.OkayButton, "CENTER", 0, 0)
+ K.AddTooltip(frame.OkayButton, "ANCHOR_BOTTOM", K.SystemColor .. "Obviously |cff669dffKkthnx|r is trusting you to go update and not complain about a missing feature or a bug because you are out of date |CFFFF0000<3|r")
+
+ return frame
+end
+
function Module:VersionCheck_Create(text)
if not C["General"].VersionCheck then
return
end
- UIUpdateNotice = CreateFrame("Frame", "KKUI_UpdateNotice", UIParent)
- UIUpdateNotice:SetSize(420, 150)
- UIUpdateNotice:SetPoint("CENTER", UIParent, "CENTER")
- UIUpdateNotice:CreateBorder()
-
- UIUpdateNotice.Texture = UIUpdateNotice:CreateTexture(nil, "OVERLAY")
- UIUpdateNotice.Texture:SetTexture("Interface\\HELPFRAME\\HelpIcon-ReportAbuse")
- UIUpdateNotice.Texture:SetPoint("TOP", UIUpdateNotice, "TOP", 0, 8)
-
- UIUpdateNotice.Text = UIUpdateNotice:CreateFontString(nil, "OVERLAY")
- UIUpdateNotice.Text:SetWidth(400)
- UIUpdateNotice.Text:SetFontObject(K.UIFont)
- UIUpdateNotice.Text:SetText(text)
- UIUpdateNotice.Text:SetFont(select(1, UIUpdateNotice.Text:GetFont()), 15, select(3, UIUpdateNotice.Text:GetFont()))
- UIUpdateNotice.Text:SetPoint("CENTER", UIUpdateNotice, "CENTER")
-
- UIUpdateNotice.EditBox = CreateFrame("EditBox", nil, UIUpdateNotice)
- UIUpdateNotice.EditBox:SetPoint("BOTTOM", UIUpdateNotice, "BOTTOM", 0, 8)
- UIUpdateNotice.EditBox:SetText("https://www.curseforge.com/wow/addons/kkthnxui")
- UIUpdateNotice.EditBox:SetWidth(330)
- UIUpdateNotice.EditBox:SetHeight(19)
- UIUpdateNotice.EditBox:SetMultiLine(false)
- UIUpdateNotice.EditBox:SetAutoFocus(false)
- UIUpdateNotice.EditBox:SetFontObject(K.UIFont)
- UIUpdateNotice.EditBox:CreateBorder()
-
- UIUpdateNotice.EditBox.Text = UIUpdateNotice.EditBox:CreateFontString(nil, "OVERLAY")
- UIUpdateNotice.EditBox.Text:SetFontObject(K.UIFont)
- UIUpdateNotice.EditBox.Text:SetText(K.SystemColor .. "Download Latest Release|r")
- UIUpdateNotice.EditBox.Text:SetPoint("BOTTOM", UIUpdateNotice.EditBox, "TOP", 0, 2)
-
- UIUpdateNotice.OkayButton = CreateFrame("Button", nil, UIUpdateNotice)
- UIUpdateNotice.OkayButton:SetPoint("TOP", UIUpdateNotice, "BOTTOM", 0, -6)
- UIUpdateNotice.OkayButton:RegisterForClicks("AnyUp")
- UIUpdateNotice.OkayButton:SetSize(420, 24)
- UIUpdateNotice.OkayButton:SkinButton()
- UIUpdateNotice.OkayButton:SetScript("OnClick", function()
- if UIUpdateNotice:IsShown() then
- UIUpdateNotice:Hide()
- end
- end)
-
- UIUpdateNotice.OkayButton.Text = UIUpdateNotice.OkayButton:CreateFontString(nil, "ARTWORK")
- UIUpdateNotice.OkayButton.Text:SetFontObject(K.UIFont)
- UIUpdateNotice.OkayButton.Text:SetFont(select(1, UIUpdateNotice.OkayButton.Text:GetFont()), 13, select(3, UIUpdateNotice.OkayButton.Text:GetFont()))
- UIUpdateNotice.OkayButton.Text:SetText("I am going to update right now")
- UIUpdateNotice.OkayButton.Text:SetTextColor(0, 1, 0)
- UIUpdateNotice.OkayButton.Text:SetPoint("CENTER", UIUpdateNotice.OkayButton, "CENTER", 0, 0)
- K.AddTooltip(UIUpdateNotice.OkayButton, "ANCHOR_BOTTOM", K.SystemColor .. "Obviously |cff669dffKkthnx|r is trusting you to go update and not complain about a missing feature or a bug because you are out of date |CFFFF0000<3|r")
+ -- HelpTip:Show(ChatFrame1, {
+ -- text = text,
+ -- buttonStyle = HelpTip.ButtonStyle.Okay,
+ -- targetPoint = HelpTip.Point.TopEdgeCenter,
+ -- offsetY = 10,
+ -- })
- return UIUpdateNotice
+ local frame = Module:CreateUpdateNoticeFrame()
+ frame.Text:SetText(text)
+ frame:Show()
end
function Module:VersionCheck_Init()
if not isVCInit then
local status = Module:VersionCheck_Compare(KkthnxUIDB.DetectVersion, K.Version)
if status == "IsNew" then
- local release = string_gsub(KkthnxUIDB.DetectVersion, "(%d+)$", "0")
- Module:VersionCheck_Create(string_format("|cff669dffKkthnxUI|r is out of date, the latest release is |cff70C0F5%s|r", release))
+ local release = gsub(KkthnxUIDB.DetectVersion, "(%d+)$", "0")
+ Module:VersionCheck_Create(format("|cff669dffKkthnxUI|r is out of date, the latest release is |cff70C0F5%s|r", release))
elseif status == "IsOld" then
KkthnxUIDB.DetectVersion = K.Version
end
@@ -129,7 +134,6 @@ function Module:VersionCheck_Update(...)
if prefix ~= "KKUIVersionCheck" then
return
end
-
if Ambiguate(author, "none") == K.Name then
return
end
@@ -146,16 +150,9 @@ end
function Module:VersionCheck_UpdateGroup()
if not IsInGroup() then
- --print("Not in a group")
return
end
-
- -- Check if the player has changed groups
- if not Module.lastGroup or Module.lastGroup ~= K.CheckChat() then
- Module.lastGroup = K.CheckChat()
- Module:VersionCheck_Send(Module.lastGroup)
- -- print("Sent version check to group: " .. Module.lastGroup)
- end
+ Module:VersionCheck_Send(IsPartyLFG() and "INSTANCE_CHAT" or IsInRaid() and "RAID" or "PARTY")
end
function Module:OnEnable()
@@ -170,12 +167,3 @@ function Module:OnEnable()
Module:VersionCheck_UpdateGroup()
K:RegisterEvent("GROUP_ROSTER_UPDATE", Module.VersionCheck_UpdateGroup)
end
-
--- Register a slash command
-SLASH_KKUIVERSIONCHECK1 = "/kkvc"
-
--- Slash command handler
-SlashCmdList["KKUIVERSIONCHECK"] = function(msg)
- print("Version check command triggered")
- Module:VersionCheck_Init()
-end
diff --git a/KkthnxUI/Core/Colors.lua b/KkthnxUI/Core/Colors.lua
index 952de5b3..47868db6 100644
--- a/KkthnxUI/Core/Colors.lua
+++ b/KkthnxUI/Core/Colors.lua
@@ -45,18 +45,16 @@ oUF.colors.reaction = {
}
oUF.colors.selection = {
- [0] = { 0.87, 0.37, 0.37 }, -- HOSTILE
- [1] = { 0.87, 0.37, 0.37 }, -- UNFRIENDLY
- [2] = { 0.85, 0.77, 0.36 }, -- NEUTRAL
- [3] = { 0.29, 0.67, 0.30 }, -- FRIENDLY
- [4] = { 0, 0, 1 }, -- PLAYER_SIMPLE
- [5] = { 0, 0, 1 }, -- PLAYER_EXTENDED
- [6] = { 0, 0, 1 }, -- PARTY
- [7] = { 0, 0, 1 }, -- PARTY_PVP
- [8] = { 0, 0, 1 }, -- FRIEND
- [9] = { 0.5, 0.5, 0.5 }, -- DEAD
- [12] = { 1, 1, 0.55 }, -- SELF, buggy
- [13] = { 0, 0.6, 0 }, -- BATTLEGROUND_FRIENDLY_PVP
+ [0] = { 1.00, 0.18, 0.18 }, -- HOSTILE
+ [1] = { 1.00, 0.51, 0.20 }, -- UNFRIENDLY
+ [2] = { 1.00, 0.85, 0.20 }, -- NEUTRAL
+ [3] = { 0.20, 0.71, 0.00 }, -- FRIENDLY
+ [5] = { 0.40, 0.53, 1.00 }, -- PLAYER_EXTENDED
+ [6] = { 0.40, 0.20, 1.00 }, -- PARTY
+ [7] = { 0.73, 0.20, 1.00 }, -- PARTY_PVP
+ [8] = { 0.20, 1.00, 0.42 }, -- FRIEND
+ [9] = { 0.60, 0.60, 0.60 }, -- DEAD
+ [13] = { 0.10, 0.58, 0.28 }, -- BATTLEGROUND_FRIENDLY_PVP
}
oUF.colors.power = {
diff --git a/KkthnxUI/Core/Commands.lua b/KkthnxUI/Core/Commands.lua
index 6ae367aa..814c034d 100644
--- a/KkthnxUI/Core/Commands.lua
+++ b/KkthnxUI/Core/Commands.lua
@@ -94,11 +94,15 @@ local function CheckQuestStatus(questid)
end
if C_QuestLog_IsQuestFlaggedCompleted(questid) == true then
- UIErrorsFrame:AddMessage(QuestCheckComplete .. "Quest " .. "|CFFFFFF00[" .. questid .. "]|r" .. L["CheckQuestComplete"])
+ UIErrorsFrame:AddMessage(
+ QuestCheckComplete .. "Quest " .. "|CFFFFFF00[" .. questid .. "]|r" .. L["CheckQuestComplete"]
+ )
PlaySound("878")
K.Print(WoWHeadLoc .. questid)
else
- UIErrorsFrame:AddMessage(QuestCheckIncomplete .. "Quest " .. "|CFFFFFF00[" .. questid .. "]|r" .. L["CheckQuestNotComplete"])
+ UIErrorsFrame:AddMessage(
+ QuestCheckIncomplete .. "Quest " .. "|CFFFFFF00[" .. questid .. "]|r" .. L["CheckQuestNotComplete"]
+ )
PlaySound("847")
K.Print(WoWHeadLoc .. questid)
end
@@ -202,7 +206,10 @@ local function StoreAndDisableAddons()
end
StaticPopupDialogs["CONFIRM_DISABLE_ADDONS"] = {
- text = string.format("Are you sure you want to disable |cff669DFF%d|r addon(s) except |cff669DFFKkthnxUI|r for debugging?|n|nYou can use '|cff669DFFkkdebug off|r' to restore them.", addonsToDisable),
+ text = string.format(
+ "Are you sure you want to disable |cff669DFF%d|r addon(s) except |cff669DFFKkthnxUI|r for debugging?|n|nYou can use '|cff669DFFkkdebug off|r' to restore them.",
+ addonsToDisable
+ ),
button1 = "Yes",
button2 = "No",
OnAccept = function()
diff --git a/KkthnxUI/Core/Functions.lua b/KkthnxUI/Core/Functions.lua
index e2cd5308..09cb0d85 100644
--- a/KkthnxUI/Core/Functions.lua
+++ b/KkthnxUI/Core/Functions.lua
@@ -90,54 +90,40 @@ do
end
end
+ -- Function to get the class icon using atlas textures
function K.GetClassIcon(class, iconSize)
local size = iconSize or 16
-
if class then
- local L, R, T, B = unpack(CLASS_ICON_TCOORDS[class])
- if L then
- local imageSize = 128
- return "|TInterface\\AddOns\\KkthnxUI\\Media\\Unitframes\\NEW-ICONS-CLASSES:" .. size .. ":" .. size .. ":0:0:" .. imageSize .. ":" .. imageSize .. ":" .. (L * imageSize) .. ":" .. (R * imageSize) .. ":" .. (T * imageSize) .. ":" .. (B * imageSize) .. "|t"
- end
- end
- end
+ return string.format("|A:groupfinder-icon-class-%s:%d:%d|a ", string.lower(class), size, size)
+ end
+ end
+
+ -- Table for class colors
+ local ClassColors = {
+ DEATHKNIGHT = "|CFFC41F3B",
+ DEMONHUNTER = "|CFFA330C9",
+ DRUID = "|CFFFF7D0A",
+ EVOKER = "|CFF33937F",
+ HUNTER = "|CFFA9D271",
+ MAGE = "|CFF40C7EB",
+ MONK = "|CFF00FF96",
+ PALADIN = "|CFFF58CBA",
+ PRIEST = "|CFFFFFFFF",
+ ROGUE = "|CFFFFF569",
+ SHAMAN = "|CFF0070DE",
+ WARLOCK = "|CFF8787ED",
+ WARRIOR = "|CFFC79C6E",
+ }
+ -- Function to get the class color
function K.GetClassColor(class)
- if class then
- if class == "DEATHKNIGHT" then
- return "|CFFC41F3B"
- elseif class == "DEMONHUNTER" then
- return "|CFFA330C9"
- elseif class == "DRUID" then
- return "|CFFFF7D0A"
- elseif class == "EVOKER" then
- return "|CFF33937F"
- elseif class == "HUNTER" then
- return "|CFFA9D271"
- elseif class == "MAGE" then
- return "|CFF40C7EB"
- elseif class == "MONK" then
- return "|CFF00FF96"
- elseif class == "PALADIN" then
- return "|CFFF58CBA"
- elseif class == "PRIEST" then
- return "|CFFFFFFFF"
- elseif class == "ROGUE" then
- return "|CFFFFF569"
- elseif class == "SHAMAN" then
- return "|CFF0070DE"
- elseif class == "WARLOCK" then
- return "|CFF8787ED"
- elseif class == "WARRIOR" then
- return "|CFFC79C6E"
- end
- end
+ return ClassColors[class]
end
- function K.GetClassIconAndColor(class, textColor, iconSize)
+ -- Function to get the class icon and color
+ function K.GetClassIconAndColor(class, iconSize)
local classIcon = K.GetClassIcon(class, iconSize)
local classColor = K.GetClassColor(class)
-
return classIcon .. classColor
end
@@ -264,41 +250,31 @@ end
-- Class Color and Unit Color Functions
do
function K.ColorClass(class)
- -- check if the class color exists in the class color table
local color = K.ClassColors[class]
- -- if the class color does not exist, return white
if not color then
return 1, 1, 1
end
- -- return the red, green, and blue values of the class color
return color.r, color.g, color.b
end
function K.UnitColor(unit)
- -- set the default color to white
local r, g, b = 1, 1, 1
- -- check if the unit is a player
+
if UnitIsPlayer(unit) then
local class = select(2, UnitClass(unit))
- -- check if class exists, and get the color of the class
if class then
r, g, b = K.ColorClass(class)
end
- -- check if the unit's tap is denied
elseif UnitIsTapDenied(unit) then
r, g, b = 0.6, 0.6, 0.6
else
- -- get the reaction of the unit to the player
local reaction = UnitReaction(unit, "player")
- -- check if reaction exists, and get the color of the reaction
if reaction then
- local color = K.Colors.reaction[reaction] or FACTION_BAR_COLORS[reaction]
- r = color.r or color[1] or 1
- g = color.g or color[2] or 1
- b = color.b or color[3] or 1
+ local color = K.Colors.reaction[reaction]
+ r, g, b = color[1], color[2], color[3]
end
end
- -- return the red, green, and blue values of the color
+
return r, g, b
end
end
@@ -463,6 +439,19 @@ do
K:RegisterEvent("PLAYER_TALENT_UPDATE", CheckRole)
K:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED", CheckRole)
+ -- Role Icons
+ local GroupRoleTex = {
+ TANK = "roleicon-tiny-tank",
+ HEALER = "roleicon-tiny-healer",
+ DAMAGER = "roleicon-tiny-dps",
+ DPS = "roleicon-tiny-dps",
+ }
+
+ function K.ReskinSmallRole(self, role)
+ self:SetTexCoord(0, 1, 0, 1)
+ self:SetAtlas(GroupRoleTex[role])
+ end
+
function K.CheckChat()
return IsPartyLFG() and "INSTANCE_CHAT" or IsInRaid() and "RAID" or "PARTY"
end
@@ -542,47 +531,13 @@ end
-- Overlay Glow Functions
do
- function K.CreateGlowFrame(self, size, splus)
- splus = splus or 8 -- set the additional size to 8 if not specified
+ function K.CreateGlowFrame(self, size)
local glowFrame = CreateFrame("Frame", nil, self)
glowFrame:SetPoint("CENTER")
- glowFrame:SetSize(size + splus, size + splus)
+ glowFrame:SetSize(size + 8, size + 8)
return glowFrame
end
-
- function K.ShowOverlayGlow(self, template, ...)
- local args = { ... }
- template = template or "ButtonGlow" -- set the default template to ButtonGlow
-
- if not K.LibCustomGlow then
- return
- end
-
- if template == "ButtonGlow" then
- K.LibCustomGlow.ButtonGlow_Start(self, unpack(args))
- elseif template == "AutoCastGlow" then
- K.LibCustomGlow.AutoCastGlow_Start(self, unpack(args))
- elseif template == "PixelGlow" then
- K.LibCustomGlow.PixelGlow_Start(self, unpack(args))
- end
- end
-
- function K.HideOverlayGlow(self, template)
- template = template or "ButtonGlow" -- set the default template to ButtonGlow
-
- if not K.LibCustomGlow then
- return
- end
-
- if template == "ButtonGlow" then
- K.LibCustomGlow.ButtonGlow_Stop(self)
- elseif template == "AutoCastGlow" then
- K.LibCustomGlow.AutoCastGlow_Stop(self)
- elseif template == "PixelGlow" then
- K.LibCustomGlow.PixelGlow_Stop(self)
- end
- end
end
-- Movable Frame and String Shortening Functions
diff --git a/KkthnxUI/Core/GUI.lua b/KkthnxUI/Core/GUI.lua
index 6cf24043..7a5311cc 100644
--- a/KkthnxUI/Core/GUI.lua
+++ b/KkthnxUI/Core/GUI.lua
@@ -57,49 +57,57 @@ local LastActiveDropdown
local LastActiveWindow
local MySelectedProfile = K.Realm .. "-" .. K.Name
-local CreditLines = {
- { type = "header", text = "PATREONS", color = "C0C0C0" },
- { type = "header", text = "" },
- { type = "header", text = "Tier 1" },
- { type = "header", text = "Tier 2" },
- { type = "header", text = "Tier 3" },
- { type = "name", text = "Shovil", class = "WARRIOR" },
- { type = "header", text = "Tier 4" },
- { type = "header", text = "" },
- { type = "header", text = "CREDITS" },
- { type = "header", text = "" },
- { type = "name", text = "Aftermathh" },
- { type = "name", text = "Alteredcross", class = "ROGUE" },
- { type = "name", text = "Alza" },
- { type = "name", text = "Azilroka", class = "SHAMAN" },
- { type = "name", text = "Benik", color = "00c0fa" },
- { type = "name", text = "Blazeflack" },
- { type = "name", text = "Caellian" },
- { type = "name", text = "Caith" },
- { type = "name", text = "Cassamarra", class = "HUNTER" },
- { type = "name", text = "Darth Predator" },
- { type = "name", text = "Elv", addOn = "(|cff1784d1ElvUI|r)" },
- { type = "name", text = K.GetClassIcon("PRIEST") .. "|cffe31c73Faffi|r|cfffc4796GS|r", class = "PRIEST", color = "e31c73" },
- { type = "name", text = K.GetClassIcon("DRUID") .. "Goldpaw", class = "DRUID", addOn = "(|c00000002|r|cff7284abA|r|cff6a7a9ez|r|cff617092e|r|cff596785r|r|cff505d78i|r|cff48536bt|r|cff3f495fe|r|cffffffffUI|r)" },
- { type = "name", text = "Haleth" },
- { type = "name", text = "Haste" },
- { type = "name", text = "Hungtar" },
- { type = "name", text = "Hydra", addOn = "(|cFFFFC44DvUI|r)" },
- { type = "name", text = "Ishtara" },
- { type = "name", text = "KkthnxUI Community" },
- { type = "name", text = "LightSpark" },
- { type = "name", text = "Magicnachos", class = "PRIEST" },
- { type = "name", text = "Merathilis", class = "DRUID" },
- { type = "name", text = "Nightcracker" },
- { type = "name", text = "P3lim" },
- { type = "name", text = "Palooza", class = "PRIEST" },
- { type = "name", text = "Rav99", class = "DEMONHUNTER" },
- { type = "name", text = "Roth" },
- { type = "name", text = "Shestak", addOn = "ShestakUI" },
- { type = "name", text = "Simpy" },
- { type = "name", text = "siweia", addOn = "NDui" },
+local headers = {
+ "CREDITS",
+ "",
}
+local names = {
+ { text = "Aftermathh" },
+ { text = "Alteredcross", class = "ROGUE" },
+ { text = "Alza" },
+ { text = "Azilroka", class = "SHAMAN" },
+ { text = "Benik", color = "00c0fa" },
+ { text = "Blazeflack" },
+ { text = "Caellian" },
+ { text = "Caith" },
+ { text = "Cassamarra", class = "HUNTER" },
+ { text = "Darth Predator" },
+ { text = "Elv" },
+ { text = "|cffe31c73Faffi|r|cfffc4796GS|r", class = "PRIEST" },
+ { text = "Goldpaw", class = "DRUID" },
+ { text = "Haleth" },
+ { text = "Haste" },
+ { text = "Hungtar" },
+ { text = "Hydra" },
+ { text = "Ishtara" },
+ { text = "KkthnxUI Community" },
+ { text = "LightSpark" },
+ { text = "Magicnachos", class = "PRIEST" },
+ { text = "Merathilis", class = "DRUID" },
+ { text = "Nightcracker" },
+ { text = "P3lim" },
+ { text = "Palooza", class = "PRIEST" },
+ { text = "Rav99", class = "DEMONHUNTER" },
+ { text = "Roth" },
+ { text = "Shestak" },
+ { text = "Simpy" },
+ { text = "siweia" },
+}
+
+local function createCreditLines(headers, names)
+ local lines = {}
+ for _, text in ipairs(headers) do
+ table.insert(lines, { type = "header", text = text })
+ end
+ for _, name in ipairs(names) do
+ table.insert(lines, { type = "name", text = name.text, class = name.class, color = name.color })
+ end
+ return lines
+end
+
+local CreditLines = createCreditLines(headers, names)
+
local GUI = CreateFrame("Frame", "KKUI_GUI", UIParent)
GUI.Windows = {}
GUI.Buttons = {}
@@ -1235,8 +1243,7 @@ local ColorOnMouseUp = function(self, button)
HideUIPanel(CPF)
CPF.Button = self
- CPF.Content.ColorPicker:SetColorRGB(CurrentR, CurrentG, CurrentB)
- CPF.swatchFunc = function() end
+ CPF:SetColorRGB(CurrentR, CurrentG, CurrentB)
CPF.Group = self.Group
CPF.Option = self.Option
@@ -1638,8 +1645,7 @@ local CreditLineHeight = 20
local function SetUpCredits(frame)
frame.Lines = {}
- for i = 1, #CreditLines do
- local entry = CreditLines[i]
+ for i, entry in ipairs(CreditLines) do
local Line = CreateFrame("Frame", nil, frame)
Line:SetSize(frame:GetWidth(), CreditLineHeight)
@@ -1656,13 +1662,13 @@ local function SetUpCredits(frame)
end
elseif entry.type == "name" then
if entry.class then
- Line.Text:SetTextColor(K.ClassColors[entry.class].r, K.ClassColors[entry.class].g, K.ClassColors[entry.class].b)
+ local classIconAndColor = K.GetClassIconAndColor(entry.class, 14)
+ Line.Text:SetText(classIconAndColor .. entry.text)
elseif entry.color then
Line.Text:SetTextColor(tonumber(entry.color:sub(1, 2), 16) / 255, tonumber(entry.color:sub(3, 4), 16) / 255, tonumber(entry.color:sub(5, 6), 16) / 255)
- end
- Line.Text:SetText(entry.text)
- if entry.addOn then
- Line.Text:SetText(Line.Text:GetText() .. " - " .. entry.addOn)
+ Line.Text:SetText(entry.text)
+ else
+ Line.Text:SetText(entry.text)
end
end
@@ -1672,7 +1678,7 @@ local function SetUpCredits(frame)
Line:SetPoint("TOP", frame.Lines[i - 1], "BOTTOM", 0, 0)
end
- tinsert(frame.Lines, Line)
+ table.insert(frame.Lines, Line)
end
frame:SetHeight(#frame.Lines * CreditLineHeight)
diff --git a/KkthnxUI/Core/Install.lua b/KkthnxUI/Core/Install.lua
index b07e1536..18cdefa8 100644
--- a/KkthnxUI/Core/Install.lua
+++ b/KkthnxUI/Core/Install.lua
@@ -233,63 +233,14 @@ function Module:ForceChatSettings()
resetAndConfigureChatFrames()
-- Configure specific chat frames
- configureChatFrame(ChatFrame1, L["General"], { TRADE, L["Services"], GENERAL, "GuildRecruitment", "LookingForGroup" }, {
- "ACHIEVEMENT",
- "AFK",
- "BG_ALLIANCE",
- "BG_HORDE",
- "BG_NEUTRAL",
- "BN_INLINE_TOAST_ALERT",
- "CHANNEL",
- "DND",
- "EMOTE",
- "ERRORS",
- "GUILD",
- "GUILD_ACHIEVEMENT",
- "IGNORED",
- "INSTANCE_CHAT",
- "INSTANCE_CHAT_LEADER",
- "MONSTER_BOSS_EMOTE",
- "MONSTER_BOSS_WHISPER",
- "MONSTER_EMOTE",
- "MONSTER_SAY",
- "MONSTER_WHISPER",
- "MONSTER_YELL",
- "OFFICER",
- "PARTY",
- "PARTY_LEADER",
- "RAID",
- "RAID_LEADER",
- "RAID_WARNING",
- "SAY",
- "SYSTEM",
- "YELL",
- })
+ configureChatFrame(ChatFrame1, L["General"], { TRADE, L["Services"], GENERAL, "GuildRecruitment", "LookingForGroup" }, { "ACHIEVEMENT", "AFK", "BG_ALLIANCE", "BG_HORDE", "BG_NEUTRAL", "BN_INLINE_TOAST_ALERT", "CHANNEL", "DND", "EMOTE", "ERRORS", "GUILD", "GUILD_ACHIEVEMENT", "IGNORED", "INSTANCE_CHAT", "INSTANCE_CHAT_LEADER", "MONSTER_BOSS_EMOTE", "MONSTER_BOSS_WHISPER", "MONSTER_EMOTE", "MONSTER_SAY", "MONSTER_WHISPER", "MONSTER_YELL", "OFFICER", "PARTY", "PARTY_LEADER", "PING", "RAID", "RAID_LEADER", "RAID_WARNING", "SAY", "SYSTEM", "YELL" })
configureChatFrame(ChatFrame2, L["CombatLog"], nil, {}, true)
configureChatFrame(ChatFrame4, L["Whisper"], nil, { "WHISPER", "BN_WHISPER", "BN_CONVERSATION" }, true)
configureChatFrame(ChatFrame5, L["Trade"], nil, {}, true)
configureChatFrame(ChatFrame6, L["Loot"], nil, { "COMBAT_XP_GAIN", "COMBAT_HONOR_GAIN", "COMBAT_FACTION_CHANGE", "SKILL", "LOOT", "CURRENCY", "MONEY" }, true)
configureChatColors()
-
- local classColorGroups = {
- "SAY",
- "EMOTE",
- "YELL",
- "WHISPER",
- "PARTY",
- "PARTY_LEADER",
- "RAID",
- "RAID_LEADER",
- "RAID_WARNING",
- "INSTANCE_CHAT",
- "INSTANCE_CHAT_LEADER",
- "GUILD",
- "OFFICER",
- "ACHIEVEMENT",
- "GUILD_ACHIEVEMENT",
- "COMMUNITIES_CHANNEL",
- }
+ local classColorGroups = { "SAY", "EMOTE", "YELL", "WHISPER", "PARTY", "PARTY_LEADER", "RAID", "RAID_LEADER", "RAID_WARNING", "INSTANCE_CHAT", "INSTANCE_CHAT_LEADER", "GUILD", "OFFICER", "ACHIEVEMENT", "GUILD_ACHIEVEMENT", "COMMUNITIES_CHANNEL" }
local maxChatChannels = _G.MAX_WOW_CHAT_CHANNELS or 10 -- Fallback in case the global isn't set
for i = 1, maxChatChannels do
table.insert(classColorGroups, "CHANNEL" .. i)
@@ -298,40 +249,32 @@ function Module:ForceChatSettings()
end
local function CreateFakeAchievementPopup()
- local popup = CreateFrame("Frame", "KkthnxUIFakeAchievement", UIParent, "GlowBoxTemplate")
- popup:SetSize(300, 70) -- Size similar to the achievement frame
+ local popup = CreateFrame("Frame", "KKUI_FakeAchievement", UIParent)
+ popup:SetSize(310, 70) -- Size similar to the achievement frame
popup:SetPoint("TOP", UIParent, "TOP", 0, -150)
popup:SetFrameStrata("DIALOG")
+ popup:CreateBorder()
popup:Hide() -- Hide the frame initially
- -- Background texture
- popup.bg = popup:CreateTexture(nil, "BACKGROUND")
- popup.bg:SetTexture("Interface\\AchievementFrame\\UI-Achievement-AchievementBackground")
- popup.bg:SetPoint("CENTER")
- popup.bg:SetSize(296, 66)
- popup.bg:SetTexCoord(0, 1, 0, 0.28125)
-
-- Achievement icon
- popup.icon = popup:CreateTexture(nil, "OVERLAY")
- popup.icon:SetSize(44, 44)
- popup.icon:SetPoint("LEFT", 8, 0)
- popup.icon:SetTexture("Interface\\Icons\\Achievement_General") -- Placeholder texture
-
- -- Assuming you have already created 'popup.icon' before this
- popup.iconFrame = popup:CreateTexture(nil, "OVERLAY", nil, 6)
- popup.iconFrame:SetSize(56, 56) -- Adjust the size as needed to fit around the icon
- popup.iconFrame:SetPoint("CENTER", popup.icon, "CENTER", 0, 0)
- popup.iconFrame:SetTexture("Interface\\AchievementFrame\\UI-Achievement-IconFrame")
- popup.iconFrame:SetTexCoord(0, 0.5625, 0, 0.5625) -- Adjust if needed to get the correct part of the texture
+ popup.icon = popup:CreateTexture(nil, "OVERLAY", nil, 6)
+ popup.icon:SetSize(50, 50)
+ popup.icon:SetPoint("LEFT", 10, 0)
+ popup.icon:SetTexture("Interface\\AddOns\\KkthnxUI\\Media\\KkthnxUI_Spell_Icon") -- Placeholder texture
+ popup.icon:SetTexCoord(K.TexCoords[1], K.TexCoords[2], K.TexCoords[3], K.TexCoords[4])
+
+ popup.iconFrame = CreateFrame("Frame", nil, popup)
+ popup.iconFrame:SetAllPoints(popup.icon)
+ popup.iconFrame:CreateBorder(nil, nil, nil, nil, nil, nil, "")
-- Title
popup.title = popup:CreateFontString(nil, "OVERLAY", "GameFontNormal")
- popup.title:SetPoint("TOP", popup.bg, "TOP", 0, 18)
+ popup.title:SetPoint("TOP", popup, "TOP", 0, 18)
-- Description
popup.description = popup:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
- popup.description:SetPoint("LEFT", popup.icon, "RIGHT", 8, 0) -- 8 is the padding from the icon, adjust as needed
- popup.description:SetPoint("RIGHT", popup.bg, "RIGHT", -8, 0) -- -8 is the padding from the right edge, adjust as needed
+ popup.description:SetPoint("LEFT", popup.icon, "RIGHT", 14, 0) -- 8 is the padding from the icon, adjust as needed
+ popup.description:SetPoint("RIGHT", popup, "RIGHT", -8, 0) -- -8 is the padding from the right edge, adjust as needed
popup.description:SetJustifyH("LEFT") -- Align text to the left
popup.description:SetWordWrap(true) -- Enable word wrapping
@@ -449,13 +392,7 @@ local function YesTutor()
apply.text:SetText(APPLY)
apply.text:SetTextColor(0, 1, 0)
- local titles = {
- DEFAULT .. " " .. SETTINGS,
- CHAT,
- UI_SCALE,
- "Skins",
- "Tips",
- }
+ local titles = { DEFAULT .. " " .. SETTINGS, CHAT, UI_SCALE, "Skins", "Tips" }
local function RefreshText(page)
title:SetText(titles[page])
@@ -632,17 +569,12 @@ local function HelloWorld()
goTutor:SetSize(110, 22)
goTutor:SkinButton()
- if welcome:IsShown() then
- K.ShowOverlayGlow(goTutor, "AutoCastGlow")
- end
-
goTutor.text = goTutor:CreateFontString(nil, "OVERLAY")
goTutor.text:SetFontObject(K.UIFont)
goTutor.text:SetPoint("CENTER", 0, -1)
goTutor.text:SetText(K.MyClassColor .. START .. "|r")
goTutor:SetScript("OnClick", function()
- K.HideOverlayGlow(goTutor, "AutoCastGlow")
welcome:Hide()
YesTutor()
end)
diff --git a/KkthnxUI/Core/Load_Core.xml b/KkthnxUI/Core/Load_Core.xml
index f5927240..08dd74c5 100644
--- a/KkthnxUI/Core/Load_Core.xml
+++ b/KkthnxUI/Core/Load_Core.xml
@@ -15,5 +15,4 @@
-
\ No newline at end of file
diff --git a/KkthnxUI/Core/Loading.lua b/KkthnxUI/Core/Loading.lua
index dbd92948..1540078a 100644
--- a/KkthnxUI/Core/Loading.lua
+++ b/KkthnxUI/Core/Loading.lua
@@ -26,7 +26,6 @@ local function KKUI_VerifyDatabase()
charData.CustomItems = charData.CustomItems or {}
charData.CustomJunkList = charData.CustomJunkList or {}
charData.CustomNames = charData.CustomNames or {}
- charData.DisabledAddOns = charData.DisabledAddOns or {}
charData.InternalCD = charData.InternalCD or {}
charData.Mover = charData.Mover or {}
charData.RevealWorldMap = charData.RevealWorldMap or false
@@ -145,9 +144,10 @@ local function KKUI_LoadAddon()
end
local function KKUI_OnEvent(_, event, addonName)
- KKUI_VerifyDatabase()
+ -- KKUI_VerifyDatabase()
if event == "VARIABLES_LOADED" then
+ KKUI_VerifyDatabase()
KKUI_LoadVariables()
elseif event == "ADDON_LOADED" and addonName == "KkthnxUI" then
KKUI_LoadAddon()
diff --git a/KkthnxUI/Core/Movers.lua b/KkthnxUI/Core/Movers.lua
index 4bef2a0f..33803022 100644
--- a/KkthnxUI/Core/Movers.lua
+++ b/KkthnxUI/Core/Movers.lua
@@ -158,13 +158,11 @@ function Module:Mover_OnClick(btn)
end
function Module:Mover_OnEnter()
- K.ShowOverlayGlow(self, "AutoCastGlow")
self.KKUI_Background:SetVertexColor(K.r, K.g, K.b, 0.8)
self.text:SetTextColor(1, 0.8, 0)
end
function Module:Mover_OnLeave()
- K.HideOverlayGlow(self, "AutoCastGlow")
self.KKUI_Background:SetVertexColor(38 / 255, 125 / 255, 206 / 255, 80 / 255)
self.text:SetTextColor(1, 1, 1)
end
diff --git a/KkthnxUI/Core/StatusReport.lua b/KkthnxUI/Core/StatusReport.lua
deleted file mode 100644
index a45009e5..00000000
--- a/KkthnxUI/Core/StatusReport.lua
+++ /dev/null
@@ -1,287 +0,0 @@
-local K, C = KkthnxUI[1], KkthnxUI[2]
-
-local CreateFrame = CreateFrame
-local GetAddOnInfo = GetAddOnInfo
-local GetCVarBool = GetCVarBool
-local GetNumAddOns = GetNumAddOns
-local GetRealZoneText = GetRealZoneText
-local GetSpecialization = GetSpecialization
-local GetSpecializationInfo = GetSpecializationInfo
-local UNKNOWN = UNKNOWN
-
-local function AreOtherAddOnsEnabled()
- local addons
-
- for i = 1, GetNumAddOns() do
- local name = GetAddOnInfo(i)
- if name ~= "KkthnxUI" and name ~= "KkthnxUI_Dev" and name ~= "!BaudErrorFrame" and K.CheckAddOnState(name) then
- addons = true
- end
- end
-
- return addons
-end
-
-local function GetDisplayMode()
- return GetCVarBool("gxMaximize") and "Fullscreen" or "Windowed"
-end
-
-local function GetBestScale()
- local scale = math.max(0.4, math.min(1.15, 768 / K.ScreenHeight))
- return K.Round(scale, 2)
-end
-
-local EnglishClassName = {
- DEATHKNIGHT = K.GetClassIconAndColor("DEATHKNIGHT", "|CFFC41F3B") .. "Death Knight",
- DEMONHUNTER = K.GetClassIconAndColor("DEMONHUNTER", "|CFFA330C9") .. "Demon Hunter",
- DRUID = K.GetClassIconAndColor("DRUID", "|CFFFF7D0A") .. "Druid",
- EVOKER = K.GetClassIconAndColor("EVOKER", "|CFF33937F") .. "Evoker",
- HUNTER = K.GetClassIconAndColor("HUNTER", "|CFFA9D271") .. "Hunter",
- MAGE = K.GetClassIconAndColor("MAGE", "|CFF40C7EB") .. "Mage",
- MONK = K.GetClassIconAndColor("MONK", "|CFF00FF96") .. "Monk",
- PALADIN = K.GetClassIconAndColor("PALADIN", "|CFFF58CBA") .. "Paladin",
- PRIEST = K.GetClassIconAndColor("PRIEST", "|CFFFFFFFF") .. "Priest",
- ROGUE = K.GetClassIconAndColor("ROGUE", "|CFFFFF569") .. "Rogue",
- SHAMAN = K.GetClassIconAndColor("SHAMAN", "|CFF0070DE") .. "Shaman",
- WARLOCK = K.GetClassIconAndColor("WARLOCK", "|CFF8787ED") .. "Warlock",
- WARRIOR = K.GetClassIconAndColor("WARRIOR", "|CFFC79C6E") .. "Warrior",
-}
-
-local EnglishSpecName = {
- [250] = "Blood",
- [251] = "Frost",
- [252] = "Unholy",
- [102] = "Balance",
- [103] = "Feral",
- [104] = "Guardian",
- [105] = "Restoration",
- [253] = "Beast Mastery",
- [254] = "Marksmanship",
- [255] = "Survival",
- [62] = "Arcane",
- [63] = "Fire",
- [64] = "Frost",
- [268] = "Brewmaster",
- [270] = "Mistweaver",
- [269] = "Windwalker",
- [65] = "Holy",
- [66] = "Protection",
- [70] = "Retribution",
- [256] = "Discipline",
- [257] = "Holy",
- [258] = "Shadow",
- [259] = "Assasination",
- [260] = "Combat",
- [261] = "Sublety",
- [262] = "Elemental",
- [263] = "Enhancement",
- [264] = "Restoration",
- [265] = "Affliction",
- [266] = "Demonoligy",
- [267] = "Destruction",
- [71] = "Arms",
- [72] = "Fury",
- [73] = "Protection",
- [577] = "Havoc",
- [581] = "Vengeance",
-}
-
-local function GetSpecName()
- return EnglishSpecName[GetSpecializationInfo(GetSpecialization())]
-end
-
-local function CreateStatusContent(num, width, parent, anchorTo, content)
- if not content then
- content = CreateFrame("Frame", nil, parent)
- end
- content:SetSize(width, (num * 20) + ((num - 1) * 6)) --20 height and 6 spacing
- content:SetPoint("TOP", anchorTo, "BOTTOM")
-
- for i = 1, num do
- if not content["Line" .. i] then
- local line = CreateFrame("Frame", nil, content)
- line:SetSize(width, 20)
-
- local text = line:CreateFontString(nil, "ARTWORK")
- text:SetAllPoints()
- text:SetJustifyH("LEFT")
- text:SetJustifyV("MIDDLE")
- text:SetFontObject(K.UIFont)
- text:SetFont(select(1, text:GetFont()), 14, select(3, text:GetFont()))
- line.Text = text
-
- if i == 1 then
- line:SetPoint("TOP", content, "TOP")
- else
- line:SetPoint("TOP", content["Line" .. (i - 1)], "BOTTOM", 0, -5)
- end
-
- content["Line" .. i] = line
- end
- end
-
- return content
-end
-
-local function CloseClicked()
- if K.StatusFrame:IsShown() then
- K.StatusFrame:Hide()
- end
-end
-
-local function CreateStatusSection(width, height, headerWidth, headerHeight, parent, anchor1, anchorTo, anchor2, yOffset)
- local parentWidth, parentHeight = parent:GetSize()
-
- if width > parentWidth then
- parent:SetWidth(width + 25)
- end
-
- if height then
- parent:SetHeight(parentHeight + height)
- end
-
- local section = CreateFrame("Frame", nil, parent)
- section:SetSize(width, height or 0)
- section:SetPoint(anchor1, anchorTo, anchor2, 0, yOffset)
-
- local header = CreateFrame("Frame", nil, section)
- header:SetSize(headerWidth or width, headerHeight)
- header:SetPoint("TOP", section)
- section.Header = header
-
- local text = section.Header:CreateFontString(nil, "ARTWORK")
- text:SetPoint("TOP")
- text:SetPoint("BOTTOM")
- text:SetJustifyH("CENTER")
- text:SetJustifyV("MIDDLE")
- text:SetFontObject(K.UIFont)
- text:SetFont(select(1, text:GetFont()), 18, select(3, text:GetFont()))
- section.Header.Text = text
-
- local leftDivider = section.Header:CreateTexture(nil, "ARTWORK")
- leftDivider:SetHeight(8)
- leftDivider:SetPoint("LEFT", section.Header, "LEFT", 5, 0)
- leftDivider:SetPoint("RIGHT", section.Header.Text, "LEFT", -5, 0)
- leftDivider:SetTexture([[Interface\Tooltips\UI-Tooltip-Border]])
- leftDivider:SetTexCoord(0.81, 0.94, 0.5, 1)
- section.Header.LeftDivider = leftDivider
-
- local rightDivider = section.Header:CreateTexture(nil, "ARTWORK")
- rightDivider:SetHeight(8)
- rightDivider:SetPoint("RIGHT", section.Header, "RIGHT", -5, 0)
- rightDivider:SetPoint("LEFT", section.Header.Text, "RIGHT", 5, 0)
- rightDivider:SetTexture([[Interface\Tooltips\UI-Tooltip-Border]])
- rightDivider:SetTexCoord(0.81, 0.94, 0.5, 1)
- section.Header.RightDivider = rightDivider
-
- return section
-end
-
-local function CreateStatusFrame()
- -- Main frame
- local StatusFrame = CreateFrame("Frame", "KKUI_StatusReport", UIParent)
- StatusFrame:SetPoint("CENTER", UIParent, "CENTER")
- StatusFrame:SetFrameStrata("HIGH")
- StatusFrame:CreateBorder()
- StatusFrame:SetMovable(true)
- StatusFrame:SetSize(0, 35)
- StatusFrame:Hide()
- K.CreateMoverFrame(StatusFrame)
-
- -- Close button and script to retoggle the options.
- local CloseButton = CreateFrame("Button", nil, StatusFrame)
- CloseButton:SetSize(32, 32)
- CloseButton:SetPoint("TOPRIGHT", StatusFrame, 0, 0)
- CloseButton:HookScript("OnClick", CloseClicked)
-
- CloseButton.Texture = CloseButton:CreateTexture(nil, "OVERLAY")
- CloseButton.Texture:SetPoint("CENTER", CloseButton, 0, 0)
- CloseButton.Texture:SetSize(20, 20)
- CloseButton.Texture:SetTexture("Interface\\AddOns\\KkthnxUI\\Media\\Textures\\CloseButton_32")
-
- local LogoCenter = StatusFrame:CreateTexture(nil, "OVERLAY")
- LogoCenter:SetSize(512 / 1.4, 256 / 1.4)
- LogoCenter:SetBlendMode("ADD")
- LogoCenter:SetAlpha(0.07)
- LogoCenter:SetTexture(C["Media"].Textures.LogoTexture)
- LogoCenter:SetPoint("CENTER", StatusFrame, "CENTER", 0, 0)
-
- -- Sections
- StatusFrame.Section1 = CreateStatusSection(300, 125, nil, 30, StatusFrame, "TOP", StatusFrame, "TOP", -30)
- StatusFrame.Section2 = CreateStatusSection(300, 130, nil, 30, StatusFrame, "TOP", StatusFrame.Section1, "BOTTOM", 0)
- StatusFrame.Section3 = CreateStatusSection(300, 185, nil, 30, StatusFrame, "TOP", StatusFrame.Section2, "BOTTOM", 0)
-
- -- Section content
- StatusFrame.Section1.Content = CreateStatusContent(4, 260, StatusFrame.Section1, StatusFrame.Section1.Header)
- StatusFrame.Section2.Content = CreateStatusContent(5, 260, StatusFrame.Section2, StatusFrame.Section2.Header)
- StatusFrame.Section3.Content = CreateStatusContent(6, 260, StatusFrame.Section3, StatusFrame.Section3.Header)
-
- local factionColor
- local factionIcon
- if K.Faction == "Alliance" then
- factionColor = "|CFF004A94"
- factionIcon = "|TInterface\\AddOns\\KkthnxUI\\Media\\Minimap\\Alliance:20:20:2|t"
- elseif K.Faction == "Horde" then
- factionColor = "|CFF8C1616"
- factionIcon = "|TInterface\\AddOns\\KkthnxUI\\Media\\Minimap\\Horde:20:20:2|t"
- else
- factionColor = K.SystemColor
- factionIcon = "|TInterface\\COMMON\\friendship-FistHuman:20:20:2|t"
- end
-
- -- Content lines
- StatusFrame.Section1.Content.Line3.Text:SetFormattedText("Recommended Scale: " .. K.SystemColor .. "%s|r", GetBestScale())
- StatusFrame.Section1.Content.Line4.Text:SetFormattedText("UI Scale Is: " .. K.SystemColor .. "%s|r", C["General"].UIScale)
- StatusFrame.Section2.Content.Line1.Text:SetFormattedText("Version of WoW: " .. K.SystemColor .. "%s (build %s)|r", K.WowPatch, K.WowBuild)
- StatusFrame.Section2.Content.Line2.Text:SetFormattedText("Client Language: " .. K.SystemColor .. "%s|r", K.Client)
- StatusFrame.Section3.Content.Line1.Text:SetFormattedText("Faction:" .. factionIcon .. factionColor .. "%s|r", K.Faction)
- StatusFrame.Section3.Content.Line2.Text:SetFormattedText("Race: " .. K.SystemColor .. " %s|r", K.Race)
- StatusFrame.Section3.Content.Line3.Text:SetFormattedText("Class: " .. K.SystemColor .. "%s|r", EnglishClassName[K.Class])
-
- return StatusFrame
-end
-
-local function UpdateStatusFrame()
- local StatusFrame = K.StatusFrame
-
- -- Section headers
- local valueColor = "|cff669DFF"
- StatusFrame.Section1.Header.Text:SetFormattedText("%sAddOn Info|r", valueColor)
- StatusFrame.Section2.Header.Text:SetFormattedText("%sWoW Info|r", valueColor)
- StatusFrame.Section3.Header.Text:SetFormattedText("%sCharacter Info|r", valueColor)
-
- StatusFrame.Section1.Content.Line3.Text:SetFormattedText("Recommended Scale: " .. K.SystemColor .. "%s|r", GetBestScale())
- StatusFrame.Section1.Content.Line4.Text:SetFormattedText("UI Scale Is: " .. K.SystemColor .. "%s|r", C["General"].UIScale)
-
- StatusFrame.Section1.Content.Line1.Text:SetFormattedText("Version of KkthnxUI: %s%s", valueColor, K.Version)
- StatusFrame.Section1.Content.Line2.Text:SetFormattedText("Other AddOns Enabled: |cff%s|r", (AreOtherAddOnsEnabled() and "ff3333Yes") or "33ff33No")
-
- local Section2 = StatusFrame.Section2
- Section2.Content.Line3.Text:SetFormattedText("Display Mode: " .. K.SystemColor .. "%s|r", GetDisplayMode())
- Section2.Content.Line4.Text:SetFormattedText("Resolution: " .. K.SystemColor .. "%s|r", K.Resolution)
-
- local Section3 = StatusFrame.Section3
- Section3.Content.Line4.Text:SetFormattedText("Level: " .. K.SystemColor .. "%s|r", K.Level)
- Section3.Content.Line5.Text:SetFormattedText("Zone: " .. K.SystemColor .. "%s|r", GetRealZoneText() or UNKNOWN)
- Section3.Content.Line6.Text:SetFormattedText("Specialization: " .. K.SystemColor .. "%s|r", GetSpecName() or UNKNOWN)
-end
-
-function K:ShowStatusReport()
- if not K.StatusFrame then
- K.StatusFrame = CreateStatusFrame()
- end
-
- if not K.StatusFrame:IsShown() then
- UpdateStatusFrame()
- K.StatusFrame:Show()
- else
- K.StatusFrame:Hide()
- end
-end
-
-SlashCmdList.STATUSREPORT = function()
- K:ShowStatusReport()
-end
-
-SLASH_STATUSREPORT1 = "/kkstatus"
-SLASH_STATUSREPORT2 = "/kstatus"
diff --git a/KkthnxUI/Developer/Core.lua b/KkthnxUI/Developer/Core.lua
index 648f214f..be245480 100644
--- a/KkthnxUI/Developer/Core.lua
+++ b/KkthnxUI/Developer/Core.lua
@@ -1,52 +1,91 @@
-local K, C = KkthnxUI[1], KkthnxUI[2]
+local K, C, L = KkthnxUI[1], KkthnxUI[2], KkthnxUI[3]
+local Module = K:NewModule("Developer")
-K.Devs = {
- ["Kkthnx-Area 52"] = true,
-}
+-- Buttons to enhance popup menu
+function Module:MenuButton_AddFriend()
+ C_FriendList.AddFriend(self.MenuButtonName)
+end
-local function isDeveloper()
- return K.Devs[K.Name .. "-" .. K.Realm]
+function Module:MenuButton_CopyName()
+ local editBox = ChatEdit_ChooseBoxForSend()
+ local hasText = (editBox:GetText() ~= "")
+ ChatEdit_ActivateChat(editBox)
+ editBox:Insert(self.MenuButtonName)
+ if not hasText then
+ editBox:HighlightText()
+ end
end
-K.isDeveloper = isDeveloper()
-if not K.isDeveloper then
- return
+function Module:MenuButton_GuildInvite()
+ GuildInvite(self.MenuButtonName)
end
--- Your taintLog module
-local taintLogModule = K:NewModule("TaintLog")
+function Module:MenuButton_Whisper()
+ ChatFrame_SendTell(self.MenuButtonName)
+end
--- Function to toggle taintLog setting
-function taintLogModule.ToggleTaintLog()
- local currentSetting = GetCVar("taintLog")
+function Module:OnEnable()
+ local menuList = {
+ { text = ADD_FRIEND, func = "MenuButton_AddFriend", color = { 0, 0.6, 1 } },
+ { text = gsub(CHAT_GUILD_INVITE_SEND, HEADER_COLON, ""), func = "MenuButton_GuildInvite", color = { 0, 0.8, 0 } },
+ { text = COPY_NAME, func = "MenuButton_CopyName", color = { 1, 0, 0 } },
+ { text = WHISPER, func = "MenuButton_Whisper", color = { 1, 0.5, 1 } },
+ }
- if currentSetting == "0" then
- SetCVar("taintLog", "1")
- print("Taint log is now |cFF00FF00ON.|r") -- Green color for "ON"
- else
- SetCVar("taintLog", "0")
- print("Taint log is now |cFFFF0000OFF.|r") -- Red color for "OFF"
+ local frame = CreateFrame("Frame", "KKUI_MenuButtonFrame", DropDownList1)
+ frame:SetSize(10, 10)
+ frame:SetPoint("TOPLEFT")
+ frame:Hide()
+
+ for i, menuItem in ipairs(menuList) do
+ local button = CreateFrame("Button", nil, frame)
+ button:SetSize(25, 10)
+ button:SetPoint("TOPLEFT", frame, i * 28, -4)
+ button.Icon = button:CreateTexture(nil, "ARTWORK")
+ button.Icon:SetAllPoints()
+ button.Icon:SetColorTexture(unpack(menuItem.color))
+ button:SetScript("OnClick", function()
+ Module[menuItem.func](Module)
+ end)
+ K.AddTooltip(button, "ANCHOR_TOP", menuItem.text)
end
-end
--- Function to check and print taintLog status on login/reload
-function taintLogModule.CheckTaintLogStatus()
- local currentSetting = GetCVar("taintLog")
+ hooksecurefunc("ToggleDropDownMenu", function(level, _, dropdownMenu)
+ if level and level > 1 then
+ return
+ end
- if currentSetting == "0" then
- print("Taint log is currently |cFFFF0000OFF.|r") -- Red color for "OFF"
- else
- print("Taint log is currently |cFF00FF00ON.|r") -- Green color for "ON"
- end
+ local name = dropdownMenu.name
+ local unit = dropdownMenu.unit
+ local isPlayer = unit and UnitIsPlayer(unit)
+ local isFriendMenu = dropdownMenu == FriendsDropDown -- menus on FriendsFrame
+ if not name or (not isPlayer and not dropdownMenu.chatType and not isFriendMenu) then
+ frame:Hide()
+ return
+ end
- -- Unregister the event after checking
- K:UnregisterEvent("PLAYER_ENTERING_WORLD", taintLogModule.CheckTaintLogStatus)
+ local gameAccountInfo = dropdownMenu.accountInfo and dropdownMenu.accountInfo.gameAccountInfo
+ if gameAccountInfo and gameAccountInfo.characterName then
+ Module.MenuButtonName = gameAccountInfo.characterName
+ else
+ Module.MenuButtonName = name
+ end
+ frame:Show()
+ end)
end
--- Add an OnEnable function
-function taintLogModule:OnEnable()
- -- Register events for taintLog
- K:RegisterEvent("PLAYER_ENTERING_WORLD", taintLogModule.CheckTaintLogStatus)
- SLASH_TOGGLETAINTLOG1 = "/ttl"
- SlashCmdList["TOGGLETAINTLOG"] = taintLogModule.ToggleTaintLog
+K.Devs = {
+ ["Kkthnx-Valdrakken"] = true,
+ ["Informant-Valdrakken"] = true,
+ -- Fenox Temp
+ ["Trittlendy-Valdrakken"] = true,
+}
+
+local function isDeveloper()
+ return K.Devs[K.Name .. "-" .. K.Realm]
+end
+K.isDeveloper = isDeveloper
+
+if not K.isDeveloper() then
+ return
end
diff --git a/KkthnxUI/Init.lua b/KkthnxUI/Init.lua
index 1ebc10ef..ee64b1f5 100644
--- a/KkthnxUI/Init.lua
+++ b/KkthnxUI/Init.lua
@@ -1,5 +1,35 @@
local AddOnName, Engine = ...
+-- KkthnxUI Compatibility Layer for Firestorm Dragonflight Release
+-- This script ensures backward compatibility with older WoW API functions.
+
+-- Checking and initializing the C_AddOns table if it doesn't exist
+-- This is necessary to avoid nil reference errors in older WoW versions.
+C_AddOns = C_AddOns or {}
+
+-- Overwrite the IsAddOnLoaded function in the C_AddOns table.
+-- This ensures that C_AddOns.IsAddOnLoaded references the global IsAddOnLoaded function.
+-- Useful for older WoW versions where C_AddOns.IsAddOnLoaded might not be available.
+C_AddOns.IsAddOnLoaded = C_AddOns.IsAddOnLoaded or IsAddOnLoaded
+
+-- Overwrite the GetAddOnInfo function in the C_AddOns table.
+-- This ensures that C_AddOns.GetAddOnInfo references the global GetAddOnInfo function.
+-- Ensures compatibility for accessing addon information across different WoW versions.
+C_AddOns.GetAddOnInfo = C_AddOns.GetAddOnInfo or GetAddOnInfo
+
+-- Overwrite the GetNumAddOns function in the C_AddOns table.
+-- This ensures that C_AddOns.GetNumAddOns references the global GetNumAddOns function.
+-- Aligns with the above modification for consistency and backward compatibility.
+C_AddOns.GetNumAddOns = C_AddOns.GetNumAddOns or GetNumAddOns
+
+-- Overwrite C_AddOns.GetAddOnEnableState with the global GetAddOnEnableState function.
+-- Allows querying the enable state of addons in a manner compatible with older versions.
+C_AddOns.GetAddOnEnableState = C_AddOns.GetAddOnEnableState or GetAddOnEnableState
+
+-- Note: These overrides are specifically tailored for the Firestorm Dragonflight release
+-- and older versions of WoW. Ensure extensive testing across different WoW versions
+-- to maintain compatibility and avoid conflicts with other addons or game client behavior.
+
local bit_band = bit.band
local bit_bor = bit.bor
local next = next
@@ -49,11 +79,11 @@ local K, C, L = Engine[1], Engine[2], Engine[3]
-- Lib Info
K.LibBase64 = LibStub("LibBase64-1.0-KkthnxUI")
-K.LibActionButton = LibStub("LibActionButton-1.0")
+K.LibActionButton = LibStub("LibActionButton-1.0-KkthnxUI")
K.LibChangeLog = LibStub("LibChangelog-KkthnxUI")
K.LibDeflate = LibStub("LibDeflate-KkthnxUI")
K.LibSharedMedia = LibStub("LibSharedMedia-3.0", true)
-K.LibRangeCheck = LibStub("LibRangeCheck-3.0")
+K.LibRangeCheck = LibStub("LibRangeCheck-3.0-KkthnxUI")
K.LibSerialize = LibStub("LibSerialize-KkthnxUI")
K.LibCustomGlow = LibStub("LibCustomGlow-1.0-KkthnxUI", true)
K.LibUnfit = LibStub("Unfit-1.0-KkthnxUI")
@@ -89,7 +119,10 @@ K.EasyMenu = CreateFrame("Frame", "KKUI_EasyMenu", UIParent, "UIDropDownMenuTemp
-- WoW Info
K.WowPatch, K.WowBuild, K.WowRelease, K.TocVersion = GetBuildInfo()
K.WowBuild = tonumber(K.WowBuild)
-K.IsPatch_10_1_0 = K.TocVersion >= 100100 -- 10.1.0
+
+-- Compatibility Layer for Firestorm Dragonflight Release
+-- Determine if the game is running on the Firestorm server with the specific patch version 10.1.7.
+K.IsFirestorm = K.TocVersion == 100107 -- Check for 10.1.7
-- Color Info
K.GreyColor = "|CFFC0C0C0"
@@ -239,12 +272,12 @@ function K:GetModule(name)
return module
end
-local function GetBestScale()
- -- Constants
- local PIXEL_RATIO = 768
- local MAX_SCALE = 1.15
- local MIN_SCALE = 0.4
+-- Constants
+local PIXEL_RATIO = 768
+local MAX_SCALE = 1.15
+local MIN_SCALE = 0.4
+local function GetBestScale()
-- Calculate the best scale based on the current screen height
return K.Round(math.max(MIN_SCALE, math.min(MAX_SCALE, PIXEL_RATIO / K.ScreenHeight)), 2)
end
@@ -300,6 +333,11 @@ K:RegisterEvent("PLAYER_LOGIN", function()
-- Set smoothing amount
K:SetSmoothingAmount(C["General"].SmoothAmount)
+ if K.LibCustomGlow then
+ K.ShowOverlayGlow = K.LibCustomGlow.ShowOverlayGlow
+ K.HideOverlayGlow = K.LibCustomGlow.HideOverlayGlow
+ end
+
-- Enable modules
for _, module in ipairs(modulesQueue) do
assert(module.OnEnable, "Module has no OnEnable function.")
@@ -318,42 +356,11 @@ K:RegisterEvent("PLAYER_LOGIN", function()
end
end)
--- Event return values were wrong: https://wow.gamepedia.com/PLAYER_LEVEL_UP
+-- https://wowpedia.fandom.com/wiki/PLAYER_LEVEL_UP
K:RegisterEvent("PLAYER_LEVEL_UP", function(_, level)
- if not K.Level then
- return
- end
-
K.Level = level
end)
--- Save original Chat_DisplayTimePlayed function
-local originalChatFrame_DisplayTimePlayed = ChatFrame_DisplayTimePlayed
--- Override ChatFrame_DisplayTimePlayed function
-ChatFrame_DisplayTimePlayed = function(_, totalTime, levelTime)
- -- Get player's money as string
- local money = GetMoneyString(GetMoney())
-
- -- Get player's class
- local localizedClass, englishClass = UnitClass("player")
- local colorClass = K.ClassColors[englishClass]
- local colorString = colorClass.colorStr
-
- -- Create messages using string formatting
- local totalTimeMessage = string.format("%sTotal time played: %s", K.SystemColor, K.GreyColor .. SecondsToTime(totalTime))
- local levelTimeMessage = string.format("%sTime played this level: %s", K.SystemColor, K.GreyColor .. SecondsToTime(levelTime))
- local moneyMessage = string.format("%sMoney: %s", K.SystemColor, K.GreyColor .. money)
-
- -- Create player info message using string concatenation
- local playerInfo = string.format("%s %sLevel %d|r |c%s%s|r", K.Name, K.SystemColor, K.Level, colorString, localizedClass)
-
- -- Print each message on its own line
- print(playerInfo)
- print(totalTimeMessage)
- print(levelTimeMessage)
- print(moneyMessage)
-end
-
for i = 1, GetNumAddOns() do
local Name, _, _, _, Reason = GetAddOnInfo(i)
K.AddOns[string_lower(Name)] = GetAddOnEnableState(K.Name, Name) == 2 and (not Reason or Reason ~= "DEMAND_LOADED")
diff --git a/KkthnxUI/KkthnxUI.toc b/KkthnxUI/KkthnxUI.toc
index 9f47f429..a621072d 100644
--- a/KkthnxUI/KkthnxUI.toc
+++ b/KkthnxUI/KkthnxUI.toc
@@ -1,8 +1,8 @@
-## Interface: 100206
+## Interface: 110000, 110002
+## Name: KkthnxUI
## Title: |cff669DFFKkthnxUI|r
## Notes: Empty toc for Curseforge
## Author: Josh "Kkthnx" Russell
## Version: 10.5.0
-## X-Support: DF
-## X-Curse-Project-ID: 95528
-## X-Wago-ID: lQNlqP6e
\ No newline at end of file
+## IconTexture: Interface\AddOns\KkthnxUI\Media\KkthnxUI_Spell_Icon
+## X-Support: TWW
\ No newline at end of file
diff --git a/KkthnxUI/KkthnxUI_Mainline.toc b/KkthnxUI/KkthnxUI_Mainline.toc
index 08b86367..b2110200 100644
--- a/KkthnxUI/KkthnxUI_Mainline.toc
+++ b/KkthnxUI/KkthnxUI_Mainline.toc
@@ -1,10 +1,11 @@
-## Interface: 100206
+## Interface: 110000, 110002
## Name: KkthnxUI
## Title: |cff669DFFKkthnxUI|r
## Notes: Enhances the game's user interface (UI) by providing a clean, minimalist design and a range of customizable features.|n|n|cff669DFFDeveloper|cffffffff:|r |nJosh "|CFF7b8489Kkthnx|r" Russell|n|n|cff009cdePayPal|r|cffffffff:|r |n|cffffffffwww.paypal.me/KkthnxTV|r|n|n|cfff96854Patreon|r|cffffffff:|r |n|cffffffffwww.patreon.com/Kkthnx|r
## Author: Josh "Kkthnx" Russell
## Version: 10.5.0
-## X-Support: DF
+## IconTexture: Interface\AddOns\KkthnxUI\Media\KkthnxUI_Spell_Icon
+## X-Support: TWW
## SavedVariables: KkthnxUIDB
## X-Curse-Project-ID: 95528
## X-Wago-ID: lQNlqP6e
diff --git a/KkthnxUI/LICENSE.txt b/KkthnxUI/LICENSE.txt
index bad1f185..4d0a3d84 100644
--- a/KkthnxUI/LICENSE.txt
+++ b/KkthnxUI/LICENSE.txt
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2015-2024 Kkthnx
+Copyright (c) 2015-2023 Kkthnx
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/KkthnxUI/Libraries/LibActionButton-1.0/LibActionButton-1.0.lua b/KkthnxUI/Libraries/LibActionButton-1.0/LibActionButton-1.0.lua
index f74dc073..7c9d584b 100644
--- a/KkthnxUI/Libraries/LibActionButton-1.0/LibActionButton-1.0.lua
+++ b/KkthnxUI/Libraries/LibActionButton-1.0/LibActionButton-1.0.lua
@@ -28,8 +28,8 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
]]
-local MAJOR_VERSION = "LibActionButton-1.0"
-local MINOR_VERSION = 110
+local MAJOR_VERSION = "LibActionButton-1.0-KkthnxUI"
+local MINOR_VERSION = 117
if not LibStub then
error(MAJOR_VERSION .. " requires LibStub.")
@@ -48,13 +48,14 @@ local WoWRetail = (WOW_PROJECT_ID == WOW_PROJECT_MAINLINE)
local WoWClassic = (WOW_PROJECT_ID == WOW_PROJECT_CLASSIC)
local WoWBCC = (WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC)
local WoWWrath = (WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC)
+local WoWCata = (WOW_PROJECT_ID == WOW_PROJECT_CATACLYSM_CLASSIC)
-- Enable custom flyouts for WoW Retail
local UseCustomFlyout = WoWRetail
local KeyBound = LibStub("LibKeyBound-1.0", true)
local CBH = LibStub("CallbackHandler-1.0")
-local LCG = LibStub("LibCustomGlow-1.0-KkthnxUI", true)
+local LCG = LibStub("LibCustomGlow-1.0-KkthnxUI", true) -- NDui: use LCG mod
local Masque = LibStub("Masque", true)
lib.eventFrame = lib.eventFrame or CreateFrame("Frame")
@@ -476,7 +477,15 @@ function SetupSecureSnippets(button)
end
end
-function WrapOnClick(button)
+function WrapOnClick(button, unwrapheader)
+ -- unwrap OnClick until we got our old script out
+ if unwrapheader and unwrapheader.UnwrapScript then
+ local wrapheader
+ repeat
+ wrapheader = unwrapheader:UnwrapScript(button, "OnClick")
+ until not wrapheader or wrapheader == unwrapheader
+ end
+
-- Wrap OnClick, to catch changes to actions that are applied with a click on the button.
button.header:WrapScript(
button,
@@ -577,10 +586,11 @@ function Generic:ClearSetPoint(...)
end
function Generic:NewHeader(header)
+ local oldheader = self.header
self.header = header
self:SetParent(header)
SetupSecureSnippets(self)
- WrapOnClick(self)
+ WrapOnClick(self, oldheader)
end
-----------------------------------------------------------
@@ -719,8 +729,9 @@ local DiscoverFlyoutSpells, UpdateFlyoutSpells, UpdateFlyoutHandlerScripts, Flyo
if UseCustomFlyout then
-- params: self, flyoutID
local FlyoutHandleFunc = [[
- local SPELLFLYOUT_DEFAULT_SPACING = 6
- local SPELLFLYOUT_INITIAL_SPACING = 6
+ local SPELLFLYOUT_DEFAULT_SPACING = 4
+ local SPELLFLYOUT_INITIAL_SPACING = 7
+ local SPELLFLYOUT_FINAL_SPACING = 9
local parent = self:GetAttribute("flyoutParentHandle")
if not parent then return end
@@ -845,7 +856,7 @@ if UseCustomFlyout then
end
]]
- local SPELLFLYOUT_INITIAL_SPACING = 6
+ local SPELLFLYOUT_INITIAL_SPACING = 7
local function ShowFlyoutInsecure(self, direction)
self.Background.End:ClearAllPoints()
self.Background.Start:ClearAllPoints()
@@ -1079,17 +1090,21 @@ local function PickupAny(kind, target, detail, ...)
if kind == "action" then
PickupAction(target)
elseif kind == "item" then
- PickupItem(target)
+ C_Item.PickupItem(target)
elseif kind == "macro" then
PickupMacro(target)
elseif kind == "petaction" then
PickupPetAction(target)
elseif kind == "spell" then
- PickupSpell(target)
+ if C_Spell and C_Spell.PickupSpell then
+ C_Spell.PickupSpell(target)
+ else
+ PickupSpell(target)
+ end
elseif kind == "companion" then
PickupCompanion(target, detail)
elseif kind == "equipmentset" then
- PickupEquipmentSet(target)
+ C_EquipmentSet.PickupEquipmentSet(target)
end
end
@@ -1272,6 +1287,7 @@ function InitializeEventHandler()
--lib.eventFrame:RegisterEvent("UPDATE_BONUS_ACTIONBAR")
lib.eventFrame:RegisterEvent("ACTIONBAR_SLOT_CHANGED")
lib.eventFrame:RegisterEvent("UPDATE_BINDINGS")
+ lib.eventFrame:RegisterEvent("GAME_PAD_ACTIVE_CHANGED")
lib.eventFrame:RegisterEvent("UPDATE_SHAPESHIFT_FORM")
lib.eventFrame:RegisterEvent("PLAYER_MOUNT_DISPLAY_CHANGED")
if not WoWClassic and not WoWBCC then
@@ -1375,7 +1391,7 @@ function OnEvent(frame, event, arg1, ...)
ShowGrid()
elseif event == "ACTIONBAR_HIDEGRID" then
HideGrid()
- elseif event == "UPDATE_BINDINGS" then
+ elseif event == "UPDATE_BINDINGS" or event == "GAME_PAD_ACTIVE_CHANGED" then
ForAllButtons(UpdateHotkeys)
elseif event == "PLAYER_TARGET_CHANGED" then
UpdateRangeTimer()
@@ -1676,7 +1692,7 @@ function Generic:UpdateAction(force)
Update(self)
end
end
-
+-- NDui: add quality border
local function ClearProfessionQuality(self)
if self.ProfessionQuality then
self.ProfessionQuality:Hide()
@@ -1694,7 +1710,7 @@ local function UpdateProfessionQuality(self)
if quality then
if not self.ProfessionQuality then
self.ProfessionQuality = CreateFrame("Frame", nil, self)
- self.ProfessionQuality:SetAllPoints()
+ self.ProfessionQuality:SetInside()
local tex = self.ProfessionQuality:CreateTexture(nil, "ARTWORK")
tex:SetPoint("TOPLEFT")
self.ProfessionQuality.Texture = tex
@@ -1887,7 +1903,7 @@ function UpdateUsable(self)
end
end
- if not WoWClassic and not WoWBCC and not WoWWrath and self._state_type == "action" then
+ if WoWRetail and self._state_type == "action" then
local isLevelLinkLocked = C_LevelLink.IsActionLocked(self._state_action)
if not self.icon:IsDesaturated() then
self.icon:SetDesaturated(isLevelLinkLocked)
@@ -2002,7 +2018,9 @@ function UpdateCooldown(self)
self.cooldown:SetDrawBling(self.cooldown:GetEffectiveAlpha() > 0.5)
- if (locStart + locDuration) > (start + duration) then
+ local hasLocCooldown = locStart and locDuration and locStart > 0 and locDuration > 0
+ local hasCooldown = enable and start and duration and start > 0 and duration > 0
+ if hasLocCooldown and ((not hasCooldown) or ((locStart + locDuration) > (start + duration))) then
if self.cooldown.currentCooldownType ~= COOLDOWN_TYPE_LOSS_OF_CONTROL then
self.cooldown:SetEdgeTexture("Interface\\Cooldown\\edge-LoC")
self.cooldown:SetSwipeColor(0.17, 0, 0)
@@ -2020,7 +2038,7 @@ function UpdateCooldown(self)
self.cooldown:SetHideCountdownNumbers(false)
self.cooldown.currentCooldownType = COOLDOWN_TYPE_NORMAL
end
- if locStart > 0 then
+ if hasLocCooldown then
self.cooldown:SetScript("OnCooldownDone", OnCooldownDone)
end
@@ -2082,13 +2100,13 @@ end
function ShowOverlayGlow(self)
if LCG then
- LCG.ButtonGlow_Start(self)
+ LCG.ShowOverlayGlow(self)
end
end
function HideOverlayGlow(self)
if LCG then
- LCG.ButtonGlow_Stop(self)
+ LCG.HideOverlayGlow(self)
end
end
@@ -2246,7 +2264,7 @@ else
-- based on ActionButton_UpdateFlyout in ActionButton.lua
local actionType = GetActionInfo(self._state_action)
if actionType == "flyout" then
- local isMouseOverButton = GetMouseFocus() == self
+ local isMouseOverButton = self:IsMouseOver()
local isButtonDown
if isButtonDownOverride ~= nil then
@@ -2327,7 +2345,7 @@ Generic.GetCount = function(self)
return 0
end
Generic.GetCooldown = function(self)
- return 0, 0, 0
+ return nil
end
Generic.IsAttack = function(self)
return nil
@@ -2470,13 +2488,38 @@ if WoWClassic then
end
end
-if WoWClassic or WoWBCC or WoWWrath then
+if not WoWRetail then
-- disable loss of control cooldown on classic
Action.GetLossOfControlCooldown = function(self)
return 0, 0
end
end
+local GetSpellTexture = C_Spell and C_Spell.GetSpellTexture or GetSpellTexture
+local GetSpellCastCount = C_Spell and C_Spell.GetSpellCastCount or GetSpellCount
+local IsAttackSpell = C_SpellBook and C_SpellBook.IsAutoAttackSpellBookItem or IsAttackSpell
+local IsCurrentSpell = C_Spell and C_Spell.IsCurrentSpell or IsCurrentSpell
+local IsAutoRepeatSpell = C_Spell and C_Spell.IsAutoRepeatSpell or IsAutoRepeatSpell
+local IsSpellUsable = C_Spell and C_Spell.IsSpellUsable or IsUsableSpell
+local IsConsumableSpell = C_Spell and C_Spell.IsConsumableSpell or IsConsumableSpell
+local IsSpellInRange = C_Spell and C_Spell.IsSpellInRange or IsSpellInRange
+local GetSpellLossOfControlCooldown = C_Spell and C_Spell.GetSpellLossOfControlCooldown or GetSpellLossOfControlCooldown
+
+-- unwrapped functions that return tables now
+local GetSpellCharges = (C_Spell and C_Spell.GetSpellCharges) and function(spell)
+ local c = C_Spell.GetSpellCharges(spell)
+ if c then
+ return c.currentCharges, c.maxCharges, c.cooldownStartTime, c.cooldownDuration
+ end
+end or GetSpellCharges
+local GetSpellCooldown = (C_Spell and C_Spell.GetSpellCooldown) and function(spell)
+ local c = C_Spell.GetSpellCooldown(spell)
+ if c then
+ return c.startTime, c.duration, c.isEnabled, c.modRate
+ end
+end or GetSpellCooldown
+
+local BOOKTYPE_SPELL = Enum.SpellBookSpellBank and Enum.SpellBookSpellBank.Player or "spell"
-----------------------------------------------------------
--- Spell Button
Spell.HasAction = function(self)
@@ -2492,15 +2535,15 @@ Spell.GetCharges = function(self)
return GetSpellCharges(self._state_action)
end
Spell.GetCount = function(self)
- return GetSpellCount(self._state_action)
+ return GetSpellCastCount(self._state_action)
end
Spell.GetCooldown = function(self)
return GetSpellCooldown(self._state_action)
end
Spell.IsAttack = function(self)
local slot = FindSpellBookSlotBySpellID(self._state_action)
- return slot and IsAttackSpell(slot, "spell") or nil
-end -- needs spell book id as of 4.0.1.13066
+ return slot and IsAttackSpell(slot, BOOKTYPE_SPELL) or nil
+end
Spell.IsEquipped = function(self)
return nil
end
@@ -2509,18 +2552,18 @@ Spell.IsCurrentlyActive = function(self)
end
Spell.IsAutoRepeat = function(self)
local slot = FindSpellBookSlotBySpellID(self._state_action)
- return slot and IsAutoRepeatSpell(slot, "spell") or nil
-end -- needs spell book id as of 4.0.1.13066
+ return slot and IsAutoRepeatSpell(slot, BOOKTYPE_SPELL) or nil
+end
Spell.IsUsable = function(self)
- return IsUsableSpell(self._state_action)
+ return IsSpellUsable(self._state_action)
end
Spell.IsConsumableOrStackable = function(self)
return IsConsumableSpell(self._state_action)
end
Spell.IsUnitInRange = function(self, unit)
local slot = FindSpellBookSlotBySpellID(self._state_action)
- return slot and IsSpellInRange(slot, "spell", unit) or nil
-end -- needs spell book id as of 4.0.1.13066
+ return slot and IsSpellInRange(slot, BOOKTYPE_SPELL, unit) or nil
+end
Spell.SetTooltip = function(self)
return GameTooltip:SetSpellByID(self._state_action)
end
@@ -2551,38 +2594,36 @@ Item.GetActionText = function(self)
return ""
end
Item.GetTexture = function(self)
- return GetItemIcon(self._state_action)
+ return C_Item.GetItemIconByID(self._state_action)
end
Item.GetCharges = function(self)
return nil
end
Item.GetCount = function(self)
- return GetItemCount(self._state_action, nil, true)
+ return C_Item.GetItemCount(self._state_action, nil, true)
end
Item.GetCooldown = function(self)
- return GetItemCooldown(getItemId(self._state_action))
+ return C_Container.GetItemCooldown(getItemId(self._state_action))
end
Item.IsAttack = function(self)
return nil
end
Item.IsEquipped = function(self)
- return IsEquippedItem(self._state_action)
+ return C_Item.IsEquippedItem(self._state_action)
end
Item.IsCurrentlyActive = function(self)
- return IsCurrentItem(self._state_action)
+ return C_Item.IsCurrentItem(self._state_action)
end
Item.IsAutoRepeat = function(self)
return nil
end
Item.IsUsable = function(self)
- return IsUsableItem(self._state_action)
+ return C_Item.IsUsableItem(self._state_action)
end
Item.IsConsumableOrStackable = function(self)
- return IsConsumableItem(self._state_action)
-end
-Item.IsUnitInRange = function(self, unit)
- return InCombatLockdown() or IsItemInRange(self._state_action, unit)
+ return C_Item.IsConsumableItem(self._state_action)
end
+--Item.IsUnitInRange = function(self, unit) return IsItemInRange(self._state_action, unit) end
Item.SetTooltip = function(self)
return GameTooltip:SetHyperlink(self._state_action)
end
@@ -2612,7 +2653,7 @@ Macro.GetCount = function(self)
return 0
end
Macro.GetCooldown = function(self)
- return 0, 0, 0
+ return nil
end
Macro.IsAttack = function(self)
return nil
@@ -2663,7 +2704,7 @@ Custom.GetCount = function(self)
return 0
end
Custom.GetCooldown = function(self)
- return 0, 0, 0
+ return nil
end
Custom.IsAttack = function(self)
return nil
@@ -2700,7 +2741,7 @@ Custom.GetPassiveCooldownSpellID = function(self)
end
--- WoW Classic overrides
-if WoWClassic or WoWBCC or WoWWrath then
+if not WoWRetail and not WoWCata then
UpdateOverlayGlow = function() end
end
diff --git a/KkthnxUI/Libraries/LibAnim/LibAnim.lua b/KkthnxUI/Libraries/LibAnim/LibAnim.lua
index 6bf62558..22d0271a 100644
--- a/KkthnxUI/Libraries/LibAnim/LibAnim.lua
+++ b/KkthnxUI/Libraries/LibAnim/LibAnim.lua
@@ -1,32 +1,25 @@
-- LibAnim by Hydra
-local Version = 2.07
+local Version = 2.901 -- based on 2.03
-if _LibAnim and _LibAnim >= Version then
+-- Note, deprecated items will be removed next version.
+-- Please update your usage accordingly. (ctrl + f - "Deprecated")
+
+if _G._LibAnim and _G._LibAnim >= Version then
return
end
-local pi = math.pi
-local cos = math.cos
-local sin = math.sin
-local mod = math.fmod
-local sqrt = math.sqrt
-local ceil = math.ceil
-local floor = math.floor
-local tinsert = table.insert
-local tremove = table.remove
-local lower = string.lower
-local pairs = pairs
-local Updater = CreateFrame("StatusBar")
+local Updater = CreateFrame("StatusBar", nil, nil, "BackdropTemplate")
local Texture = Updater:CreateTexture()
local FontString = Updater:CreateFontString()
-local Initialize = {}
-local Update = {}
-local Easing = {}
-local Callbacks = { ["onplay"] = {}, ["onpause"] = {}, ["onresume"] = {}, ["onstop"] = {}, ["onreset"] = {}, ["onfinished"] = {} }
+local Initialize, Update, Easing = {}, {}, {}
+local Callbacks = { onplay = {}, onpause = {}, onresume = {}, onstop = {}, onreset = {}, onfinished = {} }
+local pi, cos, sin, sqrt, floor = math.pi, math.cos, math.sin, math.sqrt, math.floor
+local type, pairs, ipairs, tonumber = type, pairs, ipairs, tonumber
+local tinsert, tremove, strlower = tinsert, tremove, strlower
-- Update all current animations
-local OnUpdate = function(self, elapsed)
- for i = #self, 1, -1 do
+local AnimationOnUpdate = function(self, elapsed)
+ for i = 1, #self do
if self[i] then -- Double check that the index still exists, due to pauses/stops removing them on the fly
self[i]:Update(elapsed, i)
end
@@ -37,47 +30,55 @@ local OnUpdate = function(self, elapsed)
end
end
+local StartUpdating = function(anim)
+ tinsert(Updater, anim)
+
+ if not Updater:GetScript("OnUpdate") then
+ Updater:SetScript("OnUpdate", AnimationOnUpdate)
+ end
+end
+
local GetColor = function(p, r1, g1, b1, r2, g2, b2)
return r1 + (r2 - r1) * p, g1 + (g2 - g1) * p, b1 + (b2 - b1) * p
end
local Set = {
- ["backdrop"] = Updater.SetBackdropColor,
- ["border"] = Updater.SetBackdropBorderColor,
- ["statusbar"] = Updater.SetStatusBarColor,
- ["text"] = FontString.SetTextColor,
- ["texture"] = Texture.SetTexture,
- ["vertex"] = Texture.SetVertexColor,
+ backdrop = Updater.SetBackdropColor,
+ border = Updater.SetBackdropBorderColor,
+ statusbar = Updater.SetStatusBarColor,
+ text = FontString.SetTextColor,
+ texture = Texture.SetTexture,
+ vertex = Texture.SetVertexColor,
}
local Get = {
- ["backdrop"] = Updater.GetBackdropColor,
- ["border"] = Updater.GetBackdropBorderColor,
- ["statusbar"] = Updater.GetStatusBarColor,
- ["text"] = FontString.GetTextColor,
- ["texture"] = Texture.GetVertexColor,
- ["vertex"] = Texture.GetVertexColor,
+ backdrop = Updater.GetBackdropColor,
+ border = Updater.GetBackdropBorderColor,
+ statusbar = Updater.GetStatusBarColor,
+ text = FontString.GetTextColor,
+ texture = Texture.GetVertexColor,
+ vertex = Texture.GetVertexColor,
}
--- Linear easing
-Easing["linear"] = function(t, b, c, d)
+-- Linear
+local Linear = function(t, b, c, d)
return c * t / d + b
end
--- Quadratic easing
-Easing["in-quadratic"] = function(t, b, c, d)
+-- Quadratic
+local InQuadratic = function(t, b, c, d)
t = t / d
return c * (t ^ 2) + b
end
-Easing["out-quadratic"] = function(t, b, c, d)
+local OutQuadratic = function(t, b, c, d)
t = t / d
return -c * t * (t - 2) + b
end
-Easing["inout-quadratic"] = function(t, b, c, d)
+local InOutQuadratic = function(t, b, c, d)
t = t / d * 2
if t < 1 then
@@ -87,20 +88,20 @@ Easing["inout-quadratic"] = function(t, b, c, d)
end
end
--- Cubic easing
-Easing["in-cubic"] = function(t, b, c, d)
+-- Cubic
+local InCubic = function(t, b, c, d)
t = t / d
return c * (t ^ 3) + b
end
-Easing["out-cubic"] = function(t, b, c, d)
+local OutCubic = function(t, b, c, d)
t = t / d - 1
return c * (t ^ 3 + 1) + b
end
-Easing["inout-cubic"] = function(t, b, c, d)
+local InOutCubic = function(t, b, c, d)
t = t / d * 2
if t < 1 then
@@ -112,20 +113,20 @@ Easing["inout-cubic"] = function(t, b, c, d)
end
end
--- Quartic easing
-Easing["in-quartic"] = function(t, b, c, d)
+-- Quartic
+local InQuartic = function(t, b, c, d)
t = t / d
return c * (t ^ 4) + b
end
-Easing["out-quartic"] = function(t, b, c, d)
+local OutQuartic = function(t, b, c, d)
t = t / d - 1
return -c * (t ^ 4 - 1) + b
end
-Easing["inout-quartic"] = function(t, b, c, d)
+local InOutQuartic = function(t, b, c, d)
t = t / d * 2
if t < 1 then
@@ -137,20 +138,20 @@ Easing["inout-quartic"] = function(t, b, c, d)
end
end
--- Quintic easing
-Easing["in-quintic"] = function(t, b, c, d)
+-- Quintic
+local InQuintic = function(t, b, c, d)
t = t / d
return c * (t ^ 5) + b
end
-Easing["out-quintic"] = function(t, b, c, d)
+local OutQuintic = function(t, b, c, d)
t = t / d - 1
return c * (t ^ 5 + 1) + b
end
-Easing["inout-quintic"] = function(t, b, c, d)
+local InOutQuintic = function(t, b, c, d)
t = t / d * 2
if t < 1 then
@@ -162,21 +163,21 @@ Easing["inout-quintic"] = function(t, b, c, d)
end
end
--- Sinusoidal easing
-Easing["in-sinusoidal"] = function(t, b, c, d)
+-- Sinusoidal
+local InSinusoidal = function(t, b, c, d)
return -c * cos(t / d * (pi / 2)) + c + b
end
-Easing["out-sinusoidal"] = function(t, b, c, d)
+local OutSinusoidal = function(t, b, c, d)
return c * sin(t / d * (pi / 2)) + b
end
-Easing["inout-sinusoidal"] = function(t, b, c, d)
+local InOutSinusoidal = function(t, b, c, d)
return -c / 2 * (cos(pi * t / d) - 1) + b
end
--- Exponential easing
-Easing["in-exponential"] = function(t, b, c, d)
+-- Exponential
+local InExponential = function(t, b, c, d)
if t == 0 then
return b
else
@@ -184,7 +185,7 @@ Easing["in-exponential"] = function(t, b, c, d)
end
end
-Easing["out-exponential"] = function(t, b, c, d)
+local OutExponential = function(t, b, c, d)
if t == d then
return b + c
else
@@ -192,7 +193,7 @@ Easing["out-exponential"] = function(t, b, c, d)
end
end
-Easing["inout-exponential"] = function(t, b, c, d)
+local InOutExponential = function(t, b, c, d)
if t == 0 then
return b
end
@@ -212,20 +213,20 @@ Easing["inout-exponential"] = function(t, b, c, d)
end
end
--- Circular easing
-Easing["in-circular"] = function(t, b, c, d)
+-- Circular
+local InCircular = function(t, b, c, d)
t = t / d
return (-c * (sqrt(1 - t * t) - 1) + b)
end
-Easing["out-circular"] = function(t, b, c, d)
+local OutCircular = function(t, b, c, d)
t = t / d - 1
return (c * sqrt(1 - t * t) + b)
end
-Easing["inout-circular"] = function(t, b, c, d)
+local InOutCircular = function(t, b, c, d)
t = t / d * 2
if t < 1 then
@@ -237,8 +238,8 @@ Easing["inout-circular"] = function(t, b, c, d)
end
end
--- Bounce easing
-Easing["out-bounce"] = function(t, b, c, d)
+-- Bounce
+local OutBounce = function(t, b, c, d)
t = t / d
if t < (1 / 2.75) then
@@ -258,20 +259,20 @@ Easing["out-bounce"] = function(t, b, c, d)
end
end
-Easing["in-bounce"] = function(t, b, c, d)
- return c - Easing["out-bounce"](d - t, 0, c, d) + b
+local InBounce = function(t, b, c, d)
+ return c - OutBounce(d - t, 0, c, d) + b
end
-Easing["inout-bounce"] = function(t, b, c, d)
+local InOutBounce = function(t, b, c, d)
if t < d / 2 then
- return Easing["in-bounce"](t * 2, 0, c, d) * 0.5 + b
+ return InBounce(t * 2, 0, c, d) * 0.5 + b
else
- return Easing["out-bounce"](t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b
+ return OutBounce(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b
end
end
--- Elastic easing
-Easing["in-elastic"] = function(t, b, c, d)
+-- Elastic
+local InElastic = function(t, b, c, d)
if t == 0 then
return b
end
@@ -291,7 +292,7 @@ Easing["in-elastic"] = function(t, b, c, d)
return -(a * 2 ^ (10 * t) * sin((t * d - s) * (2 * pi) / p)) + b
end
-Easing["out-elastic"] = function(t, b, c, d)
+local OutElastic = function(t, b, c, d)
if t == 0 then
return b
end
@@ -309,7 +310,7 @@ Easing["out-elastic"] = function(t, b, c, d)
return a * 2 ^ (-10 * t) * sin((t * d - s) * (2 * pi) / p) + c + b
end
-Easing["inout-elastic"] = function(t, b, c, d)
+local InOutElastic = function(t, b, c, d)
if t == 0 then
return b
end
@@ -335,20 +336,50 @@ Easing["inout-elastic"] = function(t, b, c, d)
end
end
--- Simple options
+Easing["linear"] = Linear
+Easing["in-quadratic"] = InQuadratic
+Easing["out-quadratic"] = OutQuadratic
+Easing["inout-quadratic"] = InOutQuadratic
+Easing["in-cubic"] = InCubic
+Easing["out-cubic"] = OutCubic
+Easing["inout-cubic"] = InOutCubic
+Easing["in-quartic"] = InQuartic
+Easing["out-quartic"] = OutQuartic
+Easing["inout-quartic"] = InOutQuartic
+Easing["in-quintic"] = InQuintic
+Easing["out-quintic"] = OutQuintic
+Easing["inout-quintic"] = InOutQuintic
+Easing["in-sinusoidal"] = InSinusoidal
+Easing["out-sinusoidal"] = OutSinusoidal
+Easing["inout-sinusoidal"] = InOutSinusoidal
+Easing["in-exponential"] = InExponential
+Easing["out-exponential"] = OutExponential
+Easing["inout-exponential"] = InOutExponential
+Easing["in-circular"] = InCircular
+Easing["out-circular"] = OutCircular
+Easing["inout-circular"] = InOutCircular
+Easing["in-bounce"] = InBounce
+Easing["out-bounce"] = OutBounce
+Easing["inout-bounce"] = InOutBounce
+Easing["in-elastic"] = InElastic
+Easing["out-elastic"] = OutElastic
+Easing["inout-elastic"] = InOutElastic
+
+-- Some fallbacks / lazy options
Easing["in"] = Easing["in-quadratic"]
Easing["out"] = Easing["out-quadratic"]
Easing["inout"] = Easing["inout-quadratic"]
+Easing["bounce"] = Easing["out-bounce"] -- Deprecated, don't use bounce without an explicit motion anymore
local AnimMethods = {
All = {
Play = function(self)
if not self.Paused then
- self:Callback("OnPlay")
Initialize[self.Type](self)
+ self:Callback("OnPlay")
else
+ StartUpdating(self)
self:Callback("OnResume")
- self:StartUpdating()
end
self.Playing = true
@@ -406,7 +437,7 @@ local AnimMethods = {
end,
SetEasing = function(self, easing)
- easing = lower(easing)
+ easing = strlower(easing)
self.Easing = Easing[easing] and easing or "linear"
end,
@@ -415,6 +446,16 @@ local AnimMethods = {
return self.Easing
end,
+ SetSmoothing = function(self, easing) -- Deprecated, change "SetSmoothing" to "SetEasing"
+ easing = strlower(easing)
+
+ self.Easing = Easing[easing] and easing or "linear"
+ end,
+
+ GetSmoothing = function(self) -- Deprecated, change "GetSmoothing" to "GetEasing"
+ return self.Easing
+ end,
+
SetDuration = function(self, duration)
self.Duration = duration or 0
end,
@@ -443,8 +484,33 @@ local AnimMethods = {
return self.Parent
end,
+ AddChild = function(self, child, mainChild)
+ if not self.children then
+ self.children = {}
+ end
+ if not self.mainChild then
+ self.mainChild = mainChild or child
+ elseif mainChild then
+ self.mainChild = mainChild
+ end
+ tinsert(self.children, child)
+ end,
+
+ RemoveChild = function(self, child)
+ if not self.children then
+ return
+ end
+ local checkIndex = type(child) == "number"
+ for index, tchild in ipairs(self.children) do
+ if (checkIndex and index == child) or tchild == child then
+ tremove(self.children, index)
+ break
+ end
+ end
+ end,
+
SetScript = function(self, handler, func)
- handler = lower(handler)
+ handler = strlower(handler)
if Callbacks[handler] then
Callbacks[handler][self] = func
@@ -452,7 +518,7 @@ local AnimMethods = {
end,
GetScript = function(self, handler)
- handler = lower(handler)
+ handler = strlower(handler)
if Callbacks[handler] and Callbacks[handler][self] then
return Callbacks[handler][self]
@@ -460,20 +526,12 @@ local AnimMethods = {
end,
Callback = function(self, handler)
- handler = lower(handler)
+ handler = strlower(handler)
if Callbacks[handler][self] then
Callbacks[handler][self](self)
end
end,
-
- StartUpdating = function(self)
- tinsert(Updater, self)
-
- if not Updater:GetScript("OnUpdate") then
- Updater:SetScript("OnUpdate", OnUpdate)
- end
- end,
},
move = {
@@ -507,17 +565,6 @@ local AnimMethods = {
self.ModTimer = 0
end
end,
-
- Finish = function(self)
- self:Stop()
-
- if self.IsRounded then
- self.ModTimer = 0
- end
-
- self.Parent:ClearAllPoints()
- self.Parent:SetPoint(self.A1, self.P, self.A2, self.EndX, self.EndY)
- end,
},
fade = {
@@ -530,18 +577,13 @@ local AnimMethods = {
end,
GetProgress = function(self)
- return self.CurrentValue
+ return self.AlphaOffset
end,
Reset = function(self)
self.Timer = 0
self.Parent:SetAlpha(self.StartAlpha)
end,
-
- Finish = function(self)
- self:Stop()
- self.Parent:SetAlpha(self.EndAlpha)
- end,
},
height = {
@@ -554,18 +596,13 @@ local AnimMethods = {
end,
GetProgress = function(self)
- return self.CurrentValue
+ return self.HeightOffset
end,
Reset = function(self)
self.Timer = 0
self.Parent:SetHeight(self.StartHeight)
end,
-
- Finish = function(self)
- self:Stop()
- self.Parent:SetHeight(self.EndHeight)
- end,
},
width = {
@@ -578,18 +615,13 @@ local AnimMethods = {
end,
GetProgress = function(self)
- return self.CurrentValue
+ return self.WidthOffset
end,
Reset = function(self)
self.Timer = 0
self.Parent:SetWidth(self.StartWidth)
end,
-
- Finish = function(self)
- self:Stop()
- self.Parent:SetWidth(self.EndWidth)
- end,
},
color = {
@@ -604,9 +636,9 @@ local AnimMethods = {
end,
SetColorType = function(self, region)
- region = lower(region)
+ region = strlower(region)
- self.ColorType = Set[region] and region or "border"
+ self.ColorType = (Set[region] and region) or "border"
end,
GetColorType = function(self)
@@ -614,18 +646,13 @@ local AnimMethods = {
end,
GetProgress = function(self)
- return self.CurrentValue
+ return self.ColorOffset
end,
Reset = function(self)
self.Timer = 0
Set[self.ColorType](self.Parent, self.StartR, self.StartG, self.StartB)
end,
-
- Finish = function(self)
- self:Stop()
- Set[self.ColorType](self.Parent, self.EndR, self.EndG, self.EndB)
- end,
},
progress = {
@@ -638,18 +665,13 @@ local AnimMethods = {
end,
GetProgress = function(self)
- return self.CurrentValue
+ return self.ValueOffset
end,
Reset = function(self)
self.Timer = 0
self.Parent:SetValue(self.StartValue)
end,
-
- Finish = function(self)
- self:Stop()
- self.Parent:SetValue(self.EndValue)
- end,
},
number = {
@@ -686,18 +708,13 @@ local AnimMethods = {
end,
GetProgress = function(self)
- return self.CurrentValue
+ return self.NumberOffset
end,
Reset = function(self)
self.Timer = 0
self.Parent:SetText(self.StartNumber)
end,
-
- Finish = function(self)
- self:Stop()
- self.Parent:SetText(self.EndNumber)
- end,
},
sleep = {
@@ -708,87 +725,11 @@ local AnimMethods = {
Reset = function(self)
self.Timer = 0
end,
-
- Finish = function(self)
- self:Stop()
- end,
- },
-
- scale = {
- SetChange = function(self, width)
- self.EndScaleSetting = width or 0
- end,
-
- GetChange = function(self)
- return self.EndScaleSetting
- end,
-
- GetProgress = function(self)
- return self.CurrentValue
- end,
-
- Reset = function(self)
- self.Timer = 0
- end,
-
- Finish = function(self)
- self:Stop()
- self.Parent:SetScale(self.EndScale)
- end,
- },
-
- frames = {
- SetTextureSize = function(self, width, height)
- self.TextureWidthSetting = width or 0
- self.TextureHeightSetting = height or width or 0
- end,
-
- GetTextureSize = function(self)
- return self.TextureWidthSetting, self.TextureHeightSetting
- end,
-
- SetFrameSize = function(self, size)
- self.FrameSizeSetting = size or 0
- end,
-
- GetFrameSize = function(self)
- return self.FrameSizeSetting
- end,
-
- SetNumFrames = function(self, frames)
- self.NumFramesSetting = frames or 0
- end,
-
- GetNumFrames = function(self)
- return self.NumFramesSetting
- end,
-
- SetFrameDelay = function(self, delay)
- self.DelaySetting = delay or 0
- end,
-
- GetFrameDelay = function(self)
- return self.DelaySetting
- end,
-
- GetProgress = function(self)
- return self.Frame
- end,
-
- Reset = function(self)
- self.Timer = 0
- end,
-
- Finish = function(self)
- self:Stop()
- end,
},
}
local GroupMethods = {
Play = function(self)
- self:Callback("OnPlay")
-
for i = 1, #self.Animations do
if self.Animations[i].Order == self.Order then
self.Animations[i]:Play()
@@ -798,6 +739,8 @@ local GroupMethods = {
self.Playing = true
self.Paused = false
self.Stopped = false
+
+ self:Callback("OnPlay")
end,
IsPlaying = function(self)
@@ -852,7 +795,7 @@ local GroupMethods = {
end,
SetScript = function(self, handler, func)
- handler = lower(handler)
+ handler = strlower(handler)
if Callbacks[handler] then
Callbacks[handler][self] = func
@@ -860,7 +803,7 @@ local GroupMethods = {
end,
GetScript = function(self, handler)
- handler = lower(handler)
+ handler = strlower(handler)
if Callbacks[handler] and Callbacks[handler][self] then
return Callbacks[handler][self]
@@ -868,7 +811,7 @@ local GroupMethods = {
end,
Callback = function(self, handler)
- handler = lower(handler)
+ handler = strlower(handler)
if Callbacks[handler][self] then
Callbacks[handler][self](self)
@@ -917,7 +860,7 @@ local GroupMethods = {
end,
CreateAnimation = function(self, style)
- style = lower(style)
+ style = strlower(style)
if not Initialize[style] then
return
@@ -956,7 +899,7 @@ local GroupMethods = {
end,
}
-CreateAnimationGroup = function(parent)
+_G.CreateAnimationGroup = function(parent)
local Group = { Animations = {} }
-- Add methods to the group
@@ -975,7 +918,7 @@ CreateAnimationGroup = function(parent)
end
-- Movement
-Initialize["move"] = function(self)
+Initialize.move = function(self)
if self.Playing then
return
end
@@ -987,9 +930,9 @@ Initialize["move"] = function(self)
self.P = P
self.A2 = A2
self.StartX = X
- self.EndX = (X + self.XSetting) or 0
+ self.EndX = X + self.XSetting or 0
self.StartY = Y
- self.EndY = (Y + self.YSetting) or 0
+ self.EndY = Y + self.YSetting or 0
self.XChange = self.EndX - self.StartX
self.YChange = self.EndY - self.StartY
@@ -1001,10 +944,10 @@ Initialize["move"] = function(self)
end
end
- self:StartUpdating()
+ StartUpdating(self)
end
-Update["move"] = function(self, elapsed, i)
+Update.move = function(self, elapsed, i)
self.Timer = self.Timer + elapsed
if self.Timer >= self.Duration then
@@ -1028,36 +971,51 @@ Update["move"] = function(self, elapsed, i)
end
-- Fade
-Initialize["fade"] = function(self)
+Initialize.fade = function(self)
if self.Playing then
return
end
self.Timer = 0
- self.StartAlpha = self.Parent:GetAlpha() or 1
+ self.StartAlpha = (self.mainChild or self.Parent):GetAlpha() or 1
self.EndAlpha = self.EndAlphaSetting or 0
self.Change = self.EndAlpha - self.StartAlpha
- self:StartUpdating()
+ StartUpdating(self)
end
-Update["fade"] = function(self, elapsed, i)
+Update.fade = function(self, elapsed, i)
self.Timer = self.Timer + elapsed
if self.Timer >= self.Duration then
tremove(Updater, i)
- self.Parent:SetAlpha(self.EndAlpha)
+
+ if self.children then
+ for _, child in pairs(self.children) do
+ child:SetAlpha(self.EndAlpha)
+ end
+ else
+ self.Parent:SetAlpha(self.EndAlpha)
+ end
+
self.Playing = false
self:Callback("OnFinished")
self.Group:CheckOrder()
- else
- self.CurrentValue = Easing[self.Easing](self.Timer, self.StartAlpha, self.Change, self.Duration)
- self.Parent:SetAlpha(self.CurrentValue)
+ elseif self.children then
+ self.AlphaOffset = Easing[self.Easing](self.Timer, self.StartAlpha, self.Change, self.Duration)
+ for _, child in pairs(self.children) do
+ if child:IsShown() then
+ child:SetAlpha(self.AlphaOffset)
+ end
+ end
+ elseif self.Parent:IsShown() then
+ self.AlphaOffset = Easing[self.Easing](self.Timer, self.StartAlpha, self.Change, self.Duration)
+ self.Parent:SetAlpha(self.AlphaOffset)
end
end
-- Height
-Initialize["height"] = function(self)
+Initialize.height = function(self)
if self.Playing then
return
end
@@ -1067,10 +1025,10 @@ Initialize["height"] = function(self)
self.EndHeight = self.EndHeightSetting or 0
self.HeightChange = self.EndHeight - self.StartHeight
- self:StartUpdating()
+ StartUpdating(self)
end
-Update["height"] = function(self, elapsed, i)
+Update.height = function(self, elapsed, i)
self.Timer = self.Timer + elapsed
if self.Timer >= self.Duration then
@@ -1080,13 +1038,13 @@ Update["height"] = function(self, elapsed, i)
self:Callback("OnFinished")
self.Group:CheckOrder()
else
- self.CurrentValue = Easing[self.Easing](self.Timer, self.StartHeight, self.HeightChange, self.Duration)
- self.Parent:SetHeight(self.CurrentValue)
+ self.HeightOffset = Easing[self.Easing](self.Timer, self.StartHeight, self.HeightChange, self.Duration)
+ self.Parent:SetHeight(self.HeightOffset)
end
end
-- Width
-Initialize["width"] = function(self)
+Initialize.width = function(self)
if self.Playing then
return
end
@@ -1096,10 +1054,10 @@ Initialize["width"] = function(self)
self.EndWidth = self.EndWidthSetting or 0
self.WidthChange = self.EndWidth - self.StartWidth
- self:StartUpdating()
+ StartUpdating(self)
end
-Update["width"] = function(self, elapsed, i)
+Update.width = function(self, elapsed, i)
self.Timer = self.Timer + elapsed
if self.Timer >= self.Duration then
@@ -1109,49 +1067,60 @@ Update["width"] = function(self, elapsed, i)
self:Callback("OnFinished")
self.Group:CheckOrder()
else
- self.CurrentValue = Easing[self.Easing](self.Timer, self.StartWidth, self.WidthChange, self.Duration)
- self.Parent:SetWidth(self.CurrentValue)
+ self.WidthOffset = Easing[self.Easing](self.Timer, self.StartWidth, self.WidthChange, self.Duration)
+ self.Parent:SetWidth(self.WidthOffset)
end
end
-- Color
-Initialize["color"] = function(self)
+Initialize.color = function(self)
self.Timer = 0
self.ColorType = self.ColorType or "backdrop"
- self.StartR, self.StartG, self.StartB = Get[self.ColorType](self.Parent)
+ self.StartR, self.StartG, self.StartB = Get[self.ColorType](self.mainChild or self.Parent)
self.EndR = self.EndRSetting or 1
self.EndG = self.EndGSetting or 1
self.EndB = self.EndBSetting or 1
- self:StartUpdating()
+ StartUpdating(self)
end
-Update["color"] = function(self, elapsed, i)
+Update.color = function(self, elapsed, i)
self.Timer = self.Timer + elapsed
if self.Timer >= self.Duration then
tremove(Updater, i)
- Set[self.ColorType](self.Parent, self.EndR, self.EndG, self.EndB)
+ if self.children then
+ for _, child in pairs(self.children) do
+ Set[self.ColorType](child, self.EndR, self.EndG, self.EndB)
+ end
+ else
+ Set[self.ColorType](self.Parent, self.EndR, self.EndG, self.EndB)
+ end
self.Playing = false
self:Callback("OnFinished")
self.Group:CheckOrder()
+ elseif self.children then
+ self.ColorOffset = Easing[self.Easing](self.Timer, 0, self.Duration, self.Duration)
+ for _, child in pairs(self.children) do
+ Set[self.ColorType](child, GetColor(self.Timer / self.Duration, self.StartR, self.StartG, self.StartB, self.EndR, self.EndG, self.EndB))
+ end
else
- self.CurrentValue = Easing[self.Easing](self.Timer, 0, self.Duration, self.Duration)
+ self.ColorOffset = Easing[self.Easing](self.Timer, 0, self.Duration, self.Duration)
Set[self.ColorType](self.Parent, GetColor(self.Timer / self.Duration, self.StartR, self.StartG, self.StartB, self.EndR, self.EndG, self.EndB))
end
end
-- Progress
-Initialize["progress"] = function(self)
+Initialize.progress = function(self)
self.Timer = 0
self.StartValue = self.Parent:GetValue() or 0
self.EndValue = self.EndValueSetting or 0
self.ProgressChange = self.EndValue - self.StartValue
- self:StartUpdating()
+ StartUpdating(self)
end
-Update["progress"] = function(self, elapsed, i)
+Update.progress = function(self, elapsed, i)
self.Timer = self.Timer + elapsed
if self.Timer >= self.Duration then
@@ -1161,19 +1130,19 @@ Update["progress"] = function(self, elapsed, i)
self:Callback("OnFinished")
self.Group:CheckOrder()
else
- self.CurrentValue = Easing[self.Easing](self.Timer, self.StartValue, self.ProgressChange, self.Duration)
- self.Parent:SetValue(self.CurrentValue)
+ self.ValueOffset = Easing[self.Easing](self.Timer, self.StartValue, self.ProgressChange, self.Duration)
+ self.Parent:SetValue(self.ValueOffset)
end
end
-- Sleep
-Initialize["sleep"] = function(self)
+Initialize.sleep = function(self)
self.Timer = 0
- self:StartUpdating()
+ StartUpdating(self)
end
-Update["sleep"] = function(self, elapsed, i)
+Update.sleep = function(self, elapsed, i)
self.Timer = self.Timer + elapsed
if self.Timer >= self.Duration then
@@ -1185,7 +1154,7 @@ Update["sleep"] = function(self, elapsed, i)
end
-- Number
-Initialize["number"] = function(self)
+Initialize.number = function(self)
self.Timer = 0
if not self.StartNumber then
@@ -1197,10 +1166,10 @@ Initialize["number"] = function(self)
self.Prefix = self.Prefix or ""
self.Postfix = self.Postfix or ""
- self:StartUpdating()
+ StartUpdating(self)
end
-Update["number"] = function(self, elapsed, i)
+Update.number = function(self, elapsed, i)
self.Timer = self.Timer + elapsed
if self.Timer >= self.Duration then
@@ -1210,90 +1179,59 @@ Update["number"] = function(self, elapsed, i)
self:Callback("OnFinished")
self.Group:CheckOrder()
else
- self.CurrentValue = Easing[self.Easing](self.Timer, self.StartNumber, self.NumberChange, self.Duration)
- self.Parent:SetText(self.Prefix .. floor(self.CurrentValue) .. self.Postfix)
+ self.NumberOffset = Easing[self.Easing](self.Timer, self.StartNumber, self.NumberChange, self.Duration)
+ self.Parent:SetText(self.Prefix .. floor(self.NumberOffset) .. self.Postfix)
end
end
--- Scale
-Initialize["scale"] = function(self)
- if self.Playing then
+-- Global exposure
+_G._LibAnim = Version
+_G.LibAnimStartUpdating = StartUpdating
+_G.LibAnimUpdater = Updater
+_G.LibAnimAddType = function(name, init, update)
+ if type(init) ~= "function" or type(update) ~= "function" then
return
end
- self.Timer = 0
- self.StartScale = self.Parent:GetScale() or 1
- self.EndScale = self.EndScaleSetting or 1
- self.ScaleChange = self.EndScale - self.StartScale
-
- self:StartUpdating()
-end
-
-Update["scale"] = function(self, elapsed, i)
- self.Timer = self.Timer + elapsed
-
- if self.Timer >= self.Duration then
- tremove(Updater, i)
- self.Parent:SetScale(self.EndScale)
- self.Playing = false
- self:Callback("OnFinished")
- self.Group:CheckOrder()
- else
- self.CurrentValue = Easing[self.Easing](self.Timer, self.StartScale, self.ScaleChange, self.Duration)
- self.Parent:SetScale(self.CurrentValue)
- end
-end
+ name = strlower(name)
--- Frames
-Initialize["frames"] = function(self)
- if self.Playing then
+ if Initialize[name] then
return
end
- self.Timer = 0
- self.Frame = 1
- self.Delay = self.DelaySetting or 0
- self.Throttle = self.Delay
- self.NumFrames = self.NumFramesSetting or 0
- self.TextureWidth = self.TextureWidthSetting or self.Parent:GetWidth()
- self.TextureHeight = self.TextureHeightSetting or self.Parent:GetHeight()
- self.FrameSize = self.FrameSizeSetting or 0
- self.NumColumns = floor(self.TextureWidth / self.FrameSize)
- self.ColumnWidth = self.FrameSize / self.TextureWidth
- self.NumRows = floor(self.TextureHeight / self.FrameSize)
- self.RowHeight = self.FrameSize / self.TextureHeight
-
- self:StartUpdating()
+ Initialize[name] = init
+ Update[name] = update
end
-Update["frames"] = function(self, elapsed, i)
- self.Timer = self.Timer + elapsed
+--[[
+ Want to create your own animations for this system? Follow the example below
+ If you make a custom animation I would love to see it!
- if self.Timer >= self.Duration then
- tremove(Updater, i)
- self.Playing = false
- self:Callback("OnFinished")
- self.Group:CheckOrder()
- else
- if self.Throttle > self.Delay then
- local Advance = floor(self.Throttle / self.Delay)
+ Example:
- while self.Frame + Advance > self.NumFrames do
- self.Frame = self.Frame - self.NumFrames
- end
+ local MyInitialize = function(self)
+ self.Timer = 0
- self.Frame = self.Frame + Advance
+ -- do any initialization right before the animation plays
- local Left = mod(self.Frame - 1, self.NumColumns) * self.ColumnWidth
- local Bottom = ceil(self.Frame / self.NumColumns) * self.RowHeight
+ LibAnimStartUpdating(self)
+ end
- self.Parent:SetTexCoord(Left, Left + self.ColumnWidth, Bottom - self.RowHeight, Bottom)
- self.Throttle = 0
- end
+ local MyUpdate = function(self, elapsed, i)
+ self.Timer = self.Timer + elapsed
+
+ if self.Timer >= self.Duration then
+ table.remove(LibAnimUpdater, i)
- self.Throttle = self.Throttle + elapsed
+ -- Set finished attributes here
+
+ self.Playing = false
+ self:Callback("OnFinished")
+ self.Group:CheckOrder()
+ else
+ -- Do any updating necessary here
+ end
end
-end
--- Global exposure
-_G["_LibAnim"] = Version
+ LibAnimAddType("MyAnim", MyInitialize, MyUpdate)
+--]]
diff --git a/KkthnxUI/Libraries/LibCustomGlow-1.0/LibCustomGlow-1.0.lua b/KkthnxUI/Libraries/LibCustomGlow-1.0/LibCustomGlow-1.0.lua
index 4b5fa0e3..05e4f72c 100644
--- a/KkthnxUI/Libraries/LibCustomGlow-1.0/LibCustomGlow-1.0.lua
+++ b/KkthnxUI/Libraries/LibCustomGlow-1.0/LibCustomGlow-1.0.lua
@@ -6,7 +6,7 @@ https://www.wowace.com/projects/libbuttonglow-1-0
-- luacheck: globals CreateFromMixins ObjectPoolMixin CreateTexturePool CreateFramePool
local MAJOR_VERSION = "LibCustomGlow-1.0-KkthnxUI"
-local MINOR_VERSION = 16
+local MINOR_VERSION = 19
if not LibStub then
error(MAJOR_VERSION .. " requires LibStub.")
end
@@ -16,6 +16,7 @@ if not lib then
end
local Masque = LibStub("Masque", true)
+local fallbackLevel = 0 -- KkthnxUI: decreased from 8
local isRetail = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
local textureList = {
empty = [[Interface\AdventureMap\BrokenIsles\AM_29]],
@@ -38,20 +39,50 @@ lib.startList = {}
lib.stopList = {}
local GlowParent = UIParent
-
-local GlowMaskPool = CreateFromMixins(ObjectPoolMixin)
-lib.GlowMaskPool = GlowMaskPool
-local function MaskPoolFactory(maskPool)
- return maskPool.parent:CreateMaskTexture()
-end
-
-local MaskPoolResetter = function(maskPool, mask)
- mask:Hide()
- mask:ClearAllPoints()
-end
-
-ObjectPoolMixin.OnLoad(GlowMaskPool, MaskPoolFactory, MaskPoolResetter)
-GlowMaskPool.parent = GlowParent
+local GlowMaskPool = {
+ createFunc = function(self)
+ return self.parent:CreateMaskTexture()
+ end,
+ resetFunc = function(self, mask)
+ mask:Hide()
+ mask:ClearAllPoints()
+ end,
+ AddObject = function(self, object)
+ local dummy = true
+ self.activeObjects[object] = dummy
+ self.activeObjectCount = self.activeObjectCount + 1
+ end,
+ ReclaimObject = function(self, object)
+ tinsert(self.inactiveObjects, object)
+ self.activeObjects[object] = nil
+ self.activeObjectCount = self.activeObjectCount - 1
+ end,
+ Release = function(self, object)
+ local active = self.activeObjects[object] ~= nil
+ if active then
+ self:resetFunc(object)
+ self:ReclaimObject(object)
+ end
+ return active
+ end,
+ Acquire = function(self)
+ local object = tremove(self.inactiveObjects)
+ local new = object == nil
+ if new then
+ object = self:createFunc()
+ self:resetFunc(object, new)
+ end
+ self:AddObject(object)
+ return object, new
+ end,
+ Init = function(self, parent)
+ self.activeObjects = {}
+ self.inactiveObjects = {}
+ self.activeObjectCount = 0
+ self.parent = parent
+ end,
+}
+GlowMaskPool:Init(GlowParent)
local TexPoolResetter = function(pool, tex)
local maskNum = tex:GetNumMaskTextures()
@@ -97,7 +128,7 @@ lib.GlowFramePool = GlowFramePool
local function addFrameAndTex(r, color, name, key, N, xOffset, yOffset, texture, texCoord, desaturated, frameLevel)
key = key or ""
- frameLevel = frameLevel or 8
+ frameLevel = frameLevel or fallbackLevel
if not r[name .. key] then
r[name .. key] = GlowFramePool:Acquire()
r[name .. key]:SetParent(r)
@@ -615,11 +646,19 @@ end
local ButtonGlowTextures = { ["spark"] = true, ["innerGlow"] = true, ["innerGlowOver"] = true, ["outerGlow"] = true, ["outerGlowOver"] = true, ["ants"] = true }
+local function noZero(num)
+ if num == 0 then
+ return 0.001
+ else
+ return num
+ end
+end
+
function lib.ButtonGlow_Start(r, color, frequency, frameLevel)
if not r then
return
end
- frameLevel = frameLevel or 8
+ frameLevel = frameLevel or fallbackLevel
local throttle
if frequency and frequency > 0 then
throttle = 0.25 / frequency * 0.01
@@ -644,7 +683,8 @@ function lib.ButtonGlow_Start(r, color, frequency, frameLevel)
for texture in pairs(ButtonGlowTextures) do
f[texture]:SetDesaturated(nil)
f[texture]:SetVertexColor(1, 1, 1)
- f[texture]:SetAlpha(f[texture]:GetAlpha() / (f.color and f.color[4] or 1))
+ local alpha = math.min(f[texture]:GetAlpha() / noZero(f.color and f.color[4] or 1), 1)
+ f[texture]:SetAlpha(alpha)
updateAlphaAnim(f, 1)
end
f.color = false
@@ -652,7 +692,8 @@ function lib.ButtonGlow_Start(r, color, frequency, frameLevel)
for texture in pairs(ButtonGlowTextures) do
f[texture]:SetDesaturated(1)
f[texture]:SetVertexColor(color[1], color[2], color[3])
- f[texture]:SetAlpha(f[texture]:GetAlpha() / (f.color and f.color[4] or 1) * color[4])
+ local alpha = math.min(f[texture]:GetAlpha() / noZero(f.color and f.color[4] or 1) * color[4], 1)
+ f[texture]:SetAlpha(alpha)
updateAlphaAnim(f, color and color[4] or 1)
end
f.color = color
@@ -715,3 +756,211 @@ end
table.insert(lib.glowList, "Action Button Glow")
lib.startList["Action Button Glow"] = lib.ButtonGlow_Start
lib.stopList["Action Button Glow"] = lib.ButtonGlow_Stop
+
+-- ProcGlow
+
+local function ProcGlowResetter(framePool, frame)
+ frame:Hide()
+ frame:ClearAllPoints()
+ frame:SetScript("OnShow", nil)
+ frame:SetScript("OnHide", nil)
+ local parent = frame:GetParent()
+ if frame.key and parent[frame.key] then
+ parent[frame.key] = nil
+ end
+end
+
+local ProcGlowPool = CreateFramePool("Frame", GlowParent, nil, ProcGlowResetter)
+lib.ProcGlowPool = ProcGlowPool
+
+local function InitProcGlow(f)
+ f.ProcStart = f:CreateTexture(nil, "ARTWORK")
+ f.ProcStart:SetBlendMode("ADD")
+ f.ProcStart:SetAtlas("UI-HUD-ActionBar-Proc-Start-Flipbook")
+ f.ProcStart:SetAlpha(1)
+ f.ProcStart:SetSize(150, 150)
+ f.ProcStart:SetPoint("CENTER")
+
+ f.ProcLoop = f:CreateTexture(nil, "ARTWORK")
+ f.ProcLoop:SetAtlas("UI-HUD-ActionBar-Proc-Loop-Flipbook")
+ f.ProcLoop:SetAlpha(0)
+ f.ProcLoop:SetAllPoints()
+
+ f.ProcLoopAnim = f:CreateAnimationGroup()
+ f.ProcLoopAnim:SetLooping("REPEAT")
+ f.ProcLoopAnim:SetToFinalAlpha(true)
+
+ local alphaRepeat = f.ProcLoopAnim:CreateAnimation("Alpha")
+ alphaRepeat:SetChildKey("ProcLoop")
+ alphaRepeat:SetFromAlpha(1)
+ alphaRepeat:SetToAlpha(1)
+ alphaRepeat:SetDuration(0.001)
+ alphaRepeat:SetOrder(0)
+ f.ProcLoopAnim.alphaRepeat = alphaRepeat
+
+ local flipbookRepeat = f.ProcLoopAnim:CreateAnimation("FlipBook")
+ flipbookRepeat:SetChildKey("ProcLoop")
+ flipbookRepeat:SetDuration(1)
+ flipbookRepeat:SetOrder(0)
+ flipbookRepeat:SetFlipBookRows(6)
+ flipbookRepeat:SetFlipBookColumns(5)
+ flipbookRepeat:SetFlipBookFrames(30)
+ flipbookRepeat:SetFlipBookFrameWidth(0)
+ flipbookRepeat:SetFlipBookFrameHeight(0)
+ f.ProcLoopAnim.flipbookRepeat = flipbookRepeat
+
+ f.ProcStartAnim = f:CreateAnimationGroup()
+ f.ProcStartAnim:SetToFinalAlpha(true)
+
+ local flipbookStartAlphaIn = f.ProcStartAnim:CreateAnimation("Alpha")
+ flipbookStartAlphaIn:SetChildKey("ProcStart")
+ flipbookStartAlphaIn:SetDuration(0.001)
+ flipbookStartAlphaIn:SetOrder(0)
+ flipbookStartAlphaIn:SetFromAlpha(1)
+ flipbookStartAlphaIn:SetToAlpha(1)
+
+ local flipbookStart = f.ProcStartAnim:CreateAnimation("FlipBook")
+ flipbookStart:SetChildKey("ProcStart")
+ flipbookStart:SetDuration(0.7)
+ flipbookStart:SetOrder(1)
+ flipbookStart:SetFlipBookRows(6)
+ flipbookStart:SetFlipBookColumns(5)
+ flipbookStart:SetFlipBookFrames(30)
+ flipbookStart:SetFlipBookFrameWidth(0)
+ flipbookStart:SetFlipBookFrameHeight(0)
+
+ local flipbookStartAlphaOut = f.ProcStartAnim:CreateAnimation("Alpha")
+ flipbookStartAlphaOut:SetChildKey("ProcStart")
+ flipbookStartAlphaOut:SetDuration(0.001)
+ flipbookStartAlphaOut:SetOrder(2)
+ flipbookStartAlphaOut:SetFromAlpha(1)
+ flipbookStartAlphaOut:SetToAlpha(0)
+
+ f.ProcStartAnim.flipbookStart = flipbookStart
+ f.ProcStartAnim:SetScript("OnFinished", function(self)
+ self:GetParent().ProcLoopAnim:Play()
+ self:GetParent().ProcLoop:Show()
+ end)
+end
+
+local function SetupProcGlow(f, options)
+ f.key = "_ProcGlow" .. options.key -- for resetter
+ f:SetScript("OnHide", function(self)
+ if self.ProcStartAnim:IsPlaying() then
+ self.ProcStartAnim:Stop()
+ end
+ if self.ProcLoopAnim:IsPlaying() then
+ self.ProcLoopAnim:Stop()
+ end
+ end)
+ f:SetScript("OnShow", function(self)
+ if self.startAnim then
+ if not self.ProcStartAnim:IsPlaying() and not self.ProcLoopAnim:IsPlaying() then
+ --[[
+to future me:
+i wish you'r ok, if you wonder where are this constants coming from, check:
+https://github.com/Gethe/wow-ui-source/blob/eb4459c679a1bd8919cad92934ea83c4f5e77e8b/Interface/FrameXML/ActionButton.lua#L816
+https://github.com/Gethe/wow-ui-source/blob/d8e8ebf572c3b28237cf83e8fc5c0583b5453a2b/Interface/FrameXML/ActionButtonTemplate.xml#L5-L14
+ ]]
+ local width, height = self:GetSize()
+ self.ProcStart:SetSize((width / 42 * 150) / 1.4, (height / 42 * 150) / 1.4)
+ self.ProcStart:Show()
+ self.ProcLoop:Hide()
+ self.ProcStartAnim:Play()
+ end
+ else
+ if not self.ProcLoopAnim:IsPlaying() then
+ self.ProcStart:Hide()
+ self.ProcLoop:Show()
+ self.ProcLoopAnim:Play()
+ end
+ end
+ end)
+ if not options.color then
+ f.ProcStart:SetDesaturated(nil)
+ f.ProcStart:SetVertexColor(1, 1, 1, 1)
+ f.ProcLoop:SetDesaturated(nil)
+ f.ProcLoop:SetVertexColor(1, 1, 1, 1)
+ else
+ f.ProcStart:SetDesaturated(1)
+ f.ProcStart:SetVertexColor(options.color[1], options.color[2], options.color[3], options.color[4])
+ f.ProcLoop:SetDesaturated(1)
+ f.ProcLoop:SetVertexColor(options.color[1], options.color[2], options.color[3], options.color[4])
+ end
+ f.ProcLoopAnim.flipbookRepeat:SetDuration(options.duration)
+ f.startAnim = options.startAnim
+end
+
+local ProcGlowDefaults = {
+ frameLevel = 8,
+ color = nil,
+ startAnim = true,
+ xOffset = 0,
+ yOffset = 0,
+ duration = 1,
+ key = "",
+}
+
+function lib.ProcGlow_Start(r, options)
+ if not r then
+ return
+ end
+ options = options or {}
+ setmetatable(options, { __index = ProcGlowDefaults })
+ local key = "_ProcGlow" .. options.key
+ local f, new
+ if r[key] then
+ f = r[key]
+ else
+ f, new = ProcGlowPool:Acquire()
+ if new then
+ InitProcGlow(f)
+ end
+ r[key] = f
+ end
+ f:SetParent(r)
+ f:SetFrameLevel(r:GetFrameLevel() + options.frameLevel)
+
+ local width, height = r:GetSize()
+ local xOffset = options.xOffset + width * 0.2
+ local yOffset = options.yOffset + height * 0.2
+ f:SetPoint("TOPLEFT", r, "TOPLEFT", -xOffset, yOffset)
+ f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", xOffset, -yOffset)
+
+ SetupProcGlow(f, options)
+ f:Show()
+end
+
+function lib.ProcGlow_Stop(r, key)
+ key = key or ""
+ local f = r["_ProcGlow" .. key]
+ if f then
+ ProcGlowPool:Release(f)
+ end
+end
+
+table.insert(lib.glowList, "Proc Glow")
+lib.startList["Proc Glow"] = lib.ProcGlow_Start
+lib.stopList["Proc Glow"] = lib.ProcGlow_Stop
+
+-- KkthnxUI
+local LCG_GlowList = {
+ [1] = "Pixel Glow",
+ [2] = "Autocast Shine",
+ [3] = "Action Button Glow",
+ [4] = "Proc Glow",
+}
+local function GetGlowType()
+ local C = KkthnxUI[2]
+ if not C then
+ return
+ end
+ return LCG_GlowList[C["General"] and C["General"].GlowMode.Value or 4]
+end
+
+lib.ShowOverlayGlow = function(button)
+ lib.startList[GetGlowType()](button)
+end
+lib.HideOverlayGlow = function(button)
+ lib.stopList[GetGlowType()](button)
+end
diff --git a/KkthnxUI/Libraries/LibDeflate/LibDeflate.lua b/KkthnxUI/Libraries/LibDeflate/LibDeflate.lua
index 8270a4b4..055114ba 100644
--- a/KkthnxUI/Libraries/LibDeflate/LibDeflate.lua
+++ b/KkthnxUI/Libraries/LibDeflate/LibDeflate.lua
@@ -5,7 +5,7 @@ DEFLATE/zlib format.
@file LibDeflate.lua
@author Haoqian He (Github: SafeteeWoW; World of Warcraft: Safetyy-Illidan(US))
-@copyright LibDeflate <2018-2021> Haoqian He
+@copyright LibDeflate <2018-2020> Haoqian He
@license zlib License
This library is implemented according to the following specifications.
@@ -24,10 +24,11 @@ the library.
Submit suggestions or report bugs to
https://github.com/safeteeWow/LibDeflate/issues
]]
+
--[[
zlib License
-(C) 2018-2021 Haoqian He
+(C) 2018-2020 Haoqian He
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -74,6 +75,7 @@ Their original licenses shall be comply when used.
Licensed under GPLv2.
For the 6bit encoding and decoding.
]]
+
--[[
Curseforge auto-packaging replacements:
@@ -81,6 +83,7 @@ Their original licenses shall be comply when used.
Project Hash: @project-hash@
Project Version: @project-version@
--]]
+
local LibDeflate
do
@@ -104,7 +107,7 @@ do
-- 3 : v1.0.2
local _MINOR = 3
- local _COPYRIGHT = "LibDeflate " .. _VERSION .. " Copyright (C) 2018-2021 Haoqian He." .. " Licensed under the zlib License"
+ local _COPYRIGHT = "LibDeflate " .. _VERSION .. " Copyright (C) 2018-2020 Haoqian He." .. " Licensed under the zlib License"
-- Register in the World of Warcraft library "LibStub" if detected.
if LibStub then
@@ -141,6 +144,10 @@ local table_concat = table.concat
local table_sort = table.sort
local tostring = tostring
local type = type
+local coroutine_create = coroutine.create
+local coroutine_status = coroutine.status
+local coroutine_resume = coroutine.resume
+local coroutine_yield = coroutine.yield
-- Converts i to 2^i, (0<=i<=32)
-- This is used to implement bit left shift and bit right shift.
@@ -322,27 +329,7 @@ local _dist_deflate_code_to_extra_bitlen = {
-- The code order of the first huffman header in the dynamic deflate block.
-- See the page 12 of RFC1951
-local _rle_codes_huffman_bitlen_order = {
- 16,
- 17,
- 18,
- 0,
- 8,
- 7,
- 9,
- 6,
- 10,
- 5,
- 11,
- 4,
- 12,
- 3,
- 13,
- 2,
- 14,
- 1,
- 15,
-}
+local _rle_codes_huffman_bitlen_order = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }
-- The following tables are used by fixed deflate block.
-- The value of these tables are assigned at the bottom of the source.
@@ -660,45 +647,45 @@ local function IsValidDictionary(dictionary)
end
--[[
- key of the configuration table is the compression level,
- and its value stores the compression setting.
- These numbers come from zlib source code.
-
- Higher compression level usually means better compression.
- (Because LibDeflate uses a simplified version of zlib algorithm,
- there is no guarantee that higher compression level does not create
- bigger file than lower level, but I can say it's 99% likely)
-
- Be careful with the high compression level. This is a pure lua
- implementation compressor/decompressor, which is significant slower than
- a C/C++ equivalant compressor/decompressor. Very high compression level
- costs significant more CPU time, and usually compression size won't be
- significant smaller when you increase compression level by 1, when the
- level is already very high. Benchmark yourself if you can afford it.
-
- See also https://github.com/madler/zlib/blob/master/doc/algorithm.txt,
- https://github.com/madler/zlib/blob/master/deflate.c for more information.
-
- The meaning of each field:
- @field 1 use_lazy_evaluation:
- true/false. Whether the program uses lazy evaluation.
- See what is "lazy evaluation" in the link above.
- lazy_evaluation improves ratio, but relatively slow.
- @field 2 good_prev_length:
- Only effective if lazy is set, Only use 1/4 of max_chain,
- if prev length of lazy match is above this.
- @field 3 max_insert_length/max_lazy_match:
- If not using lazy evaluation,
- insert new strings in the hash table only if the match length is not
- greater than this length.
- If using lazy evaluation, only continue lazy evaluation,
- if previous match length is strictly smaller than this value.
- @field 4 nice_length:
- Number. Don't continue to go down the hash chain,
- if match length is above this.
- @field 5 max_chain:
- Number. The maximum number of hash chains we look.
- --]]
+ key of the configuration table is the compression level,
+ and its value stores the compression setting.
+ These numbers come from zlib source code.
+
+ Higher compression level usually means better compression.
+ (Because LibDeflate uses a simplified version of zlib algorithm,
+ there is no guarantee that higher compression level does not create
+ bigger file than lower level, but I can say it's 99% likely)
+
+ Be careful with the high compression level. This is a pure lua
+ implementation compressor/decompressor, which is significant slower than
+ a C/C++ equivalant compressor/decompressor. Very high compression level
+ costs significant more CPU time, and usually compression size won't be
+ significant smaller when you increase compression level by 1, when the
+ level is already very high. Benchmark yourself if you can afford it.
+
+ See also https://github.com/madler/zlib/blob/master/doc/algorithm.txt,
+ https://github.com/madler/zlib/blob/master/deflate.c for more information.
+
+ The meaning of each field:
+ @field 1 use_lazy_evaluation:
+ true/false. Whether the program uses lazy evaluation.
+ See what is "lazy evaluation" in the link above.
+ lazy_evaluation improves ratio, but relatively slow.
+ @field 2 good_prev_length:
+ Only effective if lazy is set, Only use 1/4 of max_chain,
+ if prev length of lazy match is above this.
+ @field 3 max_insert_length/max_lazy_match:
+ If not using lazy evaluation,
+ insert new strings in the hash table only if the match length is not
+ greater than this length.
+ If using lazy evaluation, only continue lazy evaluation,
+ if previous match length is strictly smaller than this value.
+ @field 4 nice_length:
+ Number. Don't continue to go down the hash chain,
+ if match length is above this.
+ @field 5 max_chain:
+ Number. The maximum number of hash chains we look.
+--]]
local _compression_level_configs = {
[0] = { false, nil, 0, 0, 0 }, -- level 0, no compression
[1] = { false, nil, 4, 8, 4 }, -- level 1, similar to zlib level 1
@@ -708,7 +695,7 @@ local _compression_level_configs = {
[5] = { true, 8, 16, 32, 32 }, -- level 5, similar to zlib level 5
[6] = { true, 8, 16, 128, 128 }, -- level 6, similar to zlib level 6
[7] = { true, 8, 32, 128, 256 }, -- (SLOW) level 7, similar to zlib level 7
- [8] = { true, 32, 128, 258, 1024 }, -- (SLOW) level 8,similar to zlib level 8
+ [8] = { true, 32, 128, 258, 1024 }, --(SLOW) level 8,similar to zlib level 8
[9] = { true, 32, 258, 258, 4096 },
-- (VERY SLOW) level 9, similar to zlib level 9
}
@@ -738,7 +725,7 @@ local function IsValidArguments(str, check_dictionary, dictionary, check_configs
end
if type_configs == "table" then
for k, v in pairs(configs) do
- if k ~= "level" and k ~= "strategy" then
+ if k ~= "level" and k ~= "strategy" and k ~= "chunksMode" and k ~= "yieldOnChunkSize" and k ~= "yieldOnChunkTime" and k ~= "timeFn" then
return false, ("'configs' - unsupported table key in the configs: '%s'."):format(k)
elseif k == "level" and not _compression_level_configs[v] then
return false, ("'configs' - unsupported 'level': %s."):format(tostring(v))
@@ -753,8 +740,8 @@ local function IsValidArguments(str, check_dictionary, dictionary, check_configs
end
--[[ --------------------------------------------------------------------------
- Compress code
- --]]
+ Compress code
+--]]
--------------------------------------------------------------------------
-- partial flush to save memory
@@ -767,12 +754,12 @@ local _FLUSH_MODE_BYTE_BOUNDARY = 2
local _FLUSH_MODE_NO_FLUSH = 3
--[[
- Create an empty writer to easily write stuffs as the unit of bits.
- Return values:
- 1. WriteBits(code, bitlen):
- 2. WriteString(str):
- 3. Flush(mode):
- --]]
+ Create an empty writer to easily write stuffs as the unit of bits.
+ Return values:
+ 1. WriteBits(code, bitlen):
+ 2. WriteString(str):
+ 3. Flush(mode):
+--]]
local function CreateWriter()
local buffer_size = 0
local cache = 0
@@ -1007,11 +994,11 @@ local function GetHuffmanBitlenAndCode(symbol_counts, max_bitlen, max_symbol)
local bitlen_counts = {}
--[[
- tree[1]: weight, temporarily used as parent and bitLengths
- tree[2]: symbol
- tree[3]: left child
- tree[4]: right child
- --]]
+ tree[1]: weight, temporarily used as parent and bitLengths
+ tree[2]: symbol
+ tree[3]: left child
+ tree[4]: right child
+ --]]
local number_unique_symbols = 0
for symbol, count in pairs(symbol_counts) do
number_unique_symbols = number_unique_symbols + 1
@@ -1207,15 +1194,21 @@ end
-- @param end str[index] will be the last character to be loaded
-- @param offset str[index] will be loaded into t[index-offset]
-- @return t
-local function LoadStringToTable(str, t, start, stop, offset)
+local function LoadStringToTable(str, t, start, stop, offset, chunks)
local i = start - offset
while i <= stop - 15 - offset do
t[i], t[i + 1], t[i + 2], t[i + 3], t[i + 4], t[i + 5], t[i + 6], t[i + 7], t[i + 8], t[i + 9], t[i + 10], t[i + 11], t[i + 12], t[i + 13], t[i + 14], t[i + 15] = string_byte(str, i + offset, i + 15 + offset)
i = i + 16
+ if chunks then
+ chunks:doYield(stop - start)
+ end
end
while i <= stop - offset do
t[i] = string_byte(str, i + offset, i + offset)
i = i + 1
+ if chunks then
+ chunks:doYield(stop - start)
+ end
end
return t
end
@@ -1266,7 +1259,7 @@ local function GetBlockLZ77Result(level, string_table, hash_tables, block_start,
local config = _compression_level_configs[level]
local config_use_lazy, config_good_prev_length, config_max_lazy_match, config_nice_length, config_max_hash_chain = config[1], config[2], config[3], config[4], config[5]
- local config_max_insert_length = (not config_use_lazy) and config_max_lazy_match or 2147483646
+ local config_max_insert_length = not config_use_lazy and config_max_lazy_match or 2147483646
local config_good_hash_chain = (config_max_hash_chain - config_max_hash_chain % 4 / 4)
local hash
@@ -1475,7 +1468,7 @@ local function GetBlockLZ77Result(level, string_table, hash_tables, block_start,
end
index = index + prev_len - (config_use_lazy and 1 or 0)
match_available = false
- elseif (not config_use_lazy) or match_available then
+ elseif not config_use_lazy or match_available then
local code = string_table[config_use_lazy and (string_table_index - 1) or string_table_index]
lcode_tblsize = lcode_tblsize + 1
lcodes[lcode_tblsize] = code
@@ -1757,6 +1750,7 @@ local function Deflate(configs, WriteBits, WriteString, FlushWriter, str, dictio
local level
local strategy
+ local chunks
if configs then
if configs.level then
level = configs.level
@@ -1764,6 +1758,29 @@ local function Deflate(configs, WriteBits, WriteString, FlushWriter, str, dictio
if configs.strategy then
strategy = configs.strategy
end
+ if configs.chunksMode then
+ chunks = {
+ currentSize = 0,
+ yieldOnChunkSize = configs.yieldOnChunkSize or 32 * 1024 * 1024,
+ currentTime = nil,
+ yieldOnChunkTime = configs.yieldOnChunkTime,
+ timeFn = configs.getTimeFn,
+ }
+ function chunks:doYield(addSize)
+ if not self.currentTime and self.timeFn then
+ self.currentTime = self.timeFn()
+ end
+
+ self.currentSize = self.currentSize + addSize
+ if self.currentSize > self.yieldOnChunkSize or (self.currentTime and self.timeFn() - self.currentTime > self.yieldOnChunkTime) then
+ self.currentSize = 0
+ if self.timeFn then
+ self.currentTime = self.timeFn()
+ end
+ coroutine_yield()
+ end
+ end
+ end
end
if not level then
@@ -1804,7 +1821,7 @@ local function Deflate(configs, WriteBits, WriteString, FlushWriter, str, dictio
if level ~= 0 then
-- GetBlockLZ77 needs block_start to block_end+3 to be loaded.
- LoadStringToTable(str, string_table, block_start, block_end + 3, offset)
+ LoadStringToTable(str, string_table, block_start, block_end + 3, offset, chunks)
if block_start == 1 and dictionary then
local dict_string_table = dictionary.string_table
local dict_strlen = dictionary.strlen
@@ -1815,7 +1832,7 @@ local function Deflate(configs, WriteBits, WriteString, FlushWriter, str, dictio
if strategy == "huffman_only" then
lcodes = {}
- LoadStringToTable(str, lcodes, block_start, block_end, block_start - 1)
+ LoadStringToTable(str, lcodes, block_start, block_end, block_start - 1, nil, chunks)
lextra_bits = {}
lcodes_counts = {}
lcodes[block_end - block_start + 2] = 256 -- end of block
@@ -1830,10 +1847,7 @@ local function Deflate(configs, WriteBits, WriteString, FlushWriter, str, dictio
lcodes, lextra_bits, lcodes_counts, dcodes, dextra_bits, dcodes_counts = GetBlockLZ77Result(level, string_table, hash_tables, block_start, block_end, offset, dictionary)
end
- -- LuaFormatter off
- HLIT, HDIST, HCLEN, rle_codes_huffman_bitlens, rle_codes_huffman_codes, rle_deflate_codes, rle_extra_bits, lcodes_huffman_bitlens, lcodes_huffman_codes, dcodes_huffman_bitlens, dcodes_huffman_codes =
- -- LuaFormatter on
- GetBlockDynamicHuffmanHeader(lcodes_counts, dcodes_counts)
+ HLIT, HDIST, HCLEN, rle_codes_huffman_bitlens, rle_codes_huffman_codes, rle_deflate_codes, rle_extra_bits, lcodes_huffman_bitlens, lcodes_huffman_codes, dcodes_huffman_bitlens, dcodes_huffman_codes = GetBlockDynamicHuffmanHeader(lcodes_counts, dcodes_counts)
dynamic_block_bitlen = GetDynamicHuffmanBlockSize(lcodes, dcodes, HCLEN, rle_codes_huffman_bitlens, rle_deflate_codes, lcodes_huffman_bitlens, dcodes_huffman_bitlens)
fixed_block_bitlen = GetFixedHuffmanBlockSize(lcodes, dcodes)
end
@@ -1916,15 +1930,43 @@ end
-- @field strategy The compression strategy. "fixed" to only use fixed deflate
-- compression block. "dynamic" to only use dynamic block. "huffman_only" to
-- do no LZ77 compression. Only do huffman compression.
+-- @field chunksMode If true, function will return a coroutine handler
+-- to resume the coroutine. See the readme for an example.
+-- @field yieldOnChunkSize If chunksMode is true, how large should the buffer
+-- be before yielding the coroutine. Defaults to 32 * 1024 * 1024.
+-- @field yieldOnChunkTime If chunksMode is true, maximum duration between
+-- yields. Requires timeFn.
+-- @field timeFn If chunksMode is true, include a function to use to calculate
+-- the current time for your environment.
-- @see LibDeflate:CompressDeflate(str, configs)
-- @see LibDeflate:CompressDeflateWithDict(str, dictionary, configs)
local function CompressDeflateInternal(str, dictionary, configs)
local WriteBits, WriteString, FlushWriter = CreateWriter()
- Deflate(configs, WriteBits, WriteString, FlushWriter, str, dictionary)
- local total_bitlen, result = FlushWriter(_FLUSH_MODE_OUTPUT)
- local padding_bitlen = (8 - total_bitlen % 8) % 8
- return result, padding_bitlen
+
+ if configs and configs.chunksMode then
+ local thread = coroutine_create(Deflate)
+ -- return coroutine handler
+ return function()
+ local co_success = coroutine_resume(thread, configs, WriteBits, WriteString, FlushWriter, str, dictionary)
+ if not co_success then
+ return false
+ elseif coroutine_status(thread) ~= "dead" then
+ return true
+ else
+ local total_bitlen, result = FlushWriter(_FLUSH_MODE_OUTPUT)
+ local padding_bitlen = (8 - total_bitlen % 8) % 8
+ return false, result, padding_bitlen
+ end
+ end
+ else
+ -- if synchronous mode
+ Deflate(configs, WriteBits, WriteString, FlushWriter, str, dictionary)
+
+ local total_bitlen, result = FlushWriter(_FLUSH_MODE_OUTPUT)
+ local padding_bitlen = (8 - total_bitlen % 8) % 8
+ return result, padding_bitlen
+ end
end
-- @see LibDeflate:CompressZlib
@@ -1933,7 +1975,7 @@ local function CompressZlibInternal(str, dictionary, configs)
local WriteBits, WriteString, FlushWriter = CreateWriter()
local CM = 8 -- Compression method
- local CINFO = 7 -- Window Size = 32K
+ local CINFO = 7 --Window Size = 32K
local CMF = CINFO * 16 + CM
WriteBits(CMF, 8)
@@ -1962,27 +2004,63 @@ local function CompressZlibInternal(str, dictionary, configs)
WriteBits(byte0, 8)
end
- Deflate(configs, WriteBits, WriteString, FlushWriter, str, dictionary)
- FlushWriter(_FLUSH_MODE_BYTE_BOUNDARY)
+ if configs and configs.chunksMode then
+ local thread = coroutine_create(Deflate)
- local adler32 = LibDeflate:Adler32(str)
+ -- return coroutine handler
+ return function()
+ local co_success, result, status = coroutine_resume(thread, configs, WriteBits, WriteString, FlushWriter, str, dictionary)
+ if not co_success then
+ return false
+ elseif coroutine_status(thread) ~= "dead" then
+ return true
+ else
+ FlushWriter(_FLUSH_MODE_BYTE_BOUNDARY)
+
+ local adler32 = LibDeflate:Adler32(str)
+
+ -- Most significant byte first
+ local byte3 = adler32 % 256
+ adler32 = (adler32 - byte3) / 256
+ local byte2 = adler32 % 256
+ adler32 = (adler32 - byte2) / 256
+ local byte1 = adler32 % 256
+ adler32 = (adler32 - byte1) / 256
+ local byte0 = adler32 % 256
+
+ WriteBits(byte0, 8)
+ WriteBits(byte1, 8)
+ WriteBits(byte2, 8)
+ WriteBits(byte3, 8)
+ local total_bitlen, result = FlushWriter(_FLUSH_MODE_OUTPUT)
+ local padding_bitlen = (8 - total_bitlen % 8) % 8
+ return false, result, padding_bitlen
+ end
+ end
+ else
+ Deflate(configs, WriteBits, WriteString, FlushWriter, str, dictionary)
- -- Most significant byte first
- local byte3 = adler32 % 256
- adler32 = (adler32 - byte3) / 256
- local byte2 = adler32 % 256
- adler32 = (adler32 - byte2) / 256
- local byte1 = adler32 % 256
- adler32 = (adler32 - byte1) / 256
- local byte0 = adler32 % 256
+ FlushWriter(_FLUSH_MODE_BYTE_BOUNDARY)
- WriteBits(byte0, 8)
- WriteBits(byte1, 8)
- WriteBits(byte2, 8)
- WriteBits(byte3, 8)
- local total_bitlen, result = FlushWriter(_FLUSH_MODE_OUTPUT)
- local padding_bitlen = (8 - total_bitlen % 8) % 8
- return result, padding_bitlen
+ local adler32 = LibDeflate:Adler32(str)
+
+ -- Most significant byte first
+ local byte3 = adler32 % 256
+ adler32 = (adler32 - byte3) / 256
+ local byte2 = adler32 % 256
+ adler32 = (adler32 - byte2) / 256
+ local byte1 = adler32 % 256
+ adler32 = (adler32 - byte1) / 256
+ local byte0 = adler32 % 256
+
+ WriteBits(byte0, 8)
+ WriteBits(byte1, 8)
+ WriteBits(byte2, 8)
+ WriteBits(byte3, 8)
+ local total_bitlen, result = FlushWriter(_FLUSH_MODE_OUTPUT)
+ local padding_bitlen = (8 - total_bitlen % 8) % 8
+ return result, padding_bitlen
+ end
end
--- Compress using the raw deflate format.
@@ -2070,19 +2148,19 @@ function LibDeflate:CompressZlibWithDict(str, dictionary, configs)
end
--[[ --------------------------------------------------------------------------
- Decompress code
- --]]
+ Decompress code
+--]]
--------------------------------------------------------------------------
--[[
- Create a reader to easily reader stuffs as the unit of bits.
- Return values:
- 1. ReadBits(bitlen)
- 2. ReadBytes(bytelen, buffer, buffer_size)
- 3. Decode(huffman_bitlen_count, huffman_symbol, min_bitlen)
- 4. ReaderBitlenLeft()
- 5. SkipToByteBoundary()
- --]]
+ Create a reader to easily reader stuffs as the unit of bits.
+ Return values:
+ 1. ReadBits(bitlen)
+ 2. ReadBytes(bytelen, buffer, buffer_size)
+ 3. Decode(huffman_bitlen_count, huffman_symbol, min_bitlen)
+ 4. ReaderBitlenLeft()
+ 5. SkipToByteBoundary()
+--]]
local function CreateReader(input_string)
local input = input_string
local input_strlen = #input_string
@@ -2326,6 +2404,11 @@ local function DecodeUntilEndOfBlock(state, lcodes_huffman_bitlens, lcodes_huffm
repeat
local symbol = Decode(lcodes_huffman_bitlens, lcodes_huffman_symbols, lcodes_huffman_min_bitlen)
+
+ if state.chunksMode then
+ state.chunksMode:doYield(symbol)
+ end
+
if symbol < 0 or symbol > 285 then
-- invalid literal/length or distance code in fixed or dynamic block
return -10
@@ -2521,7 +2604,7 @@ local function DecompressDynamicBlock(state)
end
local lcodes_err, lcodes_huffman_bitlen_counts, lcodes_huffman_symbols, lcodes_huffman_min_bitlen = GetHuffmanForDecode(lcodes_huffman_bitlens, nlen - 1, 15)
- -- dynamic block code description: invalid literal/length code lengths,
+ --dynamic block code description: invalid literal/length code lengths,
-- Incomplete code ok only for single length 1 code
if lcodes_err ~= 0 and (lcodes_err < 0 or nlen ~= (lcodes_huffman_bitlen_counts[0] or 0) + (lcodes_huffman_bitlen_counts[1] or 0)) then
return -7
@@ -2568,23 +2651,78 @@ local function Inflate(state)
return result
end
--- @see LibDeflate:DecompressDeflate(str)
--- @see LibDeflate:DecompressDeflateWithDict(str, dictionary)
-local function DecompressDeflateInternal(str, dictionary)
+--- The description to decompression configuration table.
+-- Any field can be nil to use its default.
+-- Table with keys other than those below is an invalid table.
+-- @class table
+-- @name decompression_configs
+-- @field chunksMode If true, function will return a coroutine handler
+-- to resume the coroutine. See the readme for an example.
+-- @field yieldOnChunkSize If chunksMode is true, how large should the buffer
+-- be before yielding the coroutine. Defaults to 32 * 1024 * 1024.
+-- @field yieldOnChunkTime If chunksMode is true, maximum duration between
+-- yields. Requires timeFn.
+-- @field timeFn If chunksMode is true, include a function to use to calculate
+-- the current time for your environment.
+
+-- @see LibDeflate:DecompressDeflate(str, configs)
+-- @see LibDeflate:DecompressDeflateWithDict(str, dictionary, configs)
+local function DecompressDeflateInternal(str, dictionary, configs)
local state = CreateDecompressState(str, dictionary)
- local result, status = Inflate(state)
- if not result then
- return nil, status
- end
+ if configs and configs.chunksMode then
+ local thread = coroutine_create(Inflate)
+ state.chunksMode = {
+ currentSize = 0,
+ yieldOnChunkSize = configs.yieldOnChunkSize or 32 * 1024 * 1024,
+ currentTime = nil,
+ yieldOnChunkTime = configs.yieldOnChunkTime,
+ timeFn = configs.getTimeFn,
+ }
+ function state.chunksMode:doYield(addSize)
+ if not self.currentTime and self.timeFn then
+ self.currentTime = self.timeFn()
+ end
- local bitlen_left = state.ReaderBitlenLeft()
- local bytelen_left = (bitlen_left - bitlen_left % 8) / 8
- return result, bytelen_left
+ self.currentSize = self.currentSize + addSize
+ if self.currentSize > self.yieldOnChunkSize or (self.currentTime and self.timeFn() - self.currentTime > self.yieldOnChunkTime) then
+ self.currentSize = 0
+ if self.timeFn then
+ self.currentTime = self.timeFn()
+ end
+ coroutine_yield()
+ end
+ end
+ local result, status
+ -- return coroutine handler
+ return function()
+ local co_success, result, status = coroutine_resume(thread, state)
+ if not co_success then
+ return false
+ elseif coroutine_status(thread) ~= "dead" then
+ return true
+ elseif not result then
+ return false, nil, status
+ else
+ local bitlen_left = state.ReaderBitlenLeft()
+ local bytelen_left = (bitlen_left - bitlen_left % 8) / 8
+ return false, result, bytelen_left
+ end
+ end
+ else
+ local result, status = Inflate(state, configs)
+ if not result then
+ return nil, status
+ end
+
+ local bitlen_left = state.ReaderBitlenLeft()
+ local bytelen_left = (bitlen_left - bitlen_left % 8) / 8
+ return result, bytelen_left
+ end
end
--- @see LibDeflate:DecompressZlib(str)
--- @see LibDeflate:DecompressZlibWithDict(str)
-local function DecompressZlibInternal(str, dictionary)
+-- @see LibDeflate:DecompressZlib(str, configs)
+-- @see LibDeflate:DecompressZlibWithDict(str, dictionary, configs)
+local function DecompressZlibInternal(str, dictionary, configs)
local state = CreateDecompressState(str, dictionary)
local ReadBits = state.ReadBits
@@ -2628,29 +2766,65 @@ local function DecompressZlibInternal(str, dictionary)
return nil, -17 -- dictionary adler32 does not match
end
end
- local result, status = Inflate(state)
- if not result then
- return nil, status
- end
- state.SkipToByteBoundary()
- local adler_byte0 = ReadBits(8)
- local adler_byte1 = ReadBits(8)
- local adler_byte2 = ReadBits(8)
- local adler_byte3 = ReadBits(8)
- if state.ReaderBitlenLeft() < 0 then
- return nil, 2 -- available inflate data did not terminate
- end
+ if configs and configs.chunksMode then
+ local thread = coroutine_create(Inflate)
+ -- return coroutine handler
+ return function()
+ local co_success, result, status = coroutine_resume(thread, state, configs)
+ if not co_success then
+ return false
+ elseif coroutine_status(thread) ~= "dead" then
+ return true
+ elseif not result then
+ return false, nil, status
+ else
+ state.SkipToByteBoundary()
+
+ local adler_byte0 = ReadBits(8)
+ local adler_byte1 = ReadBits(8)
+ local adler_byte2 = ReadBits(8)
+ local adler_byte3 = ReadBits(8)
+ if state.ReaderBitlenLeft() < 0 then
+ return nil, 2 -- available inflate data did not terminate
+ end
- local adler32_expected = adler_byte0 * 16777216 + adler_byte1 * 65536 + adler_byte2 * 256 + adler_byte3
- local adler32_actual = LibDeflate:Adler32(result)
- if not IsEqualAdler32(adler32_expected, adler32_actual) then
- return nil, -15 -- Adler32 checksum does not match
- end
+ local adler32_expected = adler_byte0 * 16777216 + adler_byte1 * 65536 + adler_byte2 * 256 + adler_byte3
+ local adler32_actual = LibDeflate:Adler32(result)
+ if not IsEqualAdler32(adler32_expected, adler32_actual) then
+ return nil, -15 -- Adler32 checksum does not match
+ end
+
+ local bitlen_left = state.ReaderBitlenLeft()
+ local bytelen_left = (bitlen_left - bitlen_left % 8) / 8
+ return false, result, bytelen_left
+ end
+ end
+ else
+ local result, status = Inflate(state, configs)
+ if not result then
+ return nil, status
+ end
+ state.SkipToByteBoundary()
+
+ local adler_byte0 = ReadBits(8)
+ local adler_byte1 = ReadBits(8)
+ local adler_byte2 = ReadBits(8)
+ local adler_byte3 = ReadBits(8)
+ if state.ReaderBitlenLeft() < 0 then
+ return nil, 2 -- available inflate data did not terminate
+ end
+
+ local adler32_expected = adler_byte0 * 16777216 + adler_byte1 * 65536 + adler_byte2 * 256 + adler_byte3
+ local adler32_actual = LibDeflate:Adler32(result)
+ if not IsEqualAdler32(adler32_expected, adler32_actual) then
+ return nil, -15 -- Adler32 checksum does not match
+ end
- local bitlen_left = state.ReaderBitlenLeft()
- local bytelen_left = (bitlen_left - bitlen_left % 8) / 8
- return result, bytelen_left
+ local bitlen_left = state.ReaderBitlenLeft()
+ local bytelen_left = (bitlen_left - bitlen_left % 8) / 8
+ return result, bytelen_left
+ end
end
--- Decompress a raw deflate compressed data.
@@ -2666,12 +2840,15 @@ end
-- If the decompression fails (The first return value of this function is nil),
-- this return value is undefined.
-- @see LibDeflate:CompressDeflate
-function LibDeflate:DecompressDeflate(str)
+function LibDeflate:DecompressDeflate(str, configs)
+ if not configs then
+ configs = {}
+ end
local arg_valid, arg_err = IsValidArguments(str)
if not arg_valid then
- error(("Usage: LibDeflate:DecompressDeflate(str): " .. arg_err), 2)
+ error(("Usage: LibDeflate:DecompressDeflate(str, configs): " .. arg_err), 2)
end
- return DecompressDeflateInternal(str)
+ return DecompressDeflateInternal(str, nil, configs)
end
--- Decompress a raw deflate compressed data with a preset dictionary.
@@ -2692,12 +2869,15 @@ end
-- If the decompression fails (The first return value of this function is nil),
-- this return value is undefined.
-- @see LibDeflate:CompressDeflateWithDict
-function LibDeflate:DecompressDeflateWithDict(str, dictionary)
+function LibDeflate:DecompressDeflateWithDict(str, dictionary, configs)
+ if not configs then
+ configs = {}
+ end
local arg_valid, arg_err = IsValidArguments(str, true, dictionary)
if not arg_valid then
error(("Usage: LibDeflate:DecompressDeflateWithDict(str, dictionary): " .. arg_err), 2)
end
- return DecompressDeflateInternal(str, dictionary)
+ return DecompressDeflateInternal(str, dictionary, configs)
end
--- Decompress a zlib compressed data.
@@ -2713,12 +2893,15 @@ end
-- If the decompression fails (The first return value of this function is nil),
-- this return value is undefined.
-- @see LibDeflate:CompressZlib
-function LibDeflate:DecompressZlib(str)
+function LibDeflate:DecompressZlib(str, configs)
+ if not configs then
+ configs = {}
+ end
local arg_valid, arg_err = IsValidArguments(str)
if not arg_valid then
error(("Usage: LibDeflate:DecompressZlib(str): " .. arg_err), 2)
end
- return DecompressZlibInternal(str)
+ return DecompressZlibInternal(str, nil, configs)
end
--- Decompress a zlib compressed data with a preset dictionary.
@@ -2739,12 +2922,15 @@ end
-- If the decompression fails (The first return value of this function is nil),
-- this return value is undefined.
-- @see LibDeflate:CompressZlibWithDict
-function LibDeflate:DecompressZlibWithDict(str, dictionary)
+function LibDeflate:DecompressZlibWithDict(str, dictionary, configs)
+ if not configs then
+ configs = {}
+ end
local arg_valid, arg_err = IsValidArguments(str, true, dictionary)
if not arg_valid then
error(("Usage: LibDeflate:DecompressZlibWithDict(str, dictionary): " .. arg_err), 2)
end
- return DecompressZlibInternal(str, dictionary)
+ return DecompressZlibInternal(str, dictionary, configs)
end
-- Calculate the huffman code of fixed block
@@ -3351,20 +3537,20 @@ LibDeflate.internals = {
}
--[[-- Commandline options
- @class table
- @name CommandlineOptions
- @usage lua LibDeflate.lua [OPTION] [INPUT] [OUTPUT]
- \-0 store only. no compression.
- \-1 fastest compression.
- \-9 slowest and best compression.
- \-d do decompression instead of compression.
- \--dict specify the file that contains
- the entire preset dictionary.
- \-h give this help.
- \--strategy specify a special compression strategy.
- \-v print the version and copyright info.
- \--zlib use zlib format instead of raw deflate.
- ]]
+@class table
+@name CommandlineOptions
+@usage lua LibDeflate.lua [OPTION] [INPUT] [OUTPUT]
+\-0 store only. no compression.
+\-1 fastest compression.
+\-9 slowest and best compression.
+\-d do decompression instead of compression.
+\--dict specify the file that contains
+the entire preset dictionary.
+\-h give this help.
+\--strategy specify a special compression strategy.
+\-v print the version and copyright info.
+\--zlib use zlib format instead of raw deflate.
+]]
-- currently no plan to support stdin and stdout.
-- Because Lua in Windows does not set stdout with binary mode.
@@ -3372,7 +3558,7 @@ if io and os and debug and _G.arg then
local io = io
local os = os
local debug = debug
- local arg = _G.arg
+ local arg = arg
local debug_info = debug.getinfo(1)
if debug_info.source == arg[0] or debug_info.short_src == arg[0] then
-- We are indeed runnning THIS file from the commandline.
@@ -3450,7 +3636,10 @@ if io and os and debug and _G.arg then
end
local input_data = input:read("*all")
- local configs = { level = level, strategy = strategy }
+ local configs = {
+ level = level,
+ strategy = strategy,
+ }
local output_data
if not is_decompress then
if not is_zlib then
diff --git a/KkthnxUI/Libraries/LibRangeCheck-3.0/LibRangeCheck-3.0.lua b/KkthnxUI/Libraries/LibRangeCheck-3.0/LibRangeCheck-3.0.lua
index 735ecbbb..d2829d9d 100644
--- a/KkthnxUI/Libraries/LibRangeCheck-3.0/LibRangeCheck-3.0.lua
+++ b/KkthnxUI/Libraries/LibRangeCheck-3.0/LibRangeCheck-3.0.lua
@@ -39,8 +39,8 @@ License: MIT
--
-- @class file
-- @name LibRangeCheck-3.0
-local MAJOR_VERSION = "LibRangeCheck-3.0"
-local MINOR_VERSION = 16 -- real minor version: 13
+local MAJOR_VERSION = "LibRangeCheck-3.0-KkthnxUI"
+local MINOR_VERSION = 18 -- real minor version: 19
-- GLOBALS: LibStub, CreateFrame
@@ -63,17 +63,11 @@ local strsplit = strsplit
local tostring = tostring
local setmetatable = setmetatable
+local IsSpellKnownOrOverridesKnown = IsSpellKnownOrOverridesKnown
local CheckInteractDistance = CheckInteractDistance
local GetInventoryItemLink = GetInventoryItemLink
-local GetItemInfo = GetItemInfo
-local GetNumSpellTabs = GetNumSpellTabs
-local GetSpellBookItemName = GetSpellBookItemName
-local GetSpellInfo = GetSpellInfo
-local GetSpellTabInfo = GetSpellTabInfo
local GetTime = GetTime
local InCombatLockdown = InCombatLockdown
-local IsItemInRange = IsItemInRange
-local IsSpellInRange = IsSpellInRange
local UnitCanAssist = UnitCanAssist
local UnitCanAttack = UnitCanAttack
local UnitClass = UnitClass
@@ -84,27 +78,73 @@ local UnitIsUnit = UnitIsUnit
local UnitIsVisible = UnitIsVisible
local UnitRace = UnitRace
+local GetItemInfo = C_Item.GetItemInfo
+local IsItemInRange = C_Item.IsItemInRange
+
+local BOOKTYPE_SPELL = (Enum.SpellBookSpellBank and Enum.SpellBookSpellBank.Player) or BOOKTYPE_SPELL or "spell"
+local C_SpellBook_GetSpellBookItemInfo = C_SpellBook.GetSpellBookItemInfo
+local GetSpellBookItemName = _G.GetSpellBookItemName or function(index, bookType)
+ local result = C_SpellBook_GetSpellBookItemInfo(index, bookType)
+ return result.name, result.subName, result.spellID
+end
+
+local C_Spell_IsSpellInRange = C_Spell.IsSpellInRange
+local IsSpellInRange = _G.IsSpellInRange or function(id, unit)
+ local result = C_Spell_IsSpellInRange(id, unit)
+ if result == true then
+ return 1
+ elseif result == false then
+ return 0
+ end
+ return nil
+end
+
+local C_SpellBook_IsSpellBookItemInRange = C_SpellBook.IsSpellBookItemInRange
+local IsSpellBookItemInRange = _G.IsSpellInRange or function(index, spellBank, unit)
+ local result = C_SpellBook_IsSpellBookItemInRange(index, spellBank, unit)
+ if result == true then
+ return 1
+ elseif result == false then
+ return 0
+ end
+ return nil
+end
+
local C_Timer = C_Timer
local Item = Item
-local BOOKTYPE_SPELL = BOOKTYPE_SPELL
local HandSlotId = GetInventorySlotInfo("HANDSSLOT")
local isRetail = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
local isWrath = WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC
local isEra = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
+local isCata = WOW_PROJECT_ID == WOW_PROJECT_CATACLYSM_CLASSIC
local IsEngravingEnabled = C_Engraving and C_Engraving.IsEngravingEnabled
local isEraSOD = IsEngravingEnabled and IsEngravingEnabled()
-local InCombatLockdownRestriction
-if isRetail or isEra then
- InCombatLockdownRestriction = function(unit)
- return InCombatLockdown() and not UnitCanAttack("player", unit)
+local InCombatLockdownRestriction = function(unit)
+ return InCombatLockdown() and not UnitCanAttack("player", unit)
+end
+
+local C_Spell_GetSpellInfo = C_Spell.GetSpellInfo
+local GetSpellInfo = _G.GetSpellInfo or function(spellID)
+ if not spellID then
+ return nil
end
-else
- InCombatLockdownRestriction = function()
- return false
+
+ local spellInfo = C_Spell_GetSpellInfo(spellID)
+ if spellInfo then
+ return spellInfo.name, nil, spellInfo.iconID, spellInfo.castTime, spellInfo.minRange, spellInfo.maxRange, spellInfo.spellID, spellInfo.originalIconID
+ end
+end
+
+local C_SpellBook_GetSpellBookSkillLineInfo = C_SpellBook.GetSpellBookSkillLineInfo
+local GetNumSpellTabs = C_SpellBook.GetNumSpellBookSkillLines or GetNumSpellTabs
+local GetSpellTabInfo = _G.GetSpellTabInfo or function(index)
+ local skillLineInfo = C_SpellBook_GetSpellBookSkillLineInfo(index)
+ if skillLineInfo then
+ return skillLineInfo.name, skillLineInfo.iconID, skillLineInfo.itemIndexOffset, skillLineInfo.numSpellBookItems, skillLineInfo.isGuild, skillLineInfo.offSpecID, skillLineInfo.shouldHide, skillLineInfo.specID
end
end
@@ -140,21 +180,7 @@ local MeleeRange = 2
local MatchSpellByID = {} -- specific matching to avoid incorrect index
local FriendSpells, HarmSpells, ResSpells, PetSpells = {}, {}, {}, {}
-for _, n in ipairs({
- "EVOKER",
- "DEATHKNIGHT",
- "DEMONHUNTER",
- "DRUID",
- "HUNTER",
- "SHAMAN",
- "MAGE",
- "PALADIN",
- "PRIEST",
- "WARLOCK",
- "WARRIOR",
- "MONK",
- "ROGUE",
-}) do
+for _, n in ipairs({ "EVOKER", "DEATHKNIGHT", "DEMONHUNTER", "DRUID", "HUNTER", "SHAMAN", "MAGE", "PALADIN", "PRIEST", "WARLOCK", "WARRIOR", "MONK", "ROGUE" }) do
FriendSpells[n], HarmSpells[n], ResSpells[n], PetSpells[n] = {}, {}, {}, {}
end
@@ -162,6 +188,7 @@ end
tinsert(HarmSpells.EVOKER, 369819) -- Disintegrate (25 yards)
tinsert(FriendSpells.EVOKER, 361469) -- Living Flame (25 yards)
+tinsert(FriendSpells.EVOKER, 431443) -- Chrono Flames (25 yards) (Hero Talent, overrides Living Flame)
tinsert(FriendSpells.EVOKER, 360823) -- Naturalize (Preservation) (30 yards)
tinsert(ResSpells.EVOKER, 361227) -- Return (40 yards)
@@ -229,7 +256,11 @@ tinsert(HarmSpells.MAGE, 133) -- Fireball (40 yards)
tinsert(HarmSpells.MAGE, 44425) -- Arcane Barrage (40 yards)
-- Monks
-tinsert(FriendSpells.MONK, 115450) -- Detox (40 yards)
+MatchSpellByID[218164] = true -- Detox
+MatchSpellByID[115450] = true -- Detox
+
+tinsert(FriendSpells.MONK, 218164) -- Detox (40 yards): Brewmaster, Windwalker
+tinsert(FriendSpells.MONK, 115450) -- Detox (40 yards): Mistweaver
tinsert(FriendSpells.MONK, 115546) -- Provoke (30 yards)
tinsert(FriendSpells.MONK, 116670) -- Vivify (40 yards)
@@ -572,7 +603,7 @@ local lastUpdate = 0
local checkers_Spell = setmetatable({}, {
__index = function(t, spellIdx)
local func = function(unit)
- if IsSpellInRange(spellIdx, BOOKTYPE_SPELL, unit) == 1 then
+ if IsSpellBookItemInRange(spellIdx, BOOKTYPE_SPELL, unit) == 1 then
return true
end
end
@@ -681,7 +712,7 @@ local function findSpellIdx(spellName, sid)
for i = 1, getNumSpells() do
local name, _, id = GetSpellBookItemName(i, BOOKTYPE_SPELL)
- if sid == id or (spellName == name and not MatchSpellByID[id]) then
+ if (sid == id and IsSpellKnownOrOverridesKnown(id)) or (spellName == name and not MatchSpellByID[id]) then
return i
end
end
@@ -1389,11 +1420,11 @@ function lib:activate()
frame:RegisterEvent("CHARACTER_POINTS_CHANGED")
frame:RegisterEvent("SPELLS_CHANGED")
- if isEra or isWrath then
+ if isEra or isCata then
frame:RegisterEvent("CVAR_UPDATE")
end
- if isRetail or isWrath then
+ if isRetail or isCata then
frame:RegisterEvent("PLAYER_TALENT_UPDATE")
end
diff --git a/KkthnxUI/Libraries/Unfit-1.0/Unfit-1.0.lua b/KkthnxUI/Libraries/Unfit-1.0/Unfit-1.0.lua
index da453bb6..5c29fe64 100644
--- a/KkthnxUI/Libraries/Unfit-1.0/Unfit-1.0.lua
+++ b/KkthnxUI/Libraries/Unfit-1.0/Unfit-1.0.lua
@@ -1,15 +1,17 @@
--[[
-Copyright 2011-2022 João Cardoso
+Copyright 2011-2024 João Cardoso
Unfit is distributed under the terms of the GNU General Public License (Version 3).
As a special exception, the copyright holders of this library give you permission to embed it
with independent modules to produce an addon, regardless of the license terms of these
independent modules, and to copy and distribute the resulting software under terms of your
choice, provided that you also meet, for each embedded independent module, the terms and
conditions of the license of that module. Permission is not granted to modify this library.
+
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
+
This file is part of Unfit.
--]]
@@ -27,68 +29,208 @@ do
if Class == "DEATHKNIGHT" then
Unusable = { -- weapon, armor, dual-wield
- { Enum.ItemWeaponSubclass.Bows, Enum.ItemWeaponSubclass.Guns, Enum.ItemWeaponSubclass.Warglaive, Enum.ItemWeaponSubclass.Staff, Enum.ItemWeaponSubclass.Unarmed, Enum.ItemWeaponSubclass.Dagger, Enum.ItemWeaponSubclass.Thrown, Enum.ItemWeaponSubclass.Crossbow, Enum.ItemWeaponSubclass.Wand },
+ {
+ Enum.ItemWeaponSubclass.Bows,
+ Enum.ItemWeaponSubclass.Guns,
+ Enum.ItemWeaponSubclass.Warglaive,
+ Enum.ItemWeaponSubclass.Staff,
+ Enum.ItemWeaponSubclass.Unarmed,
+ Enum.ItemWeaponSubclass.Dagger,
+ Enum.ItemWeaponSubclass.Thrown,
+ Enum.ItemWeaponSubclass.Crossbow,
+ Enum.ItemWeaponSubclass.Wand,
+ },
{ Enum.ItemArmorSubclass.Shield },
}
elseif Class == "DEMONHUNTER" then
Unusable = {
- { Enum.ItemWeaponSubclass.Axe2H, Enum.ItemWeaponSubclass.Bows, Enum.ItemWeaponSubclass.Guns, Enum.ItemWeaponSubclass.Mace1H, Enum.ItemWeaponSubclass.Mace2H, Enum.ItemWeaponSubclass.Polearm, Enum.ItemWeaponSubclass.Sword2H, Enum.ItemWeaponSubclass.Staff, Enum.ItemWeaponSubclass.Thrown, Enum.ItemWeaponSubclass.Crossbow, Enum.ItemWeaponSubclass.Wand },
+ {
+ Enum.ItemWeaponSubclass.Axe2H,
+ Enum.ItemWeaponSubclass.Bows,
+ Enum.ItemWeaponSubclass.Guns,
+ Enum.ItemWeaponSubclass.Mace1H,
+ Enum.ItemWeaponSubclass.Mace2H,
+ Enum.ItemWeaponSubclass.Polearm,
+ Enum.ItemWeaponSubclass.Sword2H,
+ Enum.ItemWeaponSubclass.Staff,
+ Enum.ItemWeaponSubclass.Thrown,
+ Enum.ItemWeaponSubclass.Crossbow,
+ Enum.ItemWeaponSubclass.Wand,
+ },
{ Enum.ItemArmorSubclass.Mail, Enum.ItemArmorSubclass.Plate, Enum.ItemArmorSubclass.Shield },
}
elseif Class == "DRUID" then
Unusable = {
- { Enum.ItemWeaponSubclass.Axe1H, Enum.ItemWeaponSubclass.Axe2H, Enum.ItemWeaponSubclass.Bows, Enum.ItemWeaponSubclass.Guns, Enum.ItemWeaponSubclass.Sword1H, Enum.ItemWeaponSubclass.Sword2H, Enum.ItemWeaponSubclass.Warglaive, Enum.ItemWeaponSubclass.Thrown, Enum.ItemWeaponSubclass.Crossbow, Enum.ItemWeaponSubclass.Wand },
+ {
+ Enum.ItemWeaponSubclass.Axe1H,
+ Enum.ItemWeaponSubclass.Axe2H,
+ Enum.ItemWeaponSubclass.Bows,
+ Enum.ItemWeaponSubclass.Guns,
+ Enum.ItemWeaponSubclass.Sword1H,
+ Enum.ItemWeaponSubclass.Sword2H,
+ Enum.ItemWeaponSubclass.Warglaive,
+ Enum.ItemWeaponSubclass.Thrown,
+ Enum.ItemWeaponSubclass.Crossbow,
+ Enum.ItemWeaponSubclass.Wand,
+ },
{ Enum.ItemArmorSubclass.Mail, Enum.ItemArmorSubclass.Plate, Enum.ItemArmorSubclass.Shield },
true,
}
elseif Class == "EVOKER" then
Unusable = {
- { Enum.ItemWeaponSubclass.Bows, Enum.ItemWeaponSubclass.Guns, Enum.ItemWeaponSubclass.Polearm, Enum.ItemWeaponSubclass.Warglaive, Enum.ItemWeaponSubclass.Thrown, Enum.ItemWeaponSubclass.Crossbow, Enum.ItemWeaponSubclass.Wand },
+ {
+ Enum.ItemWeaponSubclass.Bows,
+ Enum.ItemWeaponSubclass.Guns,
+ Enum.ItemWeaponSubclass.Polearm,
+ Enum.ItemWeaponSubclass.Warglaive,
+ Enum.ItemWeaponSubclass.Thrown,
+ Enum.ItemWeaponSubclass.Crossbow,
+ Enum.ItemWeaponSubclass.Wand,
+ },
{ Enum.ItemArmorSubclass.Plate, Enum.ItemArmorSubclass.Shield },
true,
}
elseif Class == "HUNTER" then
Unusable = {
- { Enum.ItemWeaponSubclass.Mace1H, Enum.ItemWeaponSubclass.Mace2H, Enum.ItemWeaponSubclass.Warglaive, Enum.ItemWeaponSubclass.Thrown, Enum.ItemWeaponSubclass.Wand },
+ {
+ Enum.ItemWeaponSubclass.Mace1H,
+ Enum.ItemWeaponSubclass.Mace2H,
+ Enum.ItemWeaponSubclass.Warglaive,
+ Enum.ItemWeaponSubclass.Thrown,
+ Enum.ItemWeaponSubclass.Wand,
+ },
{ Enum.ItemArmorSubclass.Plate, Enum.ItemArmorSubclass.Shield },
}
elseif Class == "MAGE" then
Unusable = {
- { Enum.ItemWeaponSubclass.Axe1H, Enum.ItemWeaponSubclass.Axe2H, Enum.ItemWeaponSubclass.Bows, Enum.ItemWeaponSubclass.Guns, Enum.ItemWeaponSubclass.Mace1H, Enum.ItemWeaponSubclass.Mace2H, Enum.ItemWeaponSubclass.Polearm, Enum.ItemWeaponSubclass.Sword2H, Enum.ItemWeaponSubclass.Warglaive, Enum.ItemWeaponSubclass.Unarmed, Enum.ItemWeaponSubclass.Thrown, Enum.ItemWeaponSubclass.Crossbow },
- { Enum.ItemArmorSubclass.Leather, Enum.ItemArmorSubclass.Mail, Enum.ItemArmorSubclass.Plate, Enum.ItemArmorSubclass.Shield },
+ {
+ Enum.ItemWeaponSubclass.Axe1H,
+ Enum.ItemWeaponSubclass.Axe2H,
+ Enum.ItemWeaponSubclass.Bows,
+ Enum.ItemWeaponSubclass.Guns,
+ Enum.ItemWeaponSubclass.Mace1H,
+ Enum.ItemWeaponSubclass.Mace2H,
+ Enum.ItemWeaponSubclass.Polearm,
+ Enum.ItemWeaponSubclass.Sword2H,
+ Enum.ItemWeaponSubclass.Warglaive,
+ Enum.ItemWeaponSubclass.Unarmed,
+ Enum.ItemWeaponSubclass.Thrown,
+ Enum.ItemWeaponSubclass.Crossbow,
+ },
+ {
+ Enum.ItemArmorSubclass.Leather,
+ Enum.ItemArmorSubclass.Mail,
+ Enum.ItemArmorSubclass.Plate,
+ Enum.ItemArmorSubclass.Shield,
+ },
true,
}
elseif Class == "MONK" then
Unusable = {
- { Enum.ItemWeaponSubclass.Axe2H, Enum.ItemWeaponSubclass.Bows, Enum.ItemWeaponSubclass.Guns, Enum.ItemWeaponSubclass.Mace2H, Enum.ItemWeaponSubclass.Sword2H, Enum.ItemWeaponSubclass.Warglaive, Enum.ItemWeaponSubclass.Dagger, Enum.ItemWeaponSubclass.Thrown, Enum.ItemWeaponSubclass.Crossbow, Enum.ItemWeaponSubclass.Wand },
+ {
+ Enum.ItemWeaponSubclass.Axe2H,
+ Enum.ItemWeaponSubclass.Bows,
+ Enum.ItemWeaponSubclass.Guns,
+ Enum.ItemWeaponSubclass.Mace2H,
+ Enum.ItemWeaponSubclass.Sword2H,
+ Enum.ItemWeaponSubclass.Warglaive,
+ Enum.ItemWeaponSubclass.Dagger,
+ Enum.ItemWeaponSubclass.Thrown,
+ Enum.ItemWeaponSubclass.Crossbow,
+ Enum.ItemWeaponSubclass.Wand,
+ },
{ Enum.ItemArmorSubclass.Mail, Enum.ItemArmorSubclass.Plate, Enum.ItemArmorSubclass.Shield },
}
elseif Class == "PALADIN" then
Unusable = {
- { Enum.ItemWeaponSubclass.Bows, Enum.ItemWeaponSubclass.Guns, Enum.ItemWeaponSubclass.Warglaive, Enum.ItemWeaponSubclass.Staff, Enum.ItemWeaponSubclass.Unarmed, Enum.ItemWeaponSubclass.Dagger, Enum.ItemWeaponSubclass.Thrown, Enum.ItemWeaponSubclass.Crossbow, Enum.ItemWeaponSubclass.Wand },
+ {
+ Enum.ItemWeaponSubclass.Bows,
+ Enum.ItemWeaponSubclass.Guns,
+ Enum.ItemWeaponSubclass.Warglaive,
+ Enum.ItemWeaponSubclass.Staff,
+ Enum.ItemWeaponSubclass.Unarmed,
+ Enum.ItemWeaponSubclass.Dagger,
+ Enum.ItemWeaponSubclass.Thrown,
+ Enum.ItemWeaponSubclass.Crossbow,
+ Enum.ItemWeaponSubclass.Wand,
+ },
{},
true,
}
elseif Class == "PRIEST" then
Unusable = {
- { Enum.ItemWeaponSubclass.Axe1H, Enum.ItemWeaponSubclass.Axe2H, Enum.ItemWeaponSubclass.Bows, Enum.ItemWeaponSubclass.Guns, Enum.ItemWeaponSubclass.Mace2H, Enum.ItemWeaponSubclass.Polearm, Enum.ItemWeaponSubclass.Sword1H, Enum.ItemWeaponSubclass.Sword2H, Enum.ItemWeaponSubclass.Warglaive, Enum.ItemWeaponSubclass.Unarmed, Enum.ItemWeaponSubclass.Thrown, Enum.ItemWeaponSubclass.Crossbow },
- { Enum.ItemArmorSubclass.Leather, Enum.ItemArmorSubclass.Mail, Enum.ItemArmorSubclass.Plate, Enum.ItemArmorSubclass.Shield },
+ {
+ Enum.ItemWeaponSubclass.Axe1H,
+ Enum.ItemWeaponSubclass.Axe2H,
+ Enum.ItemWeaponSubclass.Bows,
+ Enum.ItemWeaponSubclass.Guns,
+ Enum.ItemWeaponSubclass.Mace2H,
+ Enum.ItemWeaponSubclass.Polearm,
+ Enum.ItemWeaponSubclass.Sword1H,
+ Enum.ItemWeaponSubclass.Sword2H,
+ Enum.ItemWeaponSubclass.Warglaive,
+ Enum.ItemWeaponSubclass.Unarmed,
+ Enum.ItemWeaponSubclass.Thrown,
+ Enum.ItemWeaponSubclass.Crossbow,
+ },
+ {
+ Enum.ItemArmorSubclass.Leather,
+ Enum.ItemArmorSubclass.Mail,
+ Enum.ItemArmorSubclass.Plate,
+ Enum.ItemArmorSubclass.Shield,
+ },
true,
}
elseif Class == "ROGUE" then
Unusable = {
- { Enum.ItemWeaponSubclass.Axe2H, Enum.ItemWeaponSubclass.Mace2H, Enum.ItemWeaponSubclass.Polearm, Enum.ItemWeaponSubclass.Sword2H, Enum.ItemWeaponSubclass.Warglaive, Enum.ItemWeaponSubclass.Staff, Enum.ItemWeaponSubclass.Wand },
+ {
+ Enum.ItemWeaponSubclass.Axe2H,
+ Enum.ItemWeaponSubclass.Mace2H,
+ Enum.ItemWeaponSubclass.Polearm,
+ Enum.ItemWeaponSubclass.Sword2H,
+ Enum.ItemWeaponSubclass.Warglaive,
+ Enum.ItemWeaponSubclass.Staff,
+ Enum.ItemWeaponSubclass.Wand,
+ },
{ Enum.ItemArmorSubclass.Mail, Enum.ItemArmorSubclass.Plate, Enum.ItemArmorSubclass.Shield },
}
elseif Class == "SHAMAN" then
Unusable = {
- { Enum.ItemWeaponSubclass.Bows, Enum.ItemWeaponSubclass.Guns, Enum.ItemWeaponSubclass.Polearm, Enum.ItemWeaponSubclass.Sword1H, Enum.ItemWeaponSubclass.Sword2H, Enum.ItemWeaponSubclass.Warglaive, Enum.ItemWeaponSubclass.Thrown, Enum.ItemWeaponSubclass.Crossbow, Enum.ItemWeaponSubclass.Wand },
+ {
+ Enum.ItemWeaponSubclass.Bows,
+ Enum.ItemWeaponSubclass.Guns,
+ Enum.ItemWeaponSubclass.Polearm,
+ Enum.ItemWeaponSubclass.Sword1H,
+ Enum.ItemWeaponSubclass.Sword2H,
+ Enum.ItemWeaponSubclass.Warglaive,
+ Enum.ItemWeaponSubclass.Thrown,
+ Enum.ItemWeaponSubclass.Crossbow,
+ Enum.ItemWeaponSubclass.Wand,
+ },
{ Enum.ItemArmorSubclass.Plate },
}
elseif Class == "WARLOCK" then
Unusable = {
- { Enum.ItemWeaponSubclass.Axe1H, Enum.ItemWeaponSubclass.Axe2H, Enum.ItemWeaponSubclass.Bows, Enum.ItemWeaponSubclass.Guns, Enum.ItemWeaponSubclass.Mace1H, Enum.ItemWeaponSubclass.Mace2H, Enum.ItemWeaponSubclass.Polearm, Enum.ItemWeaponSubclass.Sword2H, Enum.ItemWeaponSubclass.Warglaive, Enum.ItemWeaponSubclass.Unarmed, Enum.ItemWeaponSubclass.Thrown, Enum.ItemWeaponSubclass.Crossbow },
- { Enum.ItemArmorSubclass.Leather, Enum.ItemArmorSubclass.Mail, Enum.ItemArmorSubclass.Plate, Enum.ItemArmorSubclass.Shield },
+ {
+ Enum.ItemWeaponSubclass.Axe1H,
+ Enum.ItemWeaponSubclass.Axe2H,
+ Enum.ItemWeaponSubclass.Bows,
+ Enum.ItemWeaponSubclass.Guns,
+ Enum.ItemWeaponSubclass.Mace1H,
+ Enum.ItemWeaponSubclass.Mace2H,
+ Enum.ItemWeaponSubclass.Polearm,
+ Enum.ItemWeaponSubclass.Sword2H,
+ Enum.ItemWeaponSubclass.Warglaive,
+ Enum.ItemWeaponSubclass.Unarmed,
+ Enum.ItemWeaponSubclass.Thrown,
+ Enum.ItemWeaponSubclass.Crossbow,
+ },
+ {
+ Enum.ItemArmorSubclass.Leather,
+ Enum.ItemArmorSubclass.Mail,
+ Enum.ItemArmorSubclass.Plate,
+ Enum.ItemArmorSubclass.Shield,
+ },
true,
}
elseif Class == "WARRIOR" then
diff --git a/KkthnxUI/Libraries/cargBags/base/implementation.lua b/KkthnxUI/Libraries/cargBags/base/implementation.lua
index 40e8877c..ec414cdb 100644
--- a/KkthnxUI/Libraries/cargBags/base/implementation.lua
+++ b/KkthnxUI/Libraries/cargBags/base/implementation.lua
@@ -322,7 +322,7 @@ local defaultItem = cargBags:NewItemTable()
@param i [optional]
@return i
]]
-function Implementation:GetItemInfo(bagID, slotID, i)
+function Implementation:GetCustomItemInfo(bagID, slotID, i)
i = i or defaultItem
for k in pairs(i) do
i[k] = nil
@@ -342,7 +342,8 @@ function Implementation:GetItemInfo(bagID, slotID, i)
local questInfo = C_Container.GetContainerItemQuestInfo(bagID, slotID)
i.isQuestItem, i.questID, i.questActive = questInfo.isQuestItem, questInfo.questID, questInfo.isActive
- i.name, _, _, _, i.minlevel, i.type, i.subType, _, i.equipLoc, _, _, i.classID, i.subClassID, i.bindType = C_Item.GetItemInfo(i.link)
+ i.spellID = GetItemSpell(i.link)
+ i.name, _, _, _, i.minlevel, i.type, i.subType, _, i.equipLoc, _, _, i.classID, i.subClassID, i.bindType = GetItemInfo(i.link)
i.equipLoc = _G[i.equipLoc] -- INVTYPE to localized string
if i.id == PET_CAGE then
@@ -367,7 +368,7 @@ end
@param slotID
]]
function Implementation:UpdateSlot(bagID, slotID)
- local item = self:GetItemInfo(bagID, slotID)
+ local item = self:GetCustomItemInfo(bagID, slotID)
local button = self:GetButton(bagID, slotID)
local container = self:GetContainerForItem(item, button)
@@ -460,14 +461,14 @@ function Implementation:BAG_UPDATE_COOLDOWN(_, bagID)
for slotID = 1, GetContainerNumSlots(bagID) do
local button = self:GetButton(bagID, slotID)
if button then
- local item = self:GetItemInfo(bagID, slotID)
+ local item = self:GetCustomItemInfo(bagID, slotID)
button:ButtonUpdateCooldown(item)
end
end
else
for _, container in pairs(self.contByID) do
for _, button in pairs(container.buttons) do
- local item = self:GetItemInfo(button.bagId, button.slotId)
+ local item = self:GetCustomItemInfo(button.bagId, button.slotId)
button:ButtonUpdateCooldown(item)
end
end
@@ -489,7 +490,7 @@ function Implementation:ITEM_LOCK_CHANGED(_, bagID, slotID)
local button = self:GetButton(bagID, slotID)
if button then
- local item = self:GetItemInfo(bagID, slotID)
+ local item = self:GetCustomItemInfo(bagID, slotID)
button:ButtonUpdateLock(item)
end
end
@@ -527,7 +528,7 @@ end
function Implementation:UNIT_QUEST_LOG_CHANGED()
for _, container in pairs(self.contByID) do
for _, button in pairs(container.buttons) do
- local item = self:GetItemInfo(button.bagId, button.slotId)
+ local item = self:GetCustomItemInfo(button.bagId, button.slotId)
button:ButtonUpdateQuest(item)
end
end
diff --git a/KkthnxUI/Libraries/cargBags/base/itembutton.lua b/KkthnxUI/Libraries/cargBags/base/itembutton.lua
index 8c144ff8..34ef7bea 100644
--- a/KkthnxUI/Libraries/cargBags/base/itembutton.lua
+++ b/KkthnxUI/Libraries/cargBags/base/itembutton.lua
@@ -39,7 +39,14 @@ local ItemButton = cargBags:NewClass("ItemButton", nil, "ItemButton")
]]
function ItemButton:GetTemplate(bagID)
bagID = bagID or self.bagId
- return (bagID == REAGENTBANK_CONTAINER and "ReagentBankItemButtonGenericTemplate") or (bagID == BANK_CONTAINER and "BankItemButtonGenericTemplate") or (bagID and "ContainerFrameItemButtonTemplate") or "", (bagID == REAGENTBANK_CONTAINER and ReagentBankFrame) or (bagID == BANK_CONTAINER and BankFrame) or (bagID and _G["ContainerFrame" .. (bagID + 1)]) or ""
+ return (bagID == REAGENTBANK_CONTAINER and "ReagentBankItemButtonGenericTemplate")
+ or (bagID == BANK_CONTAINER and "BankItemButtonGenericTemplate")
+ or (bagID and "ContainerFrameItemButtonTemplate")
+ or "",
+ (bagID == REAGENTBANK_CONTAINER and ReagentBankFrame)
+ or (bagID == BANK_CONTAINER and BankFrame)
+ or (bagID and _G["ContainerFrame" .. (bagID + 1)])
+ or ""
end
local mt_gen_key = {
@@ -147,5 +154,5 @@ end
@return item
]]
function ItemButton:GetInfo(item)
- return self.implementation:GetItemInfo(self.bagId, self.slotId, item)
+ return self.implementation:GetCustomItemInfo(self.bagId, self.slotId, item)
end
diff --git a/KkthnxUI/Libraries/oUF/elements/castbar.lua b/KkthnxUI/Libraries/oUF/elements/castbar.lua
index c29c13dd..7ea25bb0 100644
--- a/KkthnxUI/Libraries/oUF/elements/castbar.lua
+++ b/KkthnxUI/Libraries/oUF/elements/castbar.lua
@@ -162,7 +162,9 @@ local function UpdatePips(element, numStages)
pip:Show()
if(isHoriz) then
- pip:RotateTextures(0)
+ if(pip.RotateTextures) then
+ pip:RotateTextures(0)
+ end
if(element:GetReverseFill()) then
pip:SetPoint('TOP', element, 'TOPRIGHT', -offset, 0)
@@ -172,7 +174,9 @@ local function UpdatePips(element, numStages)
pip:SetPoint('BOTTOM', element, 'BOTTOMLEFT', offset, 0)
end
else
- pip:RotateTextures(1.5708)
+ if(pip.RotateTextures) then
+ pip:RotateTextures(1.5708)
+ end
if(element:GetReverseFill()) then
pip:SetPoint('LEFT', element, 'TOPLEFT', 0, -offset)
@@ -196,10 +200,22 @@ local function UpdatePips(element, numStages)
end
end
-local function CastStart(self, event, unit)
- if(self.unit ~= unit) then return end
+--[[ Override: Castbar:ShouldShow(unit)
+Handles check for which unit the castbar should show for.
+Defaults to the object unit.
+* self - the Castbar widget
+* unit - the unit for which the update has been triggered (string)
+--]]
+local function ShouldShow(element, unit)
+ return element.__owner.unit == unit
+end
+
+local function CastStart(self, event, unit)
local element = self.Castbar
+ if(not (element.ShouldShow or ShouldShow) (element, unit)) then
+ return
+ end
local numStages, _
local name, text, texture, startTime, endTime, isTradeSkill, castID, notInterruptible, spellID = UnitCastingInfo(unit)
@@ -296,9 +312,11 @@ local function CastStart(self, event, unit)
end
local function CastUpdate(self, event, unit, castID, spellID)
- if(self.unit ~= unit) then return end
-
local element = self.Castbar
+ if(not (element.ShouldShow or ShouldShow) (element, unit)) then
+ return
+ end
+
if(not element:IsShown() or element.castID ~= castID or element.spellID ~= spellID) then
return
end
@@ -353,9 +371,11 @@ local function CastUpdate(self, event, unit, castID, spellID)
end
local function CastStop(self, event, unit, castID, spellID)
- if(self.unit ~= unit) then return end
-
local element = self.Castbar
+ if(not (element.ShouldShow or ShouldShow) (element, unit)) then
+ return
+ end
+
if(not element:IsShown() or element.castID ~= castID or element.spellID ~= spellID) then
return
end
@@ -375,9 +395,11 @@ local function CastStop(self, event, unit, castID, spellID)
end
local function CastFail(self, event, unit, castID, spellID)
- if(self.unit ~= unit) then return end
-
local element = self.Castbar
+ if(not (element.ShouldShow or ShouldShow) (element, unit)) then
+ return
+ end
+
if(not element:IsShown() or element.castID ~= castID or element.spellID ~= spellID) then
return
end
@@ -406,9 +428,11 @@ local function CastFail(self, event, unit, castID, spellID)
end
local function CastInterruptible(self, event, unit)
- if(self.unit ~= unit) then return end
-
local element = self.Castbar
+ if(not (element.ShouldShow or ShouldShow) (element, unit)) then
+ return
+ end
+
if(not element:IsShown()) then return end
element.notInterruptible = event == 'UNIT_SPELLCAST_NOT_INTERRUPTIBLE'
diff --git a/KkthnxUI/Libraries/oUF/elements/grouproleindicator.lua b/KkthnxUI/Libraries/oUF/elements/grouproleindicator.lua
index 50039cc4..bb6745a2 100644
--- a/KkthnxUI/Libraries/oUF/elements/grouproleindicator.lua
+++ b/KkthnxUI/Libraries/oUF/elements/grouproleindicator.lua
@@ -24,6 +24,7 @@ A default texture will be applied if the widget is a Texture and doesn't have a
local _, ns = ...
local oUF = ns.oUF
+local GetTexCoordsForRoleSmallCircle = GetTexCoordsForRoleSmallCircle or (function() return 1, 1, 1, 1 end)
local function Update(self, event)
local element = self.GroupRoleIndicator
diff --git a/KkthnxUI/Libraries/oUF/elements/tags.lua b/KkthnxUI/Libraries/oUF/elements/tags.lua
index a00e6e6a..e5bfda6e 100644
--- a/KkthnxUI/Libraries/oUF/elements/tags.lua
+++ b/KkthnxUI/Libraries/oUF/elements/tags.lua
@@ -468,7 +468,7 @@ local tagStrings = {
end]],
['threatcolor'] = [[function(u)
- return Hex(GetThreatStatusColor(UnitThreatSituation(u)))
+ return Hex(GetThreatStatusColor(UnitThreatSituation(u) or 0))
end]],
}
diff --git a/KkthnxUI/Libraries/oUF/units.lua b/KkthnxUI/Libraries/oUF/units.lua
index 8bfb5d4c..285f10b6 100644
--- a/KkthnxUI/Libraries/oUF/units.lua
+++ b/KkthnxUI/Libraries/oUF/units.lua
@@ -204,7 +204,7 @@ local function createOnUpdate(timer)
self.elapsed = (self.elapsed or 0) + elapsed
if(self.elapsed > timer) then
for _, object in next, objects do
- if(object.unit and unitExists(object.unit)) then
+ if(object:IsVisible() and object.unit and unitExists(object.unit)) then
object:UpdateAllElements('OnUpdate')
end
end
diff --git a/KkthnxUI/Locales/enUS.lua b/KkthnxUI/Locales/enUS.lua
index 3b6aad8c..47a5702d 100644
--- a/KkthnxUI/Locales/enUS.lua
+++ b/KkthnxUI/Locales/enUS.lua
@@ -3,13 +3,11 @@ if not L then
return
end
--- Module Locales
L["%s players"] = "%s players"
-L["Account Keystones"] = "Account Keystone"
+L["Account Keystone"] = "Account Keystone"
L["AddToIgnoreList"] = "%s SpellID %s has been added to the Ignored AuraWatch list. You can hold CTRL+ALT and click on the unit's aura icon to remove it from the list."
L["All Buffs Ready"] = "[KkthnxUI] All Buffs Are Ready!"
-L["Alt Key"] = "Alt Key"
-L["AttackSpeed"] = "AS"
+L["Attack Speed"] = "AS"
L["AuraWatch List"] = "Custom List"
L["AuraWatch Switcher"] = "Block preset auras"
L["AuraWatchGUI Tips"] = "|nGet more tips by mousing over each option header.|n|nYou need to reload the UI after changing settings.|n|nYou can hold CTRL+ALT and click on the AuraWatch icon to add a spell to the ignore list, or click on the UnitAura icon to remove a spell from the ignore list."
@@ -20,19 +18,20 @@ L["Auto Quest Enabled Desc"] = "Disable to not use auto questing. |n|nHolding SH
L["Auto Quest Enabled"] = "Status: |CFF008000Enabled|r"
L["Auto Quest"] = "Auto Quest"
L["AutoDepositTip"] = "Left click to deposit reagents, right click to switch auto deposit.|nIf the button border shown, the reagents from your bags would auto deposit once you open your BankFrame."
-L["BFA Invasion"] = "Faction Assault"
+L["Faction Assault"] = "Faction Assault"
L["BN"] = "BN"
L["Bars"] = "Bars"
L["BoE"] = "BoE"
L["BoP"] = "BoP"
-L["BrokenSpell"] = "%s Broke %s"
+L["BoU"] = "BoU"
+L["Broken Spell"] = "%s Broke %s"
L["CD"] = "CD"
L["CPU Usage"] = "CPU Usage"
L["Caster Intro"] = "|nFilter the spell caster.|n|nplayer: caster is player.|n|ntarget: caster is target.|n|npet: caster is pet.|n|nAll auras would be watched if blank."
L["Caster"] = "Caster"
-L["Changelog"] = "Changelog"
+-- L["Changelog"] = "Changelog"
L["Changes Reload"] = "One or more of the changes you have made require a UI Reload."
-L["Check Flask Food"] = "Check Flask & Food"
+-- L["Check Flask Food"] = "Check Flask & Food"
L["CheckQuestComplete"] = " has been completed!"
L["CheckQuestInfo"] = "\nEnter questID found in Wowhead URL\nhttp://wowhead.com/quest=ID\nExample: /checkquest 12045\n"
L["CheckQuestNotComplete"] = " has not been completed!"
@@ -47,6 +46,7 @@ L["Copy Name"] = "Copy Name"
L["Crit"] = "Crit"
L["Ctrl Key"] = "(Ctrl) "
L["Current Invasion"] = "Current: "
+-- Stopped Checking Locales Here!
L["Custom Filter Mode Enabled"] = "|nYou can now custom filter items.|n|nIf 'Filter Items Into Categories' is enabled, the item you set for a custom filter will be added to the 'Custom filter #' filter slots.|n|nThis is not available to |cff9d9d9dTrash|r"
L["Custom Filter Mode"] = "Custom Filter Mode"
L["Deficit"] = "Deficit"
@@ -63,7 +63,7 @@ L["Earned"] = "Earned"
L["Empty Slot"] = "Empty Slot"
L["Enable to show hidden areas."] = "Enable to show hidden areas|nyou have not yet discovered."
L["Enchant Aura"] = "Enchant"
-L["Equipement Set"] = "Equipement Sets"
+L["Equipment Set"] = "Equipment Sets"
L["ExRT Potion Check"] = "ExRT Potion Check"
L["Exalted"] = "Exalted"
L["Existing ID"] = "The SpellID is existed."
@@ -89,7 +89,7 @@ L["Home Protocol"] = "Home Protocol"
L["Honor Remaining"] = "Honor Remaining:"
L["Honor XP"] = "Honor XP:"
L["ID Intro"] = "|nSpell ID, must be a number.|n|nYou can get ID on spell's GameTooltip.|n|nSpellname is not supported."
-L["Incomplete Input"] = "You need to complete all * optinos."
+L["Incomplete Input"] = "You need to complete all * options."
L["Incorrect SpellID"] = "Incorrect SpellID."
L["Install"] = "Install"
L["IntID Intro"] = "|nThe spellID that triggers the timer, must be a number.|n|nYou can get ID on spell's GameTooltip.|n|nSpellname is not supported."
@@ -102,7 +102,6 @@ L["Item Delete Mode"] = "Item Delete Mode"
L["ItemID Intro"] = "|nThe item name of the timer that triggered.|n|nThe spellName would take place if blank."
L["ItemID"] = "Name"
L["Join or Invite"] = "Join or Invite"
-L["KKUI_ActionBarX"] = "CustomBar"
L["Key Binding"] = "Key"
L["Key Bound To"] = "bound to"
L["Key Index"] = "Index"
@@ -156,6 +155,10 @@ L["Reset KkthnxUI"] = "Are you sure you want to reset all the settings on this p
L["Reset your AuraWatch List?"] = "Are you sure to wipe all your groups of custom list?"
L["Restart Graphics"] = "One or more of the changes you have made require a restart of the graphics engine."
L["Rested"] = "Rested:"
+L["Reveal Disabled Desc"] = "Enable to use map reveal."
+L["Reveal Disabled"] = "Status: |CFFFF0000Disabled|r"
+L["Reveal Enabled Desc"] = "Disable to not use map reveal."
+L["Reveal Enabled"] = "Status: |CFF008000Enabled|r"
L["Reveal Hidden Areas"] = "Reveal Hidden Areas"
L["Reveal"] = "Reveal"
L["Right Click"] = "Right Click"
@@ -229,10 +232,10 @@ L["World Protocol"] = "World Protocol"
L["XP"] = "XP:"
-- GUI Group Title Locales
-L["ActionBar"] = "ActionBar"
+L["ActionBar"] = "Action Bars"
L["Announcements"] = "Announcements"
L["Arena"] = "Arena"
-L["AuraWatch"] = "AuraWatch"
+L["AuraWatch"] = "Aura Watch"
L["Auras"] = "Auras"
L["Automation"] = "Automation"
L["Boss"] = "Bosses"
@@ -259,7 +262,7 @@ L["Layouts"] = "Layouts"
L["Scaling"] = "Scaling"
L["Sizes"] = "Sizes"
L["Toggles"] = "Toggles"
-L["Rare Alert"] = "Rare Alert"
+L["Rare Alert"] = "Rare Alerts"
-- GUI Group Options Description Locals
L["Choose Your Layout"] = "Select Your Layout"
@@ -269,7 +272,7 @@ L["Enable CustomBar"] = "Enable Custom Bar"
L["Enable Hotkey"] = "Display Hotkey"
L["Enable Macro"] = "Enable Macro Support"
L["Enable MicroBar"] = "Enable Micro Bar"
-L["Enable OverrideWA"] = "Hide Cooldown on WeakAuras"
+L["Enable OverrideWA"] = "Hide Cooldowns on WeakAuras"
L["MMSSThreshold"] = "MMSs Threshold"
L["Mouseover BottomBar 3"] = "Mouseover Bottom Bar 3"
L["Mouseover CustomBar"] = "Mouseover Custom Bar"
@@ -688,14 +691,14 @@ L["Show Smaller Worldmap"] = "Show Smaller Worldmap"
L["DurabilityHelpTip"] = "You have low durability slots! Repair soon!"
-- GUI Config Tooltip Locales
-L["AutoScaleTip"] = "Auto Scale the UI to pixel perfect based on your resolution.|n|nIf you wanna manaually scale the UI. You need to turn off 'Auto Scale' then apply the scale by using the slider"
-L["CustomUnitTip"] = "Enter unit name or npc ID.You can see unit npc ID in GameTooltip by holding KEY SHIFT."
-L["EasyVolumeTip"] = "You can change game sound volume by holding key CTRL and mousewheel on minimap.|nHold key CTRL+ALT, the volume will switch from 0 to 100 directly."
-L["ExecuteRatioTip"] = "If unit health percentage is lower than the execute cap value you set, its name turns red.|n|nThe execute indicator will be disabled on 0."
-L["MMSSThresholdTip"] = "If cooldown less than current threhold, show cooldown in format MM:SS.|nEg. 2 mins and half presents as 2:30."
-L["MapRevealTip"] = "If enabled, once you enable map reveal, the unexplore areas will stay under a light shadow. You can pick whatever color you want the shadow."
+L["AutoScaleTip"] = "Auto Scale the UI to pixel perfect based on your resolution.|n|nIf you want to manually scale the UI, you need to turn off 'Auto Scale' then apply the scale using the slider."
+L["CustomUnitTip"] = "Enter unit name or NPC ID. You can see unit NPC ID in GameTooltip by holding SHIFT key."
+L["EasyVolumeTip"] = "You can change the game sound volume by holding the CTRL key and using the mouse wheel on the minimap.|nHold CTRL+ALT, the volume will switch from 0 to 100 directly."
+L["ExecuteRatioTip"] = "If unit health percentage is lower than the execute cap value you set, its name turns red.|n|nThe execute indicator will be disabled at 0."
+L["MMSSThresholdTip"] = "If the cooldown is less than the current threshold, show the cooldown in MM:SS format.|nE.g., 2 minutes and 30 seconds will be displayed as 2:30."
+L["MapRevealTip"] = "If enabled, once you reveal the map, the unexplored areas will be covered by a light shadow. You can choose the color of the shadow."
L["ParagonReputationTip"] = "Adds paragon info on the reputation frame bars."
-L["QuickJoinTip"] = "Quick apply by double click, hide group join notice, styled group roles, auto invite applicants, show leader overall score, abbr keystone name for Tazavesh."
-L["SpellItemAlertTip"] = "Notify mailbox, feast or bloodlust casting info in your group."
-L["TenthThresholdTip"] = "If cooldown less than current threhold, show cooldown in format decimal.|nEg. 3 secs will show as 3.0."
-L["UIScaleTip"] = "Scale the UI based on your own peference.|n|nIf you wanna manaually scale the UI. You need to turn off 'Auto Scale' then apply the scale by using the slider"
+L["QuickJoinTip"] = "Quick apply by double-clicking, hide group join notices, style group roles, auto-invite applicants, show leader overall score, and abbreviate keystone names for Tazavesh."
+L["SpellItemAlertTip"] = "Notify mailbox, feast, or bloodlust casting info in your group."
+L["TenthThresholdTip"] = "If the cooldown is less than the current threshold, show the cooldown in decimal format.|nE.g., 3 seconds will be displayed as 3.0."
+L["UIScaleTip"] = "Scale the UI based on your preference.|n|nIf you want to manually scale the UI, you need to turn off 'Auto Scale' then apply the scale using the slider."
diff --git a/KkthnxUI/Locales/frFR.lua b/KkthnxUI/Locales/frFR.lua
index 8585852e..9d1f70e4 100644
--- a/KkthnxUI/Locales/frFR.lua
+++ b/KkthnxUI/Locales/frFR.lua
@@ -1,708 +1,7 @@
local K, L = KkthnxUI[1], KkthnxUI[3]
-if not L then
- return
-end
local GetLocale = GetLocale
if GetLocale() ~= "frFR" then
return
end
-
--- Module Locales
-L["%s players"] = "%s joueurs"
-L["Account Keystones"] = "Account Keystone"
-L["AddToIgnoreList"] = "%s SpellID %s a été ajouté a la liste des ignorés de AuraWatch. Vous pouvez maintenir CTRL+ALT enfoncées et cliquer sur l'icône de UnitAura pour le supprimer des ignorés."
-L["All Buffs Ready"] = "[KkthnxUI] Tous les buffs sont prêts!"
-L["Alt Key"] = "Alt Key"
-L["AttackSpeed"] = "VA"
-L["AuraWatch List"] = "Liste personnalisée"
-L["AuraWatch Switcher"] = "Bloquer les auras prédéfinies"
-L["AuraWatchGUI Tips"] = "|nObtenez plus d'infos en passant la souris sur chaque en-tête d'option.|n|nVous devez recharger l'IU après avoir modifié les paramètres.|n|nVous pouvez maintenir CTRL+ALT enfoncées, et cliquez sur l'icône AuraWatch pour ajouter le sort dans la liste des ignorés, ou cliquez sur l'icône UnitAura pour supprimer le sort des ignorés."
-L["AuraWatchGUI Title"] = "KkthnxUI AuraWatch GUI"
-L["Auto Quest Disabled Desc"] = "Activer l'acceptation/rendu auto des quêtes. |n|nMaintenez SHIFT désactivera temporairement l'acceptation/rendu automatique"
-L["Auto Quest Disabled"] = "Status: |CFFFF0000Disabled|r"
-L["Auto Quest Enabled Desc"] = "Désactiver l'acceptation/rendu auto des quêtes. |n|nMaintenez SHIFT désactivera temporairement l'acceptation/rendu automatique"
-L["Auto Quest Enabled"] = "Status: |CFF008000Enabled|r"
-L["Auto Quest"] = "Quête auto"
-L["AutoDepositTip"] = "Cliquez sur le bouton gauche pour déposer vos composants, cliquez sur le bouton droit pour faire un dépôt automatique. Si la bordure du bouton s'affiche, les composants de vos sacs seront déposés automatiquement dès que vous ouvrirez votre Banque."
-L["BFA Invasion"] = "Assauts des factions"
-L["BN"] = "BN"
-L["Bars"] = "Barres"
-L["BoE"] = "LqE"
-L["BoP"] = "LqR"
-L["BrokenSpell"] = "%s Broke %s's %s!"
-L["CD"] = "CD"
-L["CPU Usage"] = "Utilisation CPU"
-L["Caster Intro"] = "|nFiltrez le caster.|n|njoueur: caster est le joueur.|n|ncible: caster est la cible.|n|nfamilier: caster est le familier.|n|nToutes les auras sont surveillées si vides"
-L["Caster"] = "Caster"
-L["Changelog"] = "Changelog"
-L["Changes Reload"] = "Un ou plusieurs des changements que vous avez effectués nécessitent un rechargement de l'interface."
-L["Check Flask Food"] = "Vérifiez vos flacons et votre nourriture"
-L["CheckQuestComplete"] = " a été achevée!"
-L["CheckQuestInfo"] = "\nEntrer l'ID de quête de Wowhead\nhttp://wowhead.com/quest=ID\nExemple: /checkquest 12045\n"
-L["CheckQuestNotComplete"] = " n'a pas été achevée!"
-L["Choose a Type"] = "Vous devez sélectionner un type."
-L["Clear Binds"] = "|CFFFFCC66All raccourci effacé pour|r %s"
-L["Collect Memory"] = "Récolter la mémoire"
-L["Combat Intro"] = "|nSi coché, le sort ne s'affiche qu'en combat."
-L["Combat"] = "Combat"
-L["CombatLog"] = "Log"
-L["Combo"] = "Com"
-L["Copy Name"] = "Copier le nom"
-L["Crit"] = "Crit"
-L["Ctrl Key"] = "(Ctrl) "
-L["Current Invasion"] = "En cours: "
-L["Custom Filter Mode Enabled"] = "|nYou can now custom filter items.|n|nIf 'Bags ItemFilter' is enabled, the item you set for a custom filter will be added to the 'Custom filter #' filter slots.|n|nThis is not available to |cff9d9d9dTrash|r"
-L["Custom Filter Mode"] = "Custom Filter Mode"
-L["Deficit"] = "Déficit"
-L["Delete Mode Enabled"] = "|nVous pouvez détruire l'objet du sac en appuyant sur CTRL+ALT. |n|nLa qualité de l'objet doit être inférieure à |cff0070ddRare|r"
-L["Disable to hide areas."] = "Désactiver pour cacher les zones|nque vous n'avez pas encore découvertes."
-L["Discard KeyBinds"] = "Raccourcis effacés."
-L["Discord URL"] = "https://discord.gg/Rc9wcK9cAB"
-L["Discord"] = "|cff7289daDiscord|r"
-L["Dispel"] = "Dispeled %s's %s!"
-L["Download"] = "Télécharger"
-L["Duration Intro"] = "|nLe chronomètre est déclenché."
-L["Duration*"] = "Durée*"
-L["Earned"] = "Gagnés"
-L["Empty Slot"] = "Emplacement vide"
-L["Enable to show hidden areas."] = "Permettre de montrer les zones cachées|nque vous n'avez pas encore découvertes."
-L["Enchant Aura"] = "Enchantement"
-L["Equipement Set"] = "Sets d'armure"
-L["ExRT Potion Check"] = "ExRT Vérification des potions"
-L["Exalted"] = "Exalté"
-L["Existing ID"] = "Le SpellID existe."
-L["Experience"] = "Expérience"
-L["FPS"] = "IPS"
-L["Fishy Loot"] = "Butin de pêche"
-L["Flash Intro"] = "|nSi la case est cochée, une lueur de surbrillance s'affichera sur l'icône lorsqu'elle est activée."
-L["Flash"] = "Surbrillance"
-L["Flask"] = "Fiole"
-L["Focus Aura"] = "FocusAura"
-L["Food"] = "Nourriture"
-L["From"] = "De"
-L["General"] = "Général"
-L["Get Close"] = "Rapprochez-vous"
-L["Get Out"] = "Sortez!"
-L["Ghost"] = "Fantôme"
-L["Groups"] = "Groupes"
-L["Hidden"] = "Caché"
-L["Hide Undiscovered Areas"] = "Cacher les zones non découvertes"
-L["Hold Shift"] = "Maintenez Shift"
-L["Home Latency"] = "Latence domicile"
-L["Home Protocol"] = "Protocole domicile"
-L["Honor Remaining"] = "Honneur restant:"
-L["Honor XP"] = "XP Honneur:"
-L["ID Intro"] = "|nSpell ID, doit être un nombre.|n|nVous pouvez obtenir l'ID sur l'info-bulle' du sort.|n|nSpellName n'est pas supporté."
-L["Incomplete Input"] = "Vous devez remplir tous les * optinos"
-L["Incorrect SpellID"] = "SpellID incorrecte."
-L["Install"] = "Installer"
-L["IntID Intro"] = "|nLe spellID qui déclenche le chronomètre, doit être un nombre.|n|nVous pouvez obtenir l'ID sur l'info-bulle' du sort.|n|nSpellName n'est pas supporté."
-L["IntID*"] = "Sorts*"
-L["InternalCD"] = "CustomCD"
-L["Interrupt"] = "Interrupted %s's %s!"
-L["Interrupted Message"] = "Interrompu %s's \124cff71d5ff\124Hspell:%d:0\124h[%s]\124h\124r!"
-L["Invalid Target"] = "Cible incorrecte"
-L["Invite"] = "Inviter"
-L["Item Delete Mode"] = "Mode suppression d'objet"
-L["ItemID Intro"] = "|nThe item name of the timer that triggered.|n|nThe spellName would take place if blank."
-L["ItemID"] = "Nom"
-L["Join or Invite"] = "Rejoindre ou inviter"
-L["KKUI_ActionBarX"] = "CustomBar"
-L["Key Binding"] = "Raccourcis"
-L["Key Bound To"] = "associée a"
-L["Key Index"] = "Index"
-L["Keybind Mode"] = "Passez votre souris sur n'importe quel bouton d'action, pour le lier. Appuyez sur la touche Echap ou clic droit pour effacer le lien du bouton d'action actuel."
-L["Lack"] = "Manque de"
-L["Latency"] = "Latence"
-L["Leeeeeroy!"] = "Leeeeeroy!"
-L["Left Click"] = "Clic gauche"
-L["Legion Invasion"] = "Assauts des factions"
-L["Local Time"] = "Heure locale"
-L["Loot"] = "Loot"
-L["MS"] = "MS"
-L["Mail Is COD"] = "You can't auto collect Cash on Delivery"
-L["Main Actionbar"] = "Barre d'action principale"
-L["Memory Collected"] = "Mémoire collectée"
-L["Missing DBM BigWigs"] = "Vous ne pouvez faire ca sans DBM ou BigWigs."
-L["MoveUI"] = "DéplacerIU"
-L["Next Invasion"] = "Suivante: "
-L["No Guild"] = "Aucune guilde"
-L["No Key Set"] = "Aucune clef"
-L["Paragon"] = "Paragon "
-L["Player Aura"] = "PlayerAura"
-L["Power"] = "PW"
-L["Press To Copy"] = "|nAppuyez sur pour copier."
-L["Profile"] = "Profil "
-L["ProfileDel"] = " Effacé: "
-L["ProfileInfo"] = "\n/liste des profils\n/profil #\n/profil effacé #\n\n"
-L["ProfileNotFound"] = "Profil introuvable"
-L["ProfileSelection"] = "Merci de taper le numéro du profil pour l'utiliser (exemple: /profile 5)"
-L["Profiles"] = "Profils"
-L["Profit"] = "Profit"
-L["Pull ABORTED!"] = "Pull REPORTÉ!"
-L["Pulling In"] = "Pull de %s dans %s.."
-L["Quick Split"] = "Quick Split"
-L["Raid Buff Checker"] = "[KkthnxUI] Vérificateur des Buffs de Raid:"
-L["Raid Buff"] = "RaidBuff"
-L["Raid Debuff"] = "RaidDebuff"
-L["Raid Disbanding"] = "[KkthnxUI] Dissolution du Raid"
-L["Rare Spotted"] = "Rare repéré "
-L["RareScanner Skin"] = "RareScanner Skin"
-L["Realm Time"] = "Heure du royaume"
-L["Remaining"] = "Restant:"
-L["RemoveFromIgnoreList"] = "%s SpellID %s a été retiré de la liste des ignorés de AuraWatch. Vous pouvez maintenir CTRL+ALT enfoncées et cliquer sur l'icône de UnitAura pour l'ajouter de nouveau aux ignorés."
-L["Repaired Failed"] = "Vous n'avez pas assez d'argent pour réparer,|r "
-L["Repaired Items Guild"] = "Vos objets ont été réparés en utilisant les fonds de la banque de guilde pour : "
-L["Repaired Items"] = "Vos objets ont été réparés pour :|r "
-L["Replay"] = "Replay"
-L["Reset Data"] = "Reset Data"
-L["Reset Details"] = "Réinitialiser Details"
-L["Reset KkthnxUI"] = "Êtes-vous sûr de vouloir réinitialiser tous les paramètres de ce profil ?"
-L["Reset your AuraWatch List?"] = "Êtes-vous sûr d'effacer tous vos groupes de la liste personnalisée ?"
-L["Restart Graphics"] = "Une ou plusieurs des modifications que vous avez apportées nécessitent un redémarrage du moteur graphique."
-L["Rested"] = "Reposé:"
-L["Reveal Hidden Areas"] = "Révélez les zones cachées"
-L["Reveal"] = "Révélez"
-L["Right Click"] = "Clic Droit"
-L["Sapped"] = "Sapped"
-L["SappedBy"] = "Sapped by: "
-L["Save KeyBinds"] = "Raccourci(s) sauvgardé(s)."
-L["Saved Raid(s)"] = "Raid(s) saugardé(s)"
-L["Section"] = "Section"
-L["Services"] = "Services"
-L["Session"] = "Session:"
-L["Show Hide Details"] = "Montrer/Masquer Details"
-L["Show Hide Skada"] = "Montre/Masquer Skada"
-L["Skipped The Cutscene"] = "Passez la cinématique."
-L["Slot Intro"] = "|nAfficher le cooldown des objets.|n|ne.g. Enchantement d'ingénierie sur la taille ou la cape.|n|nNe supporte que les bijoux activés."
-L["Slot*"] = "Emplacement*"
-L["Special Aura"] = "SpecialAura"
-L["Spell Cooldown"] = "Cooldown"
-L["Spell Item AlertStr"] = "%s uses %s"
-L["Spent"] = "Dépensés"
-L["Split Count"] = "Split Count"
-L["Stack Buying Check"] = "Êtes-vous sûr de vouloir acheter |cffff0000une pile|r de ça?"
-L["Stack Cap"] = "Stack Caps"
-L["Stack Intro"] = "|nCumul de sort, doit être un nombre.|n|nLe sort ne s'affiche qu'une fois qu'il a atteint le cumul que vous avez défini.|n|nLe cumul sera ignoré si il est vide."
-L["Stack"] = "Pile"
-L["StackSplitEnable"] = "|nCliquez pour séparer les objets empilés dans vos sacs, vous pouvez changer 'split count' pour chaque clic dans la boîte d'édition."
-L["Start Stop Countdown"] = "Démarrer/Arrêter le décompte"
-L["Steal"] = "Stole %s's %s!"
-L["Stranger"] = "Etranger"
-L["Strike"] = "SS"
-L["Summon From"] = "L'invocation de"
-L["Summon Warning"] = "sera automatiquement acceptée dans 10 secondes, sauf annulation."
-L["SwitchMode"] = "Switch Mode"
-L["System"] = "System"
-L["Take All"] = "Take all"
-L["Target Aura"] = "TargetAura"
-L["Targeted By"] = "Ciblé par:"
-L["Text Intro"] = "|nAfficher le texte sur le sort|n|nLorsque le sort est activé, il affiche le texte que vous avez défini.|n|nLe texte sera masqué lorsque VALUE est activée ou laissée vide."
-L["Text"] = "Texte"
-L["The health for %s is low!"] = "La vie de %s est faible !"
-L["This Cutscene Can Not Be Skipped"] = "Cette cinématique ne peut être passée."
-L["Timeless Intro"] = "|nSi activé, le timer du sort devrait être caché."
-L["Timeless"] = "Timeless"
-L["Tips"] = "Astuces"
-L["To"] = "To"
-L["Toggle KkthnxUI Config"] = "Afficher la config de KkthnxUI"
-L["Toggle Quick Menu"] = "Afficher le menu rapide"
-L["Totem Intro"] = "|nAfficher la durée du totem dans son emplacement."
-L["Totem*"] = "Totem*"
-L["TotemSlot"] = "TotemSlot"
-L["Trade"] = "Echanger"
-L["Trait"] = "Trait"
-L["Trigger"] = "Déclencheur"
-L["Tutorial Page1"] = "Bienvenue au tutoriel d'installation !|n|nCliquez sur le bouton 'Appliquer' (en bas à droite) pour appliquer certains paramètres par défaut. Cela comprend (entre autres) les noms, les barres d'action, les Unitframes et autres.|n|n|cffff0000CQui sont tous recommandés.|r"
-L["Tutorial Page2"] = "Vous êtes passé à l'étape suivante !|n|nNous allons ici charger quelques paramètres utiles pour le Chat ! Ces paramètres sont importants et conçus pour KkthnxUI|n|n|cffff0000ATTENTION:|r|n|n|cff00ccffVous pouvez défiler vers le haut ou le bas du chat en maintenant la touche MAJ enfoncée sur la fenêtre de chat.|r"
-L["Tutorial Page3"] = "Toujours là ? Bien !|n|nIl s'agit de la section permettant d'appliquer l'échelle d'interface recommandée en fonction de votre résolution actuelle.|n|nVous pouvez changer cette échelle dans |cffffcc00 les options de configuration de KkthnxUI (Onglet Général)|r plus tard."
-L["Tutorial Page4"] = "Enfin, les paramètres de profil de Skada/DBM/BigWigs et quelques autres addOns seront importés si ces addOns sont chargés/activés actuellement.|n|nVous pouvez désactiver les skins dans |cffffcc00les options de configuration de KkthnxUI (Onglet Skins)|r."
-L["Tutorial Page5"] = "Eh bien, vous avez réussi à aller jusqu'au bout ! Vous avez terminé le tutoriel.|n|n|cffff0000ATTENTION:|r|n|nVous pouvez facilement définir la focalisation en maintenant les touches SHIFT et clic gauche sur l'unité désirée ;|n|nLa plupart des paramètres peuvent être modifiés dans |cffffcc00les options de configuration de KkthnxUI|r.|r Bonne chance et amusez-vous bien " .. K.Name
-L["Type Intro"] = "|nAuraID: surveiller le statut des Buff/Debuff.|n|nSpellID: surveiller le cooldown des sorts.|n|nSlotID: surveiller le cooldown des objets.|n|nTotemID: surveiller la durée du totem activé."
-L["Type*"] = "Type*"
-L["Unit Intro"] = "|nLes informations sur les de l'unité.|n|njoueur: unité est le joueur.|n|ncible: unité est la cible.|n|nfocalisation: unité est la cible focalisée.|n|nfamilier: unité est le familier."
-L["Unit*"] = "Unité*"
-L["Value Intro"] = "|nSi activé, la valeur du sort doit être visible.|n|ne.g. Le bouclier du prêtre indiquera sa quantité d'absorption restante.|n|nIl a une priorité plus élevée que le TEXTE."
-L["Value"] = "Valeur"
-L["Vendored Items"] = "Camelote vendues pour: |r "
-L["Warning"] = "Attention"
-L["Whisper"] = "Dire à"
-L["WoW"] = "WoW"
-L["World Latency"] = "Latence du monde"
-L["World Protocol"] = "Protocole du monde"
-L["XP"] = "XP:"
-
--- GUI Group Title Locales
-L["ActionBar"] = "Barres d'action"
-L["Announcements"] = "Annonces"
-L["Arena"] = "Arène"
-L["AuraWatch"] = "AuraWatch"
-L["Auras"] = "Auras"
-L["Automation"] = "Automatisation"
-L["Boss"] = "Boss"
-L["Chat"] = "Chat"
-L["DataBars"] = "Barre d'info."
-L["DataText"] = "Textes d'info."
-L["Inventory"] = "Inventaire"
-L["Minimap"] = "Minimap"
-L["Misc"] = "Autres"
-L["Nameplate"] = "Noms"
-L["Party"] = "Groupe"
-L["QuestNotifier"] = "NotificationQuête"
-L["Raid"] = "Raid"
-L["Skins"] = "Habillages"
-L["Tooltip"] = "Info-bulle"
-L["UIFonts"] = "Polices"
-L["UITextures"] = "Textures"
-L["Unitframe"] = "Cadre d'unité"
-L["WorldMap"] = "Carte du monde"
-
--- GUI Sub Options
-L["Fading"] = "Fading"
-L["Layouts"] = "Layouts"
-L["Scaling"] = "Scaling"
-L["Sizes"] = "Sizes"
-L["Toggles"] = "Toggles"
-L["Rare Alert"] = "Rare Alert"
-
--- GUI Group Options Description Locals
-L["Choose Your Layout"] = "Choisissez votre disposition"
-L["Enable ActionBar"] = "Activer les barres d'action"
-L["Enable Count"] = "Activer le décompte"
-L["Enable CustomBar"] = "Activer la barre personnalisée"
-L["Enable Hotkey"] = "Activer raccourci"
-L["Enable Macro"] = "Activer macro"
-L["Enable MicroBar"] = "Activer la barre de menu"
-L["Enable OverrideWA"] = "Cacher les les temps de recharge avec WA"
-L["MMSSThreshold"] = "MMSS Threshold"
-L["Mouseover BottomBar 1"] = "Survol barre en bas 1"
-L["Mouseover BottomBar 2"] = "Survol barre en bas 2"
-L["Mouseover BottomBar 3"] = "Survol barre en bas 3"
-L["Mouseover CustomBar"] = "Survol barre personnalisée"
-L["Mouseover MicroBar"] = "Survol MicroBar"
-L["Mouseover PetBar"] = "Survol barre du familier"
-L["Mouseover RightBar 1"] = "Survol barre droite 1"
-L["Mouseover RightBar 2"] = "Survol barre droite 2"
-L["Mouseover StanceBar"] = "Survol barre des postures"
-L["Set Actionbars Scale"] = "Set Actionbars Scale"
-L["Set CustomBar Button Size"] = "Taille des boutons de la barre personnalisée"
-L["Set CustomBar Num Buttons"] = "Nombre de boutons de la barre personnalisée"
-L["Set CustomBar Num PerRow"] = "Nombre de boutons par ligne de la barre personnalisée"
-L["Set MainBars Button Size"] = "Taille des boutons de la barre principale"
-L["Set RightBars Button Size"] = "Taille des boutons des barres droite"
-L["Set Stance/Pet Button Size"] = "Taille des boutons de la barre du familier/postures"
-L["Show Cooldowns"] = "Afficher les Cooldowns"
-L["Show PetBar"] = "Afficher barre du familier"
-L["Show StanceBar"] = "Afficher barre des postures"
-L["TenthThreshold"] = "Tenth Threshold"
-
-L["Accept Invites From Friends & Guild Members"] = "Accepter les invitations des amis et membres de guilde"
-L["Accept PartySync From Friends & Guild Members"] = "Accepter la Synchro. de groupe des amis et membres de guilde"
-L["Alert Group After Instance Resetting"] = "Alerter le groupe après la réinitialisation de l'instance"
-L["Announce Broken Spells"] = "Announce Broken Spells"
-L["Announce Dispells"] = "Announce Dispells"
-L["Announce Interrupts"] = "Annoncer les interruptions"
-L["Announce Spells And Items"] = "Announce Spells And Items Being Used In Groups"
-L["Announce Only In Instances"] = "Announce Only In Instances"
-L["Announce Pull Countdown (/pc #)"] = "Annoncer le compte à rebours avant pull (/pc #)"
-L["Announce When Low On Health"] = "Annonce quand votre vie est faible"
-L["Announce When Sapped"] = "Annoncer quand assomer"
-L["Auto Accept Invite Keyword"] = "Accepter auto. les invitations par mot-clé"
-L["Auto Accept Resurrect Requests"] = "Accepter auto. les demandes de résurrection"
-L["Auto Accept Summon Requests"] = "Acceptez auto. les demandes d'invocation"
-L["Auto Collapse Objective Tracker"] = "Réduire automatiquement le suivi de quête"
-L["Auto Open Items In Your Inventory"] = "Ouvrir automatiquement les objets de votre inventaire"
-L["Auto Place Mythic Keystones"] = "Auto Place Mythic Keystones Into 'Keystone' Frame"
-L["Auto Release in Battlegrounds & Arenas"] = "Libérer l'esprit auto. dans les Arènes et Champs de bataille"
-L["Auto Screenshot Achievements"] = "Capturer un screenshot après un Haut-fait"
-L["Auto Select Quest Rewards Best Value"] = "Sélectionner automatiquement la récompense de quête la plus cher"
-L["Auto Set Your Role In Groups"] = "Définir auto. votre rôle dans les groupes"
-L["Auto Skip All Cinematic/Movies"] = "Passer auto. les cinématiques"
-L["Automatically Remove Annoying Buffs"] = "Retirer auto. les améliorations inutiles"
-L["Blocks Invites From Strangers"] = "Bloquez les invitations des joueurs inconnus"
-L["Decline Pet Duels"] = "Refuser les duels de mascottes"
-L["Decline PvP Duels"] = "Refuser les duels JcJ"
-L["Don't Alert In instances"] = "Ne pas envoyer d'alertes en instance"
-L["Enable Event & Rare Alerts"] = "Activer les alertes d'évenement & de rare"
-L["Own Dispells Announced Only"] = "Own Dispells Announced Only"
-L["Own Interrupts Announced Only"] = "Own Interrupts Announced Only"
-L["Print Alerts In Chat"] = "Ecrire les alertes dans le chat"
-L["Say 'Thank You' When Resurrected"] = "Dire 'Merci' quand ressusciter"
-L["Say Goodbye After Dungeon Completion."] = "Dire au revoir après avoir terminer le donjon."
-
-L["Anchor Every Five Rows Into One Row"] = "Anchor Every Five Rows Into One Row"
-L["Auto Repair Gear"] = "Réparer auto. l'équipement"
-L["Auto Vendor Grays"] = "Vendre la camelote auto."
-L["Bags Delete Button"] = "Bags Delete Button"
-L["Bags Width"] = "Largeur des sacs"
-L["Bank Width"] = "Largeur de la banque"
-L["Display Bind Status"] = "Display Bind Status" -- Needs Translation
-L["Display Item Level"] = "Afficher le niveau d'objet"
-L["Enable Bagbar"] = "Activer la barre des sacs"
-L["Enable Inventory"] = "Activer inventaire"
-L["Fade Bagbar"] = "Barre des sacs fondue"
-L["Filter Anima Items"] = "Filtrer les objets Anima"
-L["Filter Collection Items"] = "Filter Collection Items"
-L["Filter Consumable Items"] = "Filrer les consommables"
-L["Filter EquipSet"] = "Filtrer les sets d'armure"
-L["Filter Custom Items"] = "Filter Custom Items"
-L["Filter Favourite Items"] = "Filtrer les objets favoris"
-L["Filter Goods Items"] = "Filtrer les ressources"
-L["Filter Items Into Categories"] = "Filtrer les objets en catégories"
-L["Filter Junk Items"] = "Filtrer la camelote"
-L["Filter Korthia Relic Items"] = "Filter Korthia Relic Items"
-L["Filter Legendary Items"] = "Filtrer les objets légendaires"
-L["Filter Quest Items"] = "Filtrer les objets de quête"
-L["Gather Empty Slots Into One Button"] = "Rassembler les emplacement vide en un bouton"
-L["Pet Trash Currencies"] = "Pet Trash Currencies"
-L["Show New Item Glow"] = "Mettre les nouveaux objets en surbrillance"
-L["Show Upgrade Icon"] = "Afficher l'icône d'amélioration"
-L["Slot Icon Size"] = "Dimension des emplacements"
-L["Umm Reverse The Sorting"] = "Umm inverser le tri"
-
-L["Auras Reminder (Shout/Intellect/Poison)"] = "Auras Reminder (Shout/Intellect/Poison)"
-L["Buff Icon Size"] = "Taille des icônes d'amélioration'"
-L["Buffs Grow Right"] = "Les améliorations s'affiche vers la droite"
-L["Buffs per Row"] = "Améliorations par ligne"
-L["DeBuff Icon Size"] = "Taille des icônes d'affaiblissement"
-L["DeBuffs per Row"] = "Affaiblissements par ligne"
-L["Debuffs Grow Right"] = "Les affaiblissements s'affiche vers la droite"
-L["Enable Auras"] = "Activer les Auras"
-L["Enable TotemBar"] = "Activer barre des totems"
-L["Totems IconSize"] = "Taille des icônes des Totems"
-L["Vertical TotemBar"] = "Barre des totems verticale"
-
-L["Alert On M+ Quake"] = "Alert On M+ Quake"
-L["AuraWatch GUI"] = "AuraWatch GUI"
-L["AuraWatch IconScale"] = "Taille des icônes d'AuraWatch"
-L["Disable AuraWatch Tooltip (ClickThrough)"] = "Désactiver l'info-bulle d'AuraWatch (Clic au travers)"
-L["Enable AuraWatch"] = "Activer AuraWatch"
-L["Track Auras From Previous Expansions"] = "Suivre les auras des précédentes extensions"
-
-L["Allow Spam From Friends"] = "Autoriser les spams d'amis"
-L["Block 'Some' AddOn Alerts"] = "Bloquer 'certaines' alertes d'AddOn"
-L["Block Repeated Spammer Messages"] = "Block Repeated Spammer Messages"
-L["Block Whispers From Strangers"] = "Bloquer les messages privés des étrangers"
-L["Chat History Lines To Save"] = "Chat History Lines To Save"
-L["ChatFilter BlackList"] = "Filtre liste noire du chat"
-L["ChatFilter WhiteList"] = "Filtre liste blanche du chat"
-L["Custom Chat Timestamps"] = "Horodatage personnalisé du Chat"
-L["Differ Whipser Colors"] = "Couleur différente des messages privés"
-L["Disable Chat Language Filter"] = "Désactiver le filtre à obscenité du chat"
-L["Enable Chat Filter"] = "Activer le filtre à obscenité du chat"
-L["Enable Chat"] = "Activer le Chat"
-L["Fade Chat Text"] = "Fondu du texte du chat"
-L["Fading Chat Visible Time"] = "Temps avant fondu du Chat"
-L["Filter Matches Number"] = "Filter Matches Number"
-L["Lock Chat Height"] = "Bloquer la hauteur du Chat"
-L["Lock Chat Width"] = "Bloquer la largeur du Chat"
-L["Lock Chat"] = "Bloquer le Chat"
-L["Show Chat Background"] = "Afficher le fond du Chat"
-L["Show Chat Menu Buttons"] = "Afficher les boutons du menu du Chat"
-L["Show Emojis In Chat"] = "Show Emojis In Chat"
-L["Show ItemLevel on ChatFrames"] = "Afficher le niveau d'objet dans le Chat"
-L["Show Role Icons In Chat"] = "Show Role Icons In Chat"
-L["Stick On Channel If Whispering"] = "Stick On Channel If Whispering"
-L["Use Default Channel Names"] = "Utiliser les noms de canaux par défaut"
-
-L["Enable DataBars"] = "Activer les barres d'info."
-L["Fade DataBars"] = "Fondu des barres d'info."
-L["Pick Text Formatting"] = "Choisissez le formatage du texte"
-L["Rested Bar Color"] = "Couleur de la barre de repos"
-L["Show Text"] = "Afficher le texte"
-L["Track Honor"] = "Suivre l'Honneur"
-
-L["Color The Icons"] = "Color The Icons"
-L["Enable Currency Info"] = "Afficher les monnaies"
-L["Enable Friends Info"] = "Afficher les infos social"
-L["Enable Guild Info"] = "Afficher les infos de guilde"
-L["Enable Latency Info"] = "Afficher les infos de latences"
-L["Enable Minimap Location"] = "Afficher la localisation de la Minimap"
-L["Enable Minimap Time"] = "Afficher l'heure de la Minimap"
-L["Enable Positon Coords"] = "Enable Positon Coords"
-L["Enable System Info"] = "Afficher les infos système"
-L["Hide Icon Text"] = "Hide Icon Text"
-
-L["Auto Scale"] = "Echelle automatique"
-L["Border Style"] = "Style de bordure"
-L["Color 'Most' KkthnxUI Borders"] = "Couleur générale des bordures de KkthnxUI"
-L["Disable 'Some' Blizzard Tutorials"] = "Désactiver les tutoriels Blizzard"
-L["Disable Blizzard Error Frame Combat"] = "Désactiver la fenêtre d'erreur Blizzard pendant les combats"
-L["Enable Version Checking"] = "Activer la vérification de version"
-L["Import Profiles From Other Characters"] = "Importer les profils à partir d'autres personnages"
-L["Move Blizzard Frames"] = "Bouger les fenêtres Blizzard"
-L["Number Prefix Style"] = "Style du numéro de préfixe"
-L["Set UI scale"] = "Echelle de l'interface"
-L["Textures Color"] = "Couleur des Textures"
-
-L["Auto Confirm Loot Dialogs"] = "Confirmer automatique les fenêtres de butin"
-L["Auto Greed Green Items"] = "Cupidité automatique sur les objets verts"
-L["Enable Group Loot"] = "Activer le butin de groupe"
-L["Enable Loot"] = "Activer butin"
-L["Faster Auto-Looting"] = "Butin-Auto plus rapide"
-
-L["Blip Icon Styles"] = "Style de l'icône Blip"
-L["EasyVolume"] = "Easy Scroll Volume"
-L["Enable Minimap"] = "Activer Minimap"
-L["Location Text Style"] = "Style du texte de Location"
-L["Minimap Size"] = "Taille de la Minimap"
-L["Pulse Minimap Mail"] = "Pulse Minimap When You Have Pending Mail"
-L["QueueStatus"] = "Show Time In Queue"
-L["Set RecycleBin Positon"] = "Set RecycleBin Position"
-L["Show Minimap Button Collector"] = "Afficher l'agrégateur de bouton de la Minimap"
-L["Show Minimap Calendar"] = "Afficher le calendrier de la Minimap"
-
-L["AFK Camera"] = "AFK Camera"
-L["Add Paragon Info on ReputationFrame"] = "Add Paragon Info on ReputationFrame"
-L["Add Spellbook-Like Tabs On TradeSkillFrame"] = "Ajouter des onglets type livre de sort dans TradeSkillFrame"
-L["Auto Emote On Your Killing Blow"] = "Envoyer un emote après un coup fatal"
-L["Character/Inspect Gem/Enchant Info"] = "Personnage/Inspecter Gemmes/Enchantements Info"
-L["Display Character Frame Full Stats"] = "Afficher les statistiques complètes du personnage"
-L["EasyMarking by Ctrl + LeftClick"] = "Marquage facile par Ctrl + LeftClick"
-L["Enhanced Color Picker"] = "Choix des couleurs amélioré"
-L["Enhanced Colors (Friends/Guild +)"] = "Couleurs améliorées (Amis/Guilde +)"
-L["Hide BossBanner"] = "Masquer la fenêtre des boss"
-L["Hide RaidBoss EmoteFrame"] = "Masquer RaidBoss EmoteFrame"
-L["QuestTool NPCisTrue"] = "This is |cffff0000T|cffff7f00R|cffffff00U|cff00ff00E"
-L["QuickJoin"] = "Enhance Premade Group Finder"
-L["Remove And Hide The TalkingHead Frame"] = "Désactiver et cacher la fenêtre parlante des PNJ"
-L["Show Character/Inspect ItemLevel Info"] = "Afficher Personnage/Inspecter niveau d'objet"
-L["Show Mythic+ GuildBest"] = "Show Mythic Plus Guild Best"
-L["Show Slot Durability %"] = "Afficher la durabilité des objets %"
-L["Show Wowhead Links Above Questlog Frame"] = "Afficher un lien Wowhead au dessus de la fenêtre de suivi de quête"
-L["Show Your Killing Blow Info"] = "Afficher les informations de vos coups fatals"
-L["World Markers Bar"] = "World Markers Bar"
-
-L["Goodbye and safe travels."] = "Au revoir et voyages sûrs."
-L["It was a pleasure playing with you all, farewell."] = "Ce fut un plaisir de jouer avec vous tous, adieu."
-L["I had a great time, thanks and take care."] = "J'ai passé un excellent moment, merci et prenez soin de vous."
-L["Farewell friends, until we meet again."] = "Adieu les amis, jusqu'à ce que nous nous revoyions."
-L["Thanks for the adventure, farewell."] = "Merci pour l'aventure, adieu."
-L["It's been real, goodbye and have a great day."] = "C'était réel, au revoir et bonne journée."
-L["Thanks for the memories, farewell."] = "Merci pour les souvenirs, adieu."
-L["Goodbye and may your journey be filled with success."] = "Au revoir et que votre voyage soit couronné de succès."
-L["Thanks for the good times, farewell and good luck."] = "Merci pour les bons moments, adieu et bonne chance."
-L["It's been an honor, goodbye and happy questing."] = "Ce fut un honneur, au revoir et bonne quête."
-
-L["Auras Filter Style"] = "Style de filtre des Auras"
-L["Auras Size"] = "Taille des Auras"
-L["Classpower/Healthbar Height"] = "Hauteur de la Barre de ressource/Barre de vie"
-L["Colored Custom Units"] = "Colored Custom Units"
-L["Custom Color"] = "Couleur personnalisée"
-L["Custom PowerUnit List"] = "Custom PowerUnit List" -- Needs Translations
-L["Custom UnitColor List"] = "Custom UnitColor List" -- Needs Translations
-L["Enable GCD Ticker"] = "Activer GCD Ticker"
-L["Enable Nameplates"] = "Activer les noms"
-L["Enable Personal Resource"] = "Activer l'energie personnelle"
-L["Force TankMode Colored"] = "Forcé la colorisation par menace"
-L["HealthText FontSize"] = "Taille de la police de la barre de vie"
-L["Insecure Color"] = "Couleur d'insécurité"
-L["Interacted Nameplate Stay Inside"] = "Interacted Nameplate Stay Inside"
-L["Max Auras"] = "Auras maximum"
-L["NameText FontSize"] = "Taille de la police du nom"
-L["Nameplate Height"] = "Hauteur de la barre de nom"
-L["Nameplate Vertical Spacing"] = "Espace vertical de la barre de nom"
-L["Nameplate Width"] = "Largeur barre de nom"
-L["Nameplete MaxDistance"] = "Distance max. d'affiche du nom"
-L["Non-Target Nameplate Alpha"] = "Alpha du nom des non-cibles"
-L["Non-Target Nameplate Scale"] = "Echelle du nom des non-cibles"
-L["Off-Tank Color"] = "Couleur des Off-Tank"
-L["Only Visible in Combat"] = "Seulement visible au combat"
-L["PlayerPlate IconSize"] = "Taille icône de la barre d'info. joueur"
-L["PlayerPlate Powerbar Height"] = "Hauteur barre d'energie du joueur"
-L["Quest Progress Indicator"] = "Indicateur de progrès de la quête"
-L["Revert Threat Color If Not Tank"] = "Inverser la couleur de la menace si non tank"
-L["Secure Color"] = "Couleur de sécurité"
-L["Show AngryKeystones Progress"] = "Afficher la progression AngryKeystones"
-L["Show Enemy Class Icons"] = "Afficher l'icône de classe des ennemis"
-L["Show Friendly ClassColor"] = "Afficher la couleur de classe des cibles amicales"
-L["Show Health Value"] = "Afficher la valeur de santé"
-L["Show Hostile ClassColor"] = "Afficher la couleur de classe des cibles ennemis"
-L["Show Only Names For Friendly"] = "Afficher uniquement le noms des cibles amicales"
-L["Show Power Value"] = "Afficher la puissance"
-L["Smooth Bars Transition"] = "Transition des barres fluide"
-L["Target Nameplate ClassPower"] = "Target Nameplate ClassPower"
-L["TargetIndicator Color"] = "Couleur de l'indication de cible"
-L["TargetIndicator Style"] = "Style de l'indication de cible"
-L["Track Personal Class Auras"] = "Track Personal Class Auras"
-L["Transition Color"] = "Transition de couleur"
-L["Unit Execute Ratio"] = "Unit Execute Ratio"
-
-L["Bartender4 Skin"] = "Habillage de Bartender4"
-L["BigWigs Skin"] = "Habillage de BigWigs"
-L["ButtonForge Skin"] = "ButtonForge Skin"
-L["ChatBubbles Background Alpha"] = "Alpha du fond des bulles de Chat"
-L["ChatBubbles Skin"] = "Habillage des bulles de Chat"
-L["ChocolateBar Skin"] = "Habillage de ChocolateBar"
-L["Deadly Boss Mods Skin"] = "Habillage de Deadly Boss Mods"
-L["Details Skin"] = "Habillage de Details"
-L["Dominos Skin"] = "Habillage de Dominos"
-L["Hekili Skin"] = "Habillage d'Hekili"
-L["Skada Skin"] = "Habillage de Skada"
-L["Skin Some Blizzard Frames & Objects"] = "Habillage de certaines fenêtres Blizzard"
-L["Spy Skin"] = "Habillage de Spy"
-L["TalkingHead Skin"] = "Habillage de TalkingHead"
-L["TellMeWhen Skin"] = "Habillage de TellMeWhen"
-L["TitanPanel Skin"] = "Habillage de TitanPanel"
-L["WeakAuras Skin"] = "Habillage de WeakAuras"
-
-L["Abbreviate Guild Names"] = "Abréger les noms des guildes"
-L["Follow Cursor"] = "Suivre le curseur"
-L["Hide Guild Rank"] = "Cacher le rang de la guilde"
-L["Hide Player Title"] = "Cacher le titre du joueur"
-L["Hide Tooltip in Combat"] = "Cacher l'info-bulle en combat"
-L["Item Icons"] = "Icônes des objets"
-L["Quality Color Border"] = "Bordure de couleur en fonction de la qualité"
-L["Show Faction Icon"] = "Afficher l'icône de faction"
-L["Show Mythic+ Rating"] = "Show Mythic+ Rating"
-L["Show Player Mount Source Info By CTRL"] = "Show Player Mount Source Info By CTRL"
-L["Show Player Targeted By"] = "Afficher 'Joueur Ciblé Par'"
-L["Show Roles Assigned Icon"] = "Afficher les icônes de rôle"
-L["Show Spec/ItemLevel by SHIFT"] = "Afficher Spec/Niveau d'objet avec SHIFT"
-L["Show Tooltip IDs"] = "Afficher l'ID des info-bulles"
-L["Show realm name by SHIFT"] = "Afficher le nom du royaume avec SHIFT"
-
-L["Set ActionBar Font"] = "Police des barres d'action"
-L["Set Auras Font"] = "Police des Auras"
-L["Set Chat Font"] = "Police du Chat"
-L["Set DataBars Font"] = "Police des barres d'info."
-L["Set DataText Font"] = "Police des textes d'info."
-L["Set Filger Font"] = "Police du Filger"
-L["Set General Font"] = "Police générale"
-L["Set Inventory Font"] = "Police de l'inventaire"
-L["Set Minimap Font"] = "Police de la Minimap"
-L["Set Nameplate Font"] = "Police des noms"
-L["Set QuestTracker Font"] = "Police du suivi de quête"
-L["Set Skins Font"] = "Police des habillages"
-L["Set Tooltip Font"] = "Police des info-bulles"
-L["Set Unitframe Font"] = "Police des cadres d'unité"
-L["Adjust QuestFont Size"] = "Ajuster la taille de la police des quêtes"
-
-L["Set DataBars Texture"] = "Texture des barres d'info."
-L["Set Filger Texture"] = "Texture du Filger"
-L["Set General Texture"] = "Texture générale"
-L["Set HealPrediction Texture"] = "Texture de la prédiction de soin"
-L["Set Loot Texture"] = "Texture du butin"
-L["Set Nameplate Texture"] = "Texture des noms"
-L["Set QuestTracker Texture"] = "Texture du suivi des quêtes"
-L["Set Skins Texture"] = "Texture des habillages"
-L["Set Tooltip Texture"] = "Texture de l'info-bulle"
-L["Set Unitframe Texture"] = "Texture des barres d'unités"
-
-L["Class Color Castbars"] = "Barres d'incantation' aux couleurs de classe"
-L["Enable Player CastBar"] = "Activer la barre d'incantation du joueur"
-L["Enable Simple CombatText"] = "Activer les textes de combat simple"
-L["Enable Target CastBar"] = "Activer la barre d'incantation de la cible"
-L["Enable Unitframes"] = "Activer les barres d'unités"
-L["Fade Unitframes"] = "Fondu des barres d'unités"
-L["Focus Frame Height"] = "Hauteur de la fenêtre focus"
-L["Focus Frame Width"] = "Largeur de la fenêtre focus"
-L["Focus Power Bar"] = "Barre de ressource du focus"
-L["Health Color Format"] = "Format de couleur de la vie"
-L["Hide Pet Level"] = "Masquer le niveau du familier"
-L["Hide Pet Name"] = "Masquer le nom du familier"
-L["Hide TargetofTarget Frame"] = "Masquer la cible de la cible"
-L["Hide TargetofTarget Level"] = "Masquer le niveau de la cible de la cible"
-L["Hide TargetofTarget Name"] = "Masquer le nom de la cible de la cible"
-L["Number of Buffs Per Row"] = "Nombre de buffs par ligne"
-L["Number of Debuffs Per Row"] = "Nombre de debuffs par ligne"
-L["Only Show Your Debuffs"] = "Afficher seulement vos débuffs"
-L["Pet Frame Height"] = "Hauteur de la fenêtre du familier"
-L["Pet Frame Width"] = "Largeur de la fenêtre du familier"
-L["Pet Power Bar"] = "Barre de ressource du familier"
-L["Pet's Healing/Damage"] = "Pet's Healing/Damage"
-L["Player Castbar Height"] = "Hauteur de la barre d'incantation du joueur"
-L["Player Castbar Width"] = "Largeur de la barre d'incantation du joueur"
-L["Player Frame Height"] = "Player Frame Height"
-L["Player Frame Width"] = "Player Frame Width"
-L["Player Power Bar"] = "Player Power Bar"
-L["Reaction Color Castbars"] = "Reaction Color Castbars"
-L["Show Additional Mana Power (|CFFFF7D0ADruide|r, |CFFFFFFFFPrêtre|r, |CFF0070DEChaman|r)"] = "Afficher le mana additionel (|CFFFF7D0ADruide|r, |CFFFFFFFFPrêtre|r, |CFF0070DEChaman|r)"
-L["Show AutoAttack Damage"] = "Afficher les dommages des attaques auto"
-L["Show Castbar Latency"] = "Afficher la latence de la barre d'incantation"
-L["Show Class Resources"] = "Afficher les ressources de classe"
-L["Show Full OverHealing"] = "Afficher l'OverHealing"
-L["Show Global Cooldown"] = "Afficher le Global Cooldown"
-L["Show HealPrediction Statusbars"] = "Afficher la prédiction de heal sur les Statusbars"
-L["Show Health Debuff Highlight"] = "Mettre en surbrillance les affaiblissements de vie"
-L["Show Hots and Dots"] = "Afficher les Hots et Dots"
-L["Show Player Frame Buffs"] = "Afficher les buffs du joueur"
-L["Show Player Frame Debuffs"] = "Afficher les débuffs du joueur"
-L["Show Player Frame Level"] = "Afficher le niveau du joueur"
-L["Show Player Power Prediction"] = "Afficher la prediction d'utilisation de ressource"
-L["Show PvP Indicator on Player / Target"] = "Afficher l'indication JcJ sur le joueur/cible"
-L["Show Target Frame Buffs"] = "Afficher les buffs de la cible"
-L["Show Target Frame Debuffs"] = "Afficher les débuffs de la cible"
-L["Show |CFF00FF96Monk|r Stagger Bar"] = "Afficher la barre de report du |CFF00FF96Moine|r"
-L["Smooth Bars"] = "Barres fluides"
-L["Sound Played When You Are Resurrected"] = "Son joué lors de la résurrection"
-L["Target Castbar Height"] = "Hauteur de la barre d'incantation de la cible"
-L["Target Castbar Width"] = "Largeur de la barre d'incantation de la cible"
-L["Target Frame Height"] = "Target Frame Height"
-L["Target Frame Width"] = "Target Frame Width"
-L["Target Power Bar"] = "Target Power Bar"
-L["Target of Focus Frame Height"] = "Hauteur de la fenêtre de la cible du focus"
-L["Target of Focus Frame Width"] = "Largeur de la fenêtre de la cible du focus"
-L["Target of Focus Power Bar"] = "Barre de ressource de la cible du focus"
-L["Target of Target Frame Height"] = "Hauteur de la fenêtre cible de la cible"
-L["Target of Target Frame Width"] = "Largeur de la fenêtre cible de la cible"
-L["Target of Target Power Bar"] = "Barre de ressource de la cible de la cible"
-L["Unitframe Portrait Style"] = "Style du portrait du cadre d'unité"
-L["Unitframe Swingbar Timer"] = "Unitframe Swingbar Timer"
-L["Unitframe Swingbar"] = "Unitframe Swingbar"
-L["Enable Party"] = "Activer les groupes"
-L["Show Castbars"] = "Afficher les barres d'incantation"
-L["Show Highlighted Target"] = "Afficher la cible mise en évidence"
-L["Show Party Buffs"] = "Afficher les buffs de groupe"
-L["Show Party Pets"] = "Afficher les familiers du groupe"
-L["Show Player In Party"] = "Afficher les joueurs dans le groupe"
-L["Smooth Bar Transition"] = "Transitions fluides des barres"
-
-L["Enable Boss"] = "Activer boss"
-
-L["Enable Arena"] = "Activer arène"
-
-L["Aura Debuff Icon Size"] = "Taille d'icône des Debuffs Aura"
-L["AuraWatch Icon Size"] = "Taille d'icône d'AuraWatch"
-L["Enable Raidframes"] = "Activer les fenêtres de raid"
-L["Health Format"] = "Format de la vie"
-L["Horizontal Raid Frames"] = "Fenêtres de raid horizontales"
-L["Number Of Groups to Show"] = "Nombre de groupe affichés"
-L["Raidframe Height"] = "Hauteur des fenêtres de raid"
-L["Raidframe Width"] = "Largeur des fenêtres de raid"
-L["Reverse Raid Frame Growth"] = "Inverser le sens d'agrandissement de la fenêtre de raid"
-L["Show AuraWatch Icons"] = "Afficher les icônes AuraWatch"
-L["Show Away/DND Status"] = "Afficher le statut Absent/Ne pas déranger"
-L["Show Group Number Team Index"] = "Afficher le numéro de groupe"
-L["Show MainTank Frames"] = "Afficher la fenêtre des tanks principaux"
-L["Show Manabars"] = "Afficher les barres de mana"
-L["Show Raid Utility Frame"] = "Afficher la fenêtre utilitaire de raid"
-
-L["Alert QuestProgress In Chat"] = "Alerter votre progression de quête dans le chat"
-L["Enable QuestNotifier"] = "Activer la notification de quête"
-L["Only Play Complete Quest Sound"] = "Ne jouez que le son en réussite de quête"
-
-L["Alpha When Moving"] = "Alpha When Moving"
-L["Fade Worldmap When Moving"] = "Fondu de la carte du monde en mouvement"
-L["Map Reveal Shadow Color"] = "Couleur de l'ombre de révélation de la carte"
-L["Map Reveal Shadow"] = "Ombre de révalation de la carte"
-L["Show Player/Mouse Coordinates"] = "Afficher les coordonnées du joueur/souris"
-L["Show Smaller Worldmap"] = "Afficher une carte du monde plus petite"
-
--- HelpTip Locales
-L["DurabilityHelpTip"] = "You have low durability slots! Repair soon!"
-
--- GUI Config Tooltip Locales
-L["AutoScaleTip"] = "Mise à l'échelle automatique de l'IU au pixel près en fonction de votre résolution.|n|nSi vous voulez changer l'échelle manuellement, vous devez désactiver 'Echelle automatique' puis appliquer l'échelle en utilisant le curseur"
-L["CustomUnitTip"] = "Entrez le nom de l'unité ou l'ID du PNJ. Vous pouvez voir l'ID du PNJ dans l'info-bulle en maintenant la touche MAJ enfoncée."
-L["EasyVolumeTip"] = "You can change game sound volume by holding key CTRL and mousewheel on minimap.|nHold key CTRL+ALT, the volume will switch from 0 to 100 directly."
-L["ExecuteRatioTip"] = "Si le pourcentage de santé de l'unité est inférieur à la valeur plafond d'exécution que vous avez fixée, son nom devient rouge.|n|nL'indicateur d'exécution sera désactivé sur 0."
-L["MMSSThresholdTip"] = "If cooldown less than current threhold, show cooldown in format MM:SS.|nEg. 2 mins and half presents as 2:30."
-L["MapRevealTip"] = "Si cette option est activée, les zones à explorer seront affichées dans une ombre légère. Vous pouvez choisir la couleur de l'ombre que vous souhaitez."
-L["ParagonReputationTip"] = "Remplace les barres exaltées du cadre de réputation par des barres Parangon, que vous pouvez personnaliser vous-même avec les paramètres"
-L["QuickJoinTip"] = "Quick apply by double click, hide group join notice, styled group roles, auto invite applicants, show leader overall score, abbr keystone name for Tazavesh."
-L["SpellItemAlertTip"] = "Notify mailbox, feast or bloodlust casting info in your group."
-L["TenthThresholdTip"] = "If cooldown less than current threhold, show cooldown in format decimal.|nEg. 3 secs will show as 3.0."
-L["UIScaleTip"] = "Modifier l'échelle de l'IU selon vos préférences|n|nSi vous voulez changer l'échelle manuellement, vous devez désactiver 'Echelle automatique' puis appliquer l'échelle en utilisant le curseur"
diff --git a/KkthnxUI/Media/DataText/lfg.blp b/KkthnxUI/Media/DataText/lfg.blp
deleted file mode 100644
index 932d8c12..00000000
Binary files a/KkthnxUI/Media/DataText/lfg.blp and /dev/null differ
diff --git a/KkthnxUI/Media/DataText/talents.blp b/KkthnxUI/Media/DataText/talents.blp
new file mode 100644
index 00000000..d6ebf48b
Binary files /dev/null and b/KkthnxUI/Media/DataText/talents.blp differ
diff --git a/KkthnxUI/Media/KkthnxUI_Spell_Icon.blp b/KkthnxUI/Media/KkthnxUI_Spell_Icon.blp
new file mode 100644
index 00000000..18146abc
Binary files /dev/null and b/KkthnxUI/Media/KkthnxUI_Spell_Icon.blp differ
diff --git a/KkthnxUI/Media/Media.lua b/KkthnxUI/Media/Media.lua
index 745ed4bf..7c130bd3 100644
--- a/KkthnxUI/Media/Media.lua
+++ b/KkthnxUI/Media/Media.lua
@@ -47,8 +47,8 @@ C["Media"] = {
Glamour7 = mediaFolder .. "Statusbars\\Glamour7.tga",
GoldpawUI = mediaFolder .. "Statusbars\\GoldpawUI.tga",
KkthnxUI = mediaFolder .. "Statusbars\\Statusbar",
- KuiBright = mediaFolder .. "Statusbars\\KuiStatusbarBright.tga",
Kui = mediaFolder .. "Statusbars\\KuiStatusbar.tga",
+ KuiBright = mediaFolder .. "Statusbars\\KuiStatusbarBright.tga",
Palooza = mediaFolder .. "Statusbars\\Palooza.tga",
PinkGradient = mediaFolder .. "Statusbars\\PinkGradient.tga",
Rain = mediaFolder .. "Statusbars\\Rain.tga",
diff --git a/KkthnxUI/Media/Minimap/Flag.png b/KkthnxUI/Media/Minimap/Flag.png
new file mode 100644
index 00000000..0d8e6c72
Binary files /dev/null and b/KkthnxUI/Media/Minimap/Flag.png differ
diff --git a/KkthnxUI/Modules/ActionBars/ButtonStyle.lua b/KkthnxUI/Modules/ActionBars/ButtonStyle.lua
index 6498f5fa..59c39bd4 100644
--- a/KkthnxUI/Modules/ActionBars/ButtonStyle.lua
+++ b/KkthnxUI/Modules/ActionBars/ButtonStyle.lua
@@ -126,7 +126,7 @@ function Module:StyleActionButton(button)
button.__bg = CreateFrame("Frame", nil, button, "BackdropTemplate")
button.__bg:SetAllPoints(button)
button.__bg:SetFrameLevel(button:GetFrameLevel())
- button.__bg:CreateBorder(nil, nil, nil, nil, nil, nil, K.MediaFolder .. "Skins\\UI-Slot-Background", nil, nil, nil, { 0.7, 0.7, 0.7 })
+ button.__bg:CreateBorder(nil, nil, nil, nil, nil, nil, K.MediaFolder .. "Skins\\UI-Slot-Background", nil, nil, nil, { 1, 1, 1 })
end
end
if cooldown then
diff --git a/KkthnxUI/Modules/ActionBars/Elements/Bars.lua b/KkthnxUI/Modules/ActionBars/Elements/Bars.lua
index 28c64c53..0cfe719a 100644
--- a/KkthnxUI/Modules/ActionBars/Elements/Bars.lua
+++ b/KkthnxUI/Modules/ActionBars/Elements/Bars.lua
@@ -238,7 +238,7 @@ function Module:UpdateButtonConfig(i)
-- Set the check focus cast attribute to true
button:SetAttribute("checkfocuscast", true)
-- Set the check self cast attribute to true
- -- button:SetAttribute("checkselfcast", true)
+ button:SetAttribute("checkselfcast", true)
-- Set the unit 2 attribute to "player"
-- button:SetAttribute("*unit2", "player")
-- Update the config for the button
@@ -416,7 +416,7 @@ end
function Module:OnEnable()
Module.buttons = {}
- Module:MicroMenu()
+ Module:CreateMicroMenu()
if C_AddOns.IsAddOnLoaded("ConsolePort") then
return
diff --git a/KkthnxUI/Modules/ActionBars/Elements/ExtraQuestButton.lua b/KkthnxUI/Modules/ActionBars/Elements/ExtraQuestButton.lua
index 9aa5edca..7ad36d72 100644
--- a/KkthnxUI/Modules/ActionBars/Elements/ExtraQuestButton.lua
+++ b/KkthnxUI/Modules/ActionBars/Elements/ExtraQuestButton.lua
@@ -291,7 +291,7 @@ function ExtraQuestButton:SetItem(itemLink)
end
if itemLink then
- self.Icon:SetTexture(GetItemIcon(itemLink))
+ self.Icon:SetTexture(C_Item.GetItemIconByID(itemLink))
local itemID = GetItemInfoFromHyperlink(itemLink)
self.itemID = itemID
self.itemLink = itemLink
diff --git a/KkthnxUI/Modules/ActionBars/Elements/Extrabar.lua b/KkthnxUI/Modules/ActionBars/Elements/Extrabar.lua
index d6e0bdaa..19659184 100644
--- a/KkthnxUI/Modules/ActionBars/Elements/Extrabar.lua
+++ b/KkthnxUI/Modules/ActionBars/Elements/Extrabar.lua
@@ -57,7 +57,7 @@ function Module:CreateExtrabar()
local bg = CreateFrame("Frame", nil, spellButton, "BackdropTemplate")
bg:SetAllPoints(spellButton)
bg:SetFrameLevel(spellButton:GetFrameLevel())
- bg:CreateBorder(nil, nil, nil, nil, nil, nil, K.MediaFolder .. "Skins\\UI-Slot-Background", nil, nil, nil, { 0.7, 0.7, 0.7 })
+ bg:CreateBorder(nil, nil, nil, nil, nil, nil, K.MediaFolder .. "Skins\\UI-Slot-Background", nil, nil, nil, { 1, 1, 1 })
spellButton.styled = true
end
end
diff --git a/KkthnxUI/Modules/ActionBars/Elements/MicroMenu.lua b/KkthnxUI/Modules/ActionBars/Elements/MicroMenu.lua
index 42ddee4b..e8935560 100644
--- a/KkthnxUI/Modules/ActionBars/Elements/MicroMenu.lua
+++ b/KkthnxUI/Modules/ActionBars/Elements/MicroMenu.lua
@@ -1,62 +1,62 @@
--- Import necessary variables and modules
local K, C = KkthnxUI[1], KkthnxUI[2]
local Module = K:GetModule("ActionBar")
-- Import Lua functions
-local table_insert = table.insert
-local pairs = pairs
+local insert = table.insert
+local ipairs, pairs = ipairs, pairs
local type = type
-- Global variables
-local buttonList = {}
-local watcher = 0
+local MicroButtons = {}
+local updateWatcher = 0
--- Callback for fading out the micro menu
-local function LeaveBarFadeOut()
- local KKUI_MB = KKUI_MenuBar
+-- Fade out the micro menu
+local function FadeOutMicroMenu()
+ local microMenuBar = KKUI_MenuBar
if C["ActionBar"].FadeMicroMenu then
- UIFrameFadeOut(KKUI_MB, 0.2, KKUI_MB:GetAlpha(), 0)
+ UIFrameFadeOut(microMenuBar, 0.2, microMenuBar:GetAlpha(), 0)
end
end
--- Callback for updating when the mouse is over the micro menu
+-- Update micro menu on mouse over
local function UpdateOnMouseOver(_, elapsed)
- local KKUI_MB = KKUI_MenuBar
- watcher = watcher + elapsed
- if watcher > 0.1 then
- if not KKUI_MB:IsMouseOver() then
- KKUI_MB.IsMouseOvered = nil
- KKUI_MB:SetScript("OnUpdate", nil)
- LeaveBarFadeOut()
+ local microMenuBar = KKUI_MenuBar
+ updateWatcher = updateWatcher + elapsed
+ if updateWatcher > 0.1 then
+ if not microMenuBar:IsMouseOver() then
+ microMenuBar.IsMouseOvered = nil
+ microMenuBar:SetScript("OnUpdate", nil)
+ FadeOutMicroMenu()
end
- watcher = 0
+ updateWatcher = 0
end
end
--- Callback for handling micro button hover
+-- Handle micro button hover
local function OnMicroButtonEnter()
- local KKUI_MB = KKUI_MenuBar
- if not KKUI_MB.IsMouseOvered then
- KKUI_MB.IsMouseOvered = true
- KKUI_MB:SetScript("OnUpdate", UpdateOnMouseOver)
- UIFrameFadeIn(KKUI_MB, 0.2, KKUI_MB:GetAlpha(), 1)
+ local microMenuBar = KKUI_MenuBar
+ if not microMenuBar.IsMouseOvered then
+ microMenuBar.IsMouseOvered = true
+ microMenuBar:SetScript("OnUpdate", UpdateOnMouseOver)
+ UIFrameFadeIn(microMenuBar, 0.2, microMenuBar:GetAlpha(), 1)
end
end
--- Callbacks for resetting button parent and anchor
+-- Reset button parent to its original owner
local function ResetButtonParent(button, parent)
if parent ~= button.__owner then
button:SetParent(button.__owner)
end
end
+-- Reset button anchor to its owner
local function ResetButtonAnchor(button)
button:ClearAllPoints()
button:SetAllPoints()
end
--- Function for setting up button textures
-local function SetupButtonTextures(button)
+-- Setup textures for the micro buttons
+local function SetupMicroButtonTextures(button)
local function SetTextureProperties(texture)
texture:SetTexCoord(0.2, 0.80, 0.22, 0.8)
texture:SetPoint("TOPLEFT", button, "TOPLEFT", 3, -5)
@@ -106,17 +106,21 @@ local function SetupButtonTextures(button)
end
end
--- Function for creating micro buttons
-local function MicroButtonCreate(parent, data)
+-- Create micro buttons
+local function CreateMicroButton(parent, data)
local method, tooltip = unpack(data)
local buttonFrame = CreateFrame("Frame", "KKUI_MicroButtons", parent)
- table_insert(buttonList, buttonFrame)
+ insert(MicroButtons, buttonFrame)
buttonFrame:SetSize(22, 30)
buttonFrame:CreateBorder()
if type(method) == "string" then
local button = _G[method]
+ if not button then
+ print(method)
+ return
+ end
button:SetHitRectInsets(0, 0, 0, 0)
button:SetParent(buttonFrame)
button.__owner = buttonFrame
@@ -135,7 +139,7 @@ local function MicroButtonCreate(parent, data)
button:SetHighlightTexture(0)
button.SetHighlightTexture = K.Noop
- SetupButtonTextures(button)
+ SetupMicroButtonTextures(button)
else
buttonFrame:SetScript("OnMouseUp", method)
K.AddTooltip(buttonFrame, "ANCHOR_RIGHT", tooltip)
@@ -148,23 +152,23 @@ local function MicroButtonCreate(parent, data)
end
end
--- Function for setting up the micro menu
-function Module:MicroMenu()
+-- Set up the micro menu
+function Module:CreateMicroMenu()
if not C["ActionBar"].MicroMenu then
return
end
- local menubar = CreateFrame("Frame", "KKUI_MenuBar", K.PetBattleFrameHider)
- menubar:SetSize(302, 30)
- menubar:SetAlpha((C["ActionBar"].FadeMicroMenu and not menubar.IsMouseOvered and 0) or 1)
- menubar:EnableMouse(false)
- K.Mover(menubar, "Menubar", "Menubar", { "BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -4, 4 })
+ local microMenuBar = CreateFrame("Frame", "KKUI_MenuBar", K.PetBattleFrameHider)
+ microMenuBar:SetSize(302, 30)
+ microMenuBar:SetAlpha((C["ActionBar"].FadeMicroMenu and not microMenuBar.IsMouseOvered and 0) or 1)
+ microMenuBar:EnableMouse(false)
+ K.Mover(microMenuBar, "Menubar", "Menubar", { "BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -4, 4 })
- -- Generate Buttons
+ -- Define micro buttons
local buttonInfo = {
{ "CharacterMicroButton" },
- { "SpellbookMicroButton" },
- { "TalentMicroButton" },
+ { "ProfessionMicroButton" },
+ { "PlayerSpellsMicroButton" },
{ "AchievementMicroButton" },
{ "QuestLogMicroButton" },
{ "GuildMicroButton" },
@@ -175,24 +179,26 @@ function Module:MicroMenu()
{ "MainMenuMicroButton", MicroButtonTooltipText(MAINMENU_BUTTON, "TOGGLEGAMEMENU") },
}
+ -- Create micro buttons
for _, info in pairs(buttonInfo) do
- MicroButtonCreate(menubar, info)
+ CreateMicroButton(microMenuBar, info)
end
- -- Order Positions
- for i, buttonFrame in ipairs(buttonList) do
+ -- Arrange micro buttons
+ for i, buttonFrame in ipairs(MicroButtons) do
if i == 1 then
buttonFrame:SetPoint("LEFT")
else
- buttonFrame:SetPoint("LEFT", buttonList[i - 1], "RIGHT", 6, 0)
+ buttonFrame:SetPoint("LEFT", MicroButtons[i - 1], "RIGHT", 6, 0)
end
end
- -- Fix textures for buttons
+ -- Adjust MainMenuMicroButton textures
MainMenuMicroButton.MainMenuBarPerformanceBar:SetTexture(K.GetTexture(C["General"].Texture))
MainMenuMicroButton.MainMenuBarPerformanceBar:SetSize(16, 2)
MainMenuMicroButton.MainMenuBarPerformanceBar:SetPoint("BOTTOM", MainMenuMicroButton, "BOTTOM", 0, 0)
+ -- Skin CharacterMicroButton
if CharacterMicroButton then
local function SkinCharacterPortrait(self)
self.Portrait:SetPoint("TOPLEFT", self, "TOPLEFT", 2, -5)
@@ -203,11 +209,8 @@ function Module:MicroMenu()
hooksecurefunc(CharacterMicroButton, "SetNormal", SkinCharacterPortrait)
end
+ -- Hide HelpOpenWebTicketButton and BagsBar
K.HideInterfaceOption(HelpOpenWebTicketButton)
BagsBar:Hide()
BagsBar:UnregisterAllEvents()
-
- if MicroMenu and MicroMenu.UpdateHelpTicketButtonAnchor then
- MicroMenu.UpdateHelpTicketButtonAnchor = K.Noop
- end
end
diff --git a/KkthnxUI/Modules/ActionBars/Elements/Petbar.lua b/KkthnxUI/Modules/ActionBars/Elements/Petbar.lua
index 6db15fe1..b67154cd 100644
--- a/KkthnxUI/Modules/ActionBars/Elements/Petbar.lua
+++ b/KkthnxUI/Modules/ActionBars/Elements/Petbar.lua
@@ -20,12 +20,11 @@ local function hasPetActionHighlightMark(index)
end
function Module:UpdatePetBar()
- local petActionButton, petActionIcon, petAutoCastableTexture, petAutoCastShine
+ local petActionButton, petActionIcon, petAutoCastOverlay
for i = 1, NUM_PET_ACTION_SLOTS, 1 do
petActionButton = self.actionButtons[i]
petActionIcon = petActionButton.icon
- petAutoCastableTexture = petActionButton.AutoCastable
- petAutoCastShine = petActionButton.AutoCastShine
+ petAutoCastOverlay = petActionButton.AutoCastOverlay
local name, texture, isToken, isActive, autoCastAllowed, autoCastEnabled, spellID = GetPetActionInfo(i)
if not isToken then
petActionIcon:SetTexture(texture)
@@ -55,16 +54,8 @@ function Module:UpdatePetBar()
petActionButton:StopFlash()
petActionButton:SetChecked(false)
end
- if autoCastAllowed then
- petAutoCastableTexture:Show()
- else
- petAutoCastableTexture:Hide()
- end
- if autoCastEnabled then
- AutoCastShine_AutoCastStart(petAutoCastShine)
- else
- AutoCastShine_AutoCastStop(petAutoCastShine)
- end
+ petAutoCastOverlay:SetShown(autoCastAllowed)
+ petAutoCastOverlay:ShowAutoCastEnabled(autoCastEnabled)
if texture then
if GetPetActionSlotUsable(i) then
petActionIcon:SetVertexColor(1, 1, 1)
@@ -95,7 +86,7 @@ function Module:CreatePetbar()
local buttonList = {}
local frame = CreateFrame("Frame", "KKUI_ActionBarPet", UIParent, "SecureHandlerStateTemplate")
- frame.mover = K.Mover(frame, "Pet Actionbar", "PetBar", { "BOTTOM", _G.KKUI_ActionBar3, "TOP", 0, margin })
+ frame.mover = K.Mover(frame, "Pet Actionbar", "PetBar", { "BOTTOMLEFT", _G.KKUI_ActionBar3, "TOPLEFT", 0, margin })
Module.movers[10] = frame.mover
for i = 1, num do
diff --git a/KkthnxUI/Modules/Announcements/Elements/HealthAlert.lua b/KkthnxUI/Modules/Announcements/Elements/HealthAlert.lua
index 5cf336e3..37fc3690 100644
--- a/KkthnxUI/Modules/Announcements/Elements/HealthAlert.lua
+++ b/KkthnxUI/Modules/Announcements/Elements/HealthAlert.lua
@@ -10,9 +10,6 @@ local UnitHealth, UnitHealthMax = UnitHealth, UnitHealthMax
local UnitIsPlayer, UnitIsDead, UnitExists, UnitName = UnitIsPlayer, UnitIsDead, UnitExists, UnitName
local DoEmote, PlaySound = DoEmote, PlaySound
--- Timer Function
-local C_Timer_NewTicker = C_Timer.NewTicker
-
local playerNearDeath = false
local petNearDeath = false
local validPetClasses = { ["HUNTER"] = true, ["WARLOCK"] = true }
@@ -71,5 +68,7 @@ function Module:CreateHealthAnnounce()
return
end
- C_Timer_NewTicker(1, Module.SetupHealthAnnounce)
+ C_Timer.NewTicker(1, function()
+ Module:SetupHealthAnnounce()
+ end)
end
diff --git a/KkthnxUI/Modules/Announcements/Elements/Interrupt.lua b/KkthnxUI/Modules/Announcements/Elements/Interrupt.lua
index 46345a36..fa8aaae9 100644
--- a/KkthnxUI/Modules/Announcements/Elements/Interrupt.lua
+++ b/KkthnxUI/Modules/Announcements/Elements/Interrupt.lua
@@ -80,7 +80,7 @@ function Module:InterruptAlert_Toggle()
infoType["SPELL_STOLEN"] = C["Announcements"].DispellAlert and L["Steal"]
infoType["SPELL_DISPEL"] = C["Announcements"].DispellAlert and L["Dispel"]
infoType["SPELL_INTERRUPT"] = C["Announcements"].InterruptAlert and L["Interrupt"]
- infoType["SPELL_AURA_BROKEN_SPELL"] = C["Announcements"].BrokenAlert and L["BrokenSpell"]
+ infoType["SPELL_AURA_BROKEN_SPELL"] = C["Announcements"].BrokenAlert and L["Broken Spell"]
end
function Module:InterruptAlert_IsEnabled()
@@ -111,7 +111,7 @@ function Module:InterruptAlert_Update(...)
local infoText = infoType[eventType]
if infoText then
local sourceSpellID, destSpellID
- if infoText == L["BrokenSpell"] then
+ if infoText == L["Broken Spell"] then
if auraType and auraType == AURA_TYPE_BUFF or spellBlackList[spellID] then
return
end
@@ -129,7 +129,7 @@ function Module:InterruptAlert_Update(...)
end
if sourceSpellID and destSpellID then
- if infoText == L["BrokenSpell"] then
+ if infoText == L["Broken Spell"] then
SendChatMessage(string_format(infoText, sourceName, GetSpellLink(destSpellID)), getAlertChannel())
else
SendChatMessage(string_format(infoText, GetSpellLink(destSpellID)), getAlertChannel())
diff --git a/KkthnxUI/Modules/Announcements/Elements/ItemAlert.lua b/KkthnxUI/Modules/Announcements/Elements/ItemAlert.lua
index ad26e3ac..7312978a 100644
--- a/KkthnxUI/Modules/Announcements/Elements/ItemAlert.lua
+++ b/KkthnxUI/Modules/Announcements/Elements/ItemAlert.lua
@@ -9,75 +9,78 @@ local IsInGroup = IsInGroup
local SendChatMessage = SendChatMessage
local UnitName = UnitName
+-- Define player GUID and group units
local groupUnits = { ["player"] = true, ["pet"] = true }
-if IsInGroup() then
- if IsInRaid() then
- for i = 1, GetNumGroupMembers() do
- groupUnits["raid" .. i] = true
- groupUnits["raidpet" .. i] = true
- end
- else
- for i = 1, GetNumSubgroupMembers() do
- groupUnits["party" .. i] = true
- groupUnits["partypet" .. i] = true
- end
- end
+for i = 1, 4 do
+ groupUnits["party" .. i] = true
+ groupUnits["partypet" .. i] = true
+end
+for i = 1, 40 do
+ groupUnits["raid" .. i] = true
+ groupUnits["raidpet" .. i] = true
end
-local itemList = {
- [54710] = true, -- Portable mailbox
- [67826] = true, -- Kevis
- [226241] = true, -- Tranquility
- [256230] = true, -- Meditation scriptures
- [185709] = true, -- Caramel Fish Feast
- [259409] = true, -- Feast of sails
+-- Define important spells with IDs and descriptions
+local importantSpells = {
+ [54710] = true, -- Portable Mailbox
+ [67826] = true, -- Jeeves
+ [226241] = true, -- Tome of Tranquil Mind
+ [256230] = true, -- Codex of the Quiet Mind
+ [185709] = true, -- Sugar-Crusted Fish Feast
+ [199109] = true, -- Auto-Hammer
+ [259409] = true, -- Feast of the Fishes
[259410] = true, -- Captain's Feast
[276972] = true, -- Arcane Cauldron
- [286050] = true, -- blood meal
- [265116] = true, -- 8.0 Engineering Battle
- [308458] = true, -- Amazing meal
- [308462] = true, -- Indulge in a gluttonous feast
- [345130] = true, -- 9.0 Engineering Battle
+ [286050] = true, -- Blood Feast
+ [265116] = true, -- Engineering Battle Rez (BfA)
+ [308458] = true, -- Grand Feast
+ [308462] = true, -- Lavish Feast
+ [345130] = true, -- Engineering Battle Rez (Shadowlands)
[307157] = true, -- Eternal Cauldron
- [359336] = true, -- stone soup pot
- [324029] = true, -- Code of Peace of Mind
-
- [2825] = true, -- bloodthirsty
- [32182] = true, -- heroic
- [80353] = true, -- time warp
- [264667] = true, -- Primal Rage, pet
- [272678] = true, -- Primal Rage, Pet Mastery
+ [359336] = true, -- Stone Soup
+ [324029] = true, -- Tome of Tranquil Mind (Shadowlands)
+ [2825] = true, -- Bloodlust
+ [32182] = true, -- Heroism
+ [80353] = true, -- Time Warp
+ [264667] = true, -- Primal Rage (Pet)
+ [272678] = true, -- Primal Rage (Hunter Pet)
[178207] = true, -- Drums of Fury
- [230935] = true, -- Alpine War Drums
- [256740] = true, -- Vortex Drums
- [292686] = true, -- Thunderskin's Hammer
- [309658] = true, -- Death Brutal War Drum
+ [230935] = true, -- Drums of the Mountain
+ [256740] = true, -- Drums of the Maelstrom
+ [292686] = true, -- Drums of the Raging Tempest
+ [309658] = true, -- Drums of Deathly Ferocity
+ [390386] = true, -- Fury of the Aspects
}
-function Module:ItemAlert_Update(unit, castID, spellID)
- if groupUnits[unit] and itemList[spellID] and (itemList[spellID] ~= castID) then
- local message = string_format(L["Spell Item AlertStr"], UnitName(unit), GetSpellLink(spellID) or GetSpellInfo(spellID))
- SendChatMessage(message, K.CheckChat())
- itemList[spellID] = castID
+-- Function to handle spell cast alerts
+function Module:UpdateItemAlert(unit, castID, spellID)
+ if groupUnits[unit] and importantSpells[spellID] and (importantSpells[spellID] ~= castID) then
+ SendChatMessage(string_format("%s used %s", UnitName(unit), GetSpellLink(spellID) or GetSpellInfo(spellID)), K.CheckChat())
+ importantSpells[spellID] = castID
end
end
-function Module:ItemAlert_CheckGroup()
+-- Function to check if the player is in a group and register events accordingly
+function Module:CheckGroupStatus()
if IsInGroup() then
- K:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED", Module.ItemAlert_Update)
+ K:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED", Module.UpdateItemAlert)
else
- K:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED", Module.ItemAlert_Update)
+ K:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED", Module.UpdateItemAlert)
end
end
+-- Main function to handle spell and item alerts
function Module:CreateItemAnnounce()
+ Module.factionSpell = K.Faction == "Alliance" and 32182 or 2825
+ Module.factionSpell = GetSpellLink(Module.factionSpell)
+
if C["Announcements"].ItemAlert then
- self:ItemAlert_CheckGroup()
- K:RegisterEvent("GROUP_LEFT", self.ItemAlert_CheckGroup)
- K:RegisterEvent("GROUP_JOINED", self.ItemAlert_CheckGroup)
+ Module:CheckGroupStatus()
+ K:RegisterEvent("GROUP_LEFT", Module.CheckGroupStatus)
+ K:RegisterEvent("GROUP_JOINED", Module.CheckGroupStatus)
else
- K:UnregisterEvent("GROUP_LEFT", self.ItemAlert_CheckGroup)
- K:UnregisterEvent("GROUP_JOINED", self.ItemAlert_CheckGroup)
- K:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED", Module.ItemAlert_Update)
+ K:UnregisterEvent("GROUP_LEFT", Module.CheckGroupStatus)
+ K:UnregisterEvent("GROUP_JOINED", Module.CheckGroupStatus)
+ K:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED", Module.UpdateItemAlert)
end
end
diff --git a/KkthnxUI/Modules/Announcements/Elements/Keystone.lua b/KkthnxUI/Modules/Announcements/Elements/Keystone.lua
index 5ca6605e..0a0254d6 100644
--- a/KkthnxUI/Modules/Announcements/Elements/Keystone.lua
+++ b/KkthnxUI/Modules/Announcements/Elements/Keystone.lua
@@ -1,66 +1,110 @@
-local K, C = KkthnxUI[1], KkthnxUI[2]
+local K, C = unpack(KkthnxUI)
local Module = K:GetModule("Announcements")
-local gsub = gsub
-
+local strlower = strlower
+local C_Container_GetContainerItemID = C_Container.GetContainerItemID
+local C_Container_GetContainerItemLink = C_Container.GetContainerItemLink
+local C_Container_GetContainerNumSlots = C_Container.GetContainerNumSlots
local C_Item_IsItemKeystoneByID = C_Item.IsItemKeystoneByID
local C_MythicPlus_GetOwnedKeystoneChallengeMapID = C_MythicPlus.GetOwnedKeystoneChallengeMapID
local C_MythicPlus_GetOwnedKeystoneLevel = C_MythicPlus.GetOwnedKeystoneLevel
-local GetContainerItemID = _G.GetContainerItemID
-local GetContainerItemLink = _G.GetContainerItemLink
-local GetContainerNumSlots = _G.GetContainerNumSlots
-local NUM_BAG_SLOTS = NUM_BAG_SLOTS or 4
+local NUM_BAG_SLOTS = NUM_BAG_SLOTS
+
+local COOLDOWN_DURATION = 30 -- Cooldown duration in seconds
+local lastKeystoneMessageTime = 0 -- Initialize the last message time
+local lastKeystoneLinkTime = 0 -- Initialize the last link time
+
+local function getKeystoneLink()
+ for bagIndex = 0, NUM_BAG_SLOTS do
+ for slotIndex = 1, C_Container_GetContainerNumSlots(bagIndex) do
+ local itemID = C_Container_GetContainerItemID(bagIndex, slotIndex)
+ if itemID and C_Item_IsItemKeystoneByID(itemID) then
+ return C_Container_GetContainerItemLink(bagIndex, slotIndex)
+ end
+ end
+ end
+end
+
+local function sendKeystoneLink(channel)
+ local link = getKeystoneLink()
+ if link then
+ SendChatMessage(link, channel)
+ end
+end
-local keystoneCache = {}
+function Module.Keystone(event)
+ local currentTime = GetTime()
+ if currentTime - lastKeystoneMessageTime < COOLDOWN_DURATION then
+ return
+ end
+
+ lastKeystoneMessageTime = currentTime
-function Module.SetupKeystoneAnnounce(event)
- -- Get the current mapID and keystoneLevel for the player
local mapID = C_MythicPlus_GetOwnedKeystoneChallengeMapID()
local keystoneLevel = C_MythicPlus_GetOwnedKeystoneLevel()
- -- Check if the event is "PLAYER_ENTERING_WORLD"
if event == "PLAYER_ENTERING_WORLD" then
- -- K.Print("SetupKeystoneAnnounce", event)
- -- Set the initial values for keystoneCache table
- keystoneCache.mapID = mapID
- keystoneCache.keystoneLevel = keystoneLevel
- -- Check if the event is "CHALLENGE_MODE_COMPLETED"
- elseif event == "CHALLENGE_MODE_COMPLETED" then
- -- K.Print("SetupKeystoneAnnounce", event)
- -- Check if the mapID or keystoneLevel has changed from previous value
- if keystoneCache.mapID ~= mapID or keystoneCache.keystoneLevel ~= keystoneLevel then
- keystoneCache.mapID = mapID
- keystoneCache.keystoneLevel = keystoneLevel
- -- Iterate through all the bags and slots of player's inventory
- for bagIndex = 0, NUM_BAG_SLOTS do
- for slotIndex = 1, GetContainerNumSlots(bagIndex) do
- local itemID = GetContainerItemID(bagIndex, slotIndex)
- -- Check if item is a keystone
- if itemID and C_Item_IsItemKeystoneByID(itemID) then
- -- Construct the message using the item link
- local message = gsub("My new keystone is %keystone%.", "%%keystone%%", GetContainerItemLink(bagIndex, slotIndex))
- -- Send the message to party
+ Module.keystoneCache.mapID = mapID
+ Module.keystoneCache.keystoneLevel = keystoneLevel
+ K:UnregisterEvent("PLAYER_ENTERING_WORLD", Module.Keystone)
+ elseif event == "CHALLENGE_MODE_COMPLETED" or event == "ITEM_CHANGED" then
+ if Module.keystoneCache.mapID ~= mapID or Module.keystoneCache.keystoneLevel ~= keystoneLevel then
+ Module.keystoneCache.mapID = mapID
+ Module.keystoneCache.keystoneLevel = keystoneLevel
+
+ local link = getKeystoneLink()
+ if link then
+ local message = string.gsub("My new keystone is %keystone%.", "%%keystone%%", link)
+ C_Timer.After(1, function()
+ if IsPartyLFG() then
+ SendChatMessage(message, "INSTANCE_CHAT")
+ elseif IsInGroup() then
SendChatMessage(message, "PARTY")
end
- end
+ end)
end
end
end
end
-function Module.PEWKeystoneAnnounce()
- C_Timer.After(2, Module.SetupKeystoneAnnounce)
-end
+function Module.KeystoneLink(message, sender)
+ local currentTime = GetTime()
+ if currentTime - lastKeystoneLinkTime < COOLDOWN_DURATION then
+ return
+ end
+
+ lastKeystoneLinkTime = currentTime
-function Module.CMCKeystoneAnnounce()
- C_Timer.After(2, Module.SetupKeystoneAnnounce)
+ if strlower(sender) == "!keys" then
+ local channel
+ if message == "CHAT_MSG_PARTY" or message == "CHAT_MSG_PARTY_LEADER" then
+ channel = "PARTY"
+ elseif message == "CHAT_MSG_GUILD" then
+ channel = "GUILD"
+ elseif message == "CHAT_MSG_OFFICER" then
+ channel = "OFFICER"
+ end
+
+ if channel then
+ C_Timer.After(1, function() -- Adjust the delay duration as needed
+ sendKeystoneLink(channel)
+ end)
+ end
+ end
end
function Module:CreateKeystoneAnnounce()
- if not C["Announcements"].KeystoneAlert then
+ if IsAddOnLoaded("MythicKeyReporter") or not C["Announcements"].KeystoneAlert then
return
end
- K:RegisterEvent("PLAYER_ENTERING_WORLD", Module.PEWKeystoneAnnounce)
- K:RegisterEvent("CHALLENGE_MODE_COMPLETED", Module.CMCKeystoneAnnounce)
+ Module.keystoneCache = Module.keystoneCache or {}
+
+ K:RegisterEvent("CHAT_MSG_PARTY", Module.KeystoneLink)
+ K:RegisterEvent("CHAT_MSG_PARTY_LEADER", Module.KeystoneLink)
+ K:RegisterEvent("CHAT_MSG_GUILD", Module.KeystoneLink)
+ K:RegisterEvent("CHAT_MSG_OFFICER", Module.KeystoneLink)
+ K:RegisterEvent("ITEM_CHANGED", Module.Keystone)
+ K:RegisterEvent("PLAYER_ENTERING_WORLD", Module.Keystone)
+ K:RegisterEvent("CHALLENGE_MODE_COMPLETED", Module.Keystone)
end
diff --git a/KkthnxUI/Modules/Announcements/Elements/KillingBlow.lua b/KkthnxUI/Modules/Announcements/Elements/KillingBlow.lua
index 06acc0dd..59d24179 100644
--- a/KkthnxUI/Modules/Announcements/Elements/KillingBlow.lua
+++ b/KkthnxUI/Modules/Announcements/Elements/KillingBlow.lua
@@ -1,12 +1,12 @@
+-- Unpack the KkthnxUI Engine
local K, C = KkthnxUI[1], KkthnxUI[2]
-local Module = K:GetModule("Announcements")
-
--- Sourced: ElvUI Shadow & Light (Darth_Predator, Repooc)
+local Announcements = K:GetModule("Announcements")
+-- Cache Lua functions
local bit_band = bit.band
local math_random = math.random
-local table_wipe = table.wipe
+-- Cache WoW API functions
local BossBanner_BeginAnims = BossBanner_BeginAnims
local COMBATLOG_OBJECT_TYPE_PLAYER = COMBATLOG_OBJECT_TYPE_PLAYER
local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo
@@ -14,140 +14,75 @@ local DoEmote = DoEmote
local GetAchievementInfo = GetAchievementInfo
local GetBattlefieldScore = GetBattlefieldScore
local GetNumBattlefieldScores = GetNumBattlefieldScores
-local PlaySoundFile = PlaySoundFile
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
local TopBannerManager_Show = TopBannerManager_Show
-local UnitGUID = UnitGUID
local hooksecurefunc = hooksecurefunc
-local pvpEmoteList = {
- "ANGRY",
- "BARK",
- "BECKON",
- "BITE",
- "BONK",
- "BURP",
- "BYE",
- "CACKLE",
- "CALM",
- "CHUCKLE",
- "COMFORT",
- "CRACK",
- "CUDDLE",
- "CURTSEY",
- "FLEX",
- "GIGGLE",
- "GLOAT",
- "GRIN",
- "GROWL",
- "GUFFAW",
- "INSULT",
- "LAUGH",
- "LICK",
- "MOCK",
- "MOO",
- "MOON",
- "MOURN",
- "NO",
- "NOSEPICK",
- "PITY",
- "RASP",
- "ROAR",
- "ROFL",
- "RUDE",
- "SCRATCH",
- "SHOO",
- "SIGH",
- "SLAP",
- "SMIRK",
- "SNARL",
- "SNICKER",
- "SNIFF",
- "SNUB",
- "SOOTHE",
- "TAP",
- "TAUNT",
- "TEASE",
- "THANK",
- "THREATEN",
- "TICKLE",
- "VETO",
- "VIOLIN",
- "YAWN",
+-- List of PvP emotes
+-- stylua: ignore start
+local pvpEmotes = {
+ "ANGRY", "BARK", "BECKON", "BITE", "BONK", "BURP", "BYE", "CACKLE", "CALM", "CHUCKLE",
+ "COMFORT", "CRACK", "CUDDLE", "CURTSEY", "FLEX", "GIGGLE", "GLOAT", "GRIN", "GROWL",
+ "GUFFAW", "INSULT", "LAUGH", "LICK", "MOCK", "MOO", "MOON", "MOURN", "NO", "NOSEPICK",
+ "PITY", "RASP", "ROAR", "ROFL", "RUDE", "SCRATCH", "SHOO", "SIGH", "SLAP", "SMIRK",
+ "SNARL", "SNICKER", "SNIFF", "SNUB", "SOOTHE", "TAP", "TAUNT", "TEASE", "THANK",
+ "THREATEN", "TICKLE", "VETO", "VIOLIN", "YAWN"
}
+-- stylua: ignore end
--- Refactored code
-local BG_Opponents = {} -- Table to store opponents in the battleground
-
--- Function to populate BG_Opponents table with opponents from the battleground
-local function SetupOpponentsTable()
- table_wipe(BG_Opponents) -- Clear table before populating it
+local battlegroundOpponents = {} -- Table to store opponents in battlegrounds
- -- Iterate through all scores in the battleground
+-- Populate the battleground opponents table
+function Announcements:BuildBattlegroundOpponents()
+ table.wipe(battlegroundOpponents)
for index = 1, GetNumBattlefieldScores() do
local name, _, _, _, _, faction, _, _, classToken = GetBattlefieldScore(index)
- if not name then
- return
- end
-
- -- Check if the faction of the current score is equal to player's faction and add it to BG_Opponents table if so
if (K.Faction == "Horde" and faction == 1) or (K.Faction == "Alliance" and faction == 0) then
- BG_Opponents[name] = classToken
+ battlegroundOpponents[name] = classToken
end
end
end
-local function SetupKillingBlow()
- -- Get the current combat log event info
- local _, subevent, sourceGUID, _, Caster, _, _, _, TargetName, TargetFlags = CombatLogGetCurrentEventInfo()
+-- Handle combat log events for killing blows
+function Announcements:OnCombatLogEvent()
+ local _, eventType, _, _, caster, _, _, _, targetName, targetFlags = CombatLogGetCurrentEventInfo()
- -- Check if the event is a party kill and the source of the kill is the player
- if subevent == "PARTY_KILL" and sourceGUID == UnitGUID("player") then
- -- Get the target type (player or NPC) from the target flags
- local mask = bit_band(TargetFlags, COMBATLOG_OBJECT_TYPE_PLAYER)
+ if eventType == "PARTY_KILL" and caster == K.Name then
+ local isPlayer = bit_band(targetFlags, COMBATLOG_OBJECT_TYPE_PLAYER) > 0
+ local isBattlegroundOpponent = battlegroundOpponents[targetName] ~= nil
- -- Check if caster is player and target is either an opponent in a battleground or a player
- if Caster == K.Name and (BG_Opponents[TargetName] or mask > 0) then
- -- If target is a player in a battleground add class color to name
- if mask > 0 and BG_Opponents[TargetName] then
- TargetName = "|c" .. RAID_CLASS_COLORS[BG_Opponents[TargetName]].colorStr .. TargetName .. "|r" or TargetName
- TargetName = TargetName
+ if isPlayer or isBattlegroundOpponent then
+ if isBattlegroundOpponent then
+ local classColor = RAID_CLASS_COLORS[battlegroundOpponents[targetName]]
+ targetName = string.format("|c%s%s|r", classColor.colorStr, targetName)
end
- -- Check if Killing Blow announcement is enabled in settings
if C["Announcements"].KillingBlow then
- -- Show BossBanner with name of killed target
- TopBannerManager_Show(_G["BossBanner"], { name = TargetName, mode = "PVPKILL" })
+ TopBannerManager_Show(_G.BossBanner, { name = targetName, mode = "KKUI_PVPKILL" })
end
- -- Check if PvP Emote announcement is enabled in settings
if C["Announcements"].PvPEmote then
- -- Check if achievement for killing 1000 players has been completed
- if select(4, GetAchievementInfo(247)) then
- -- Fire off random emote to keep it interesting
- DoEmote(pvpEmoteList[math_random(1, #pvpEmoteList)], TargetName)
-
- -- If achievement has not been completed fire off hug emote
- else
- DoEmote("HUG", TargetName)
- end
+ local _, _, _, hasAchievement = GetAchievementInfo(247)
+ local emote = hasAchievement and pvpEmotes[math_random(#pvpEmotes)] or "hug"
+ DoEmote(emote, targetName)
end
end
end
end
-function Module:CreateKillingBlow()
- hooksecurefunc(_G["BossBanner"], "PlayBanner", function(self, data)
- if data and data.mode == "PVPKILL" then
+-- Setup the killing blow announcement system
+function Announcements:SetupKillingBlowAnnounce()
+ hooksecurefunc(_G.BossBanner, "PlayBanner", function(self, data)
+ if data and data.mode == "KKUI_PVPKILL" then
self.Title:SetText(data.name)
self.Title:Show()
self.SubTitle:Hide()
self:Show()
BossBanner_BeginAnims(self)
- PlaySoundFile("Interface\\AddOns\\KkthnxUI\\Media\\Sounds\\KillingBlow.ogg", "Master")
+ PlaySound(SOUNDKIT.UI_RAID_BOSS_DEFEATED)
end
end)
- K:RegisterEvent("UPDATE_BATTLEFIELD_SCORE", SetupOpponentsTable)
- K:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED", SetupKillingBlow)
+ K:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED", self.OnCombatLogEvent)
+ K:RegisterEvent("UPDATE_BATTLEFIELD_SCORE", self.BuildBattlegroundOpponents)
end
diff --git a/KkthnxUI/Modules/Announcements/Elements/QuestNotifier.lua b/KkthnxUI/Modules/Announcements/Elements/QuestNotifier.lua
index 1ddffd4d..a678e872 100644
--- a/KkthnxUI/Modules/Announcements/Elements/QuestNotifier.lua
+++ b/KkthnxUI/Modules/Announcements/Elements/QuestNotifier.lua
@@ -1,260 +1,207 @@
local K, C = KkthnxUI[1], KkthnxUI[2]
local Module = K:GetModule("Announcements")
-local math_floor = math.floor
+-- Cache Lua functions and constants
+local floor = math.floor
local mod = mod
local pairs = pairs
-local string_find = string.find
-local string_format = string.format
-local string_gsub = string.gsub
-local string_match = string.match
-local table_wipe = table.wipe
+local find = string.find
+local format = string.format
+local gsub = string.gsub
+local match = string.match
+local wipe = table.wipe
local tonumber = tonumber
+-- Cache WoW API functions and constants
local COLLECTED = COLLECTED
-local C_QuestLog_GetInfo = C_QuestLog.GetInfo
-local C_QuestLog_GetLogIndexForQuestID = C_QuestLog.GetLogIndexForQuestID
-local C_QuestLog_GetNumQuestLogEntries = C_QuestLog.GetNumQuestLogEntries
-local C_QuestLog_GetQuestIDForLogIndex = C_QuestLog.GetQuestIDForLogIndex
-local C_QuestLog_GetQuestTagInfo = C_QuestLog.GetQuestTagInfo
-local C_QuestLog_GetTitleForQuestID = C_QuestLog.GetTitleForQuestID
-local C_QuestLog_IsComplete = C_QuestLog.IsComplete
-local C_QuestLog_IsWorldQuest = C_QuestLog.IsWorldQuest
+local GetQuestInfo = C_QuestLog.GetInfo
+local GetQuestLogIndexForQuestID = C_QuestLog.GetLogIndexForQuestID
+local GetNumQuestLogEntries = C_QuestLog.GetNumQuestLogEntries
+local GetQuestIDForLogIndex = C_QuestLog.GetQuestIDForLogIndex
+local GetQuestTagInfo = C_QuestLog.GetQuestTagInfo
+local GetTitleForQuestID = C_QuestLog.GetTitleForQuestID
+local IsQuestComplete = C_QuestLog.IsComplete
+local IsWorldQuest = C_QuestLog.IsWorldQuest
local DAILY = DAILY
-local ERR_QUEST_ADD_FOUND_SII = ERR_QUEST_ADD_FOUND_SII
-local ERR_QUEST_ADD_ITEM_SII = ERR_QUEST_ADD_ITEM_SII
-local ERR_QUEST_ADD_KILL_SII = ERR_QUEST_ADD_KILL_SII
-local ERR_QUEST_ADD_PLAYER_KILL_SII = ERR_QUEST_ADD_PLAYER_KILL_SII
-local ERR_QUEST_COMPLETE_S = ERR_QUEST_COMPLETE_S
-local ERR_QUEST_FAILED_S = ERR_QUEST_FAILED_S
-local ERR_QUEST_OBJECTIVE_COMPLETE_S = ERR_QUEST_OBJECTIVE_COMPLETE_S
+local ERR_ADD_FOUND_SII = ERR_QUEST_ADD_FOUND_SII
+local ERR_ADD_ITEM_SII = ERR_QUEST_ADD_ITEM_SII
+local ERR_ADD_KILL_SII = ERR_QUEST_ADD_KILL_SII
+local ERR_ADD_PLAYER_KILL_SII = ERR_QUEST_ADD_PLAYER_KILL_SII
+local ERR_COMPLETE_S = ERR_QUEST_COMPLETE_S
+local ERR_FAILED_S = ERR_QUEST_FAILED_S
+local ERR_OBJECTIVE_COMPLETE_S = ERR_QUEST_OBJECTIVE_COMPLETE_S
local GetQuestLink = GetQuestLink
local IsInGroup = IsInGroup
local IsInRaid = IsInRaid
local IsPartyLFG = IsPartyLFG
-local LE_QUEST_FREQUENCY_DAILY = Enum.QuestFrequency.Daily
-local LE_QUEST_TAG_TYPE_PROFESSION = Enum.QuestTagType.Profession
+local QUEST_FREQUENCY_DAILY = Enum.QuestFrequency.Daily
+local QUEST_TAG_TYPE_PROFESSION = Enum.QuestTagType.Profession
local PlaySound = PlaySound
local SendChatMessage = SendChatMessage
-local soundKitID = 6199 -- https://wowhead.com/sound=6199/b-peonbuildingcomplete1
+-- Sound Kit ID
+local questCompleteSoundID = 6199 -- https://wowhead.com/sound=6199/b-peonbuildingcomplete1
---[[
- 26905 -- https://www.wowhead.com/sound=26905/ui-questobjectivescomplete
-]]
-
--- Boolean flag to indicate whether debug mode is enabled or not
-local debugMode = false
--- Table to cache world quest IDs to prevent duplicate announcements
-local WQcache = {}
--- Table to store completed quest IDs to prevent duplicate announcements
-local completedQuest = {}
--- Variable to indicate whether initial quest checking is complete
-local initComplete
+-- Flags and caches
+local debugMode = false -- Indicates if debug mode is enabled
+local worldQuestCache = {} -- Cache for world quest IDs
+local completedQuests = {} -- Cache for completed quest IDs
+local initialCheckComplete = false -- Indicates if initial quest check is complete
-- Get the quest link or the quest name
local function GetQuestLinkOrName(questID)
- -- Get the quest link by quest ID
- -- If it is not returned, get the quest title by quest ID
- -- If it is not returned, return an empty string
- return GetQuestLink(questID) or C_QuestLog_GetTitleForQuestID(questID) or ""
+ return GetQuestLink(questID) or GetTitleForQuestID(questID) or ""
end
-- Get the text for the quest acceptance message
-local function acceptText(questID, daily)
- -- Get the title of the quest
- local title = GetQuestLinkOrName(questID)
- -- If the quest is a daily quest, format the message with "Accepted" and "Daily"
- if daily then
- return string_format("%s [%s]%s", "Accepted", DAILY, title)
- -- If the quest is not a daily quest, format the message with "Accepted"
+local function GetQuestAcceptText(questID, isDaily)
+ local questTitle = GetQuestLinkOrName(questID)
+ if isDaily then
+ return format("%s [%s]%s", "Accepted", DAILY, questTitle)
else
- return string_format("%s %s", "Accepted", title)
+ return format("%s %s", "Accepted", questTitle)
end
end
-- Get the text for the quest completion message
-local function completeText(questID)
- -- Play a sound
- PlaySound(soundKitID, "Master")
- -- Format the message with "Completed" and the quest title
- return string_format("%s %s", "Completed", GetQuestLinkOrName(questID))
+local function GetQuestCompleteText(questID)
+ PlaySound(questCompleteSoundID, "Master")
+ return format("%s %s", "Completed", GetQuestLinkOrName(questID))
end
-- Send message to the appropriate channel
-local function sendQuestMsg(msg)
- -- If OnlyCompleteRing is true, return
+local function SendQuestMessage(message)
if C["Announcements"].OnlyCompleteRing then
return
end
- -- If debug mode is enabled, print the message in the chat
- -- If the player is in a LFG party, send the message to the instance chat
- -- If the player is in a raid, send the message to the raid chat
- -- If the player is in a group, send the message to the party chat
if debugMode and K.isDeveloper then
- print(msg)
+ print(message)
elseif IsPartyLFG() then
- SendChatMessage(msg, "INSTANCE_CHAT")
+ SendChatMessage(message, "INSTANCE_CHAT")
elseif IsInRaid() then
- SendChatMessage(msg, "RAID")
+ SendChatMessage(message, "RAID")
elseif IsInGroup() then
- SendChatMessage(msg, "PARTY")
+ SendChatMessage(message, "PARTY")
end
end
-- Get the pattern for a given quest match
-local function getPattern(pattern)
- -- Escape any special characters in the pattern
- pattern = string_gsub(pattern, "%(", "%%%1")
- pattern = string_gsub(pattern, "%)", "%%%1")
- -- Replace any wildcard characters with capture groups
- pattern = string_gsub(pattern, "%%%d?$?.", "(.+)")
- -- Format the pattern to match the entire string
- return string_format("^%s$", pattern)
+local function CreateQuestPattern(pattern)
+ pattern = gsub(pattern, "%(", "%%%1")
+ pattern = gsub(pattern, "%)", "%%%1")
+ pattern = gsub(pattern, "%%%d?$?.", "(.+)")
+ return format("^%s$", pattern)
end
-- Table of quest match patterns
-local questMatches = {
- ["Found"] = getPattern(ERR_QUEST_ADD_FOUND_SII),
- ["Item"] = getPattern(ERR_QUEST_ADD_ITEM_SII),
- ["Kill"] = getPattern(ERR_QUEST_ADD_KILL_SII),
- ["PKill"] = getPattern(ERR_QUEST_ADD_PLAYER_KILL_SII),
- ["ObjectiveComplete"] = getPattern(ERR_QUEST_OBJECTIVE_COMPLETE_S),
- ["QuestComplete"] = getPattern(ERR_QUEST_COMPLETE_S),
- ["QuestFailed"] = getPattern(ERR_QUEST_FAILED_S),
+local questMatchPatterns = {
+ ["Found"] = CreateQuestPattern(ERR_ADD_FOUND_SII),
+ ["Item"] = CreateQuestPattern(ERR_ADD_ITEM_SII),
+ ["Kill"] = CreateQuestPattern(ERR_ADD_KILL_SII),
+ ["PKill"] = CreateQuestPattern(ERR_ADD_PLAYER_KILL_SII),
+ ["ObjectiveComplete"] = CreateQuestPattern(ERR_OBJECTIVE_COMPLETE_S),
+ ["QuestComplete"] = CreateQuestPattern(ERR_COMPLETE_S),
+ ["QuestFailed"] = CreateQuestPattern(ERR_FAILED_S),
}
-function Module:FindQuestProgress(_, msg)
- -- Check if the option to announce quest progress is disabled, if so, exit the function
- if not C["Announcements"].QuestProgress then
+-- Find quest progress based on UI message
+function Module:FindQuestProgress(_, message)
+ if not C["Announcements"].QuestProgress or C["Announcements"].OnlyCompleteRing then
return
end
- -- Check if the option to only announce quest progress when the ring is complete is enabled, if so, exit the function
- if C["Announcements"].OnlyCompleteRing then
- return
- end
-
- -- Iterate through the patterns in the `questMatches` table
- for _, pattern in pairs(questMatches) do
- -- Check if the message matches any of the patterns
- if string_match(msg, pattern) then
- -- Get the current and max values from the message
- local _, _, _, cur, max = string_find(msg, "(.*)[:]%s*([-%d]+)%s*/%s*([-%d]+)%s*$")
- -- Convert the values to numbers
- cur, max = tonumber(cur), tonumber(max)
- if cur and max and max >= 10 then
- -- Check if the progress is a multiple of the max value divided by 5
- if mod(cur, math_floor(max / 5)) == 0 then
- -- Send the message using `sendQuestMsg` function
- sendQuestMsg(msg)
+ for _, pattern in pairs(questMatchPatterns) do
+ if match(message, pattern) then
+ local _, _, _, current, maximum = find(message, "(.*)[:]%s*([-%d]+)%s*/%s*([-%d]+)%s*$")
+ current, maximum = tonumber(current), tonumber(maximum)
+ if current and maximum and maximum >= 10 then
+ if mod(current, floor(maximum / 5)) == 0 then
+ SendQuestMessage(message)
end
else
- -- Send the message using `sendQuestMsg` function
- sendQuestMsg(msg)
+ SendQuestMessage(message)
end
break
end
end
end
-function Module:FindQuestAccept(questID)
- -- Check if questID is nil, if so, exit the function
+-- Handle quest acceptance
+function Module:HandleQuestAccept(questID)
if not questID then
return
end
-
- -- Check if the quest is a world quest and it has been cached before, if so, exit the function
- if C_QuestLog_IsWorldQuest(questID) and WQcache[questID] then
+ if IsWorldQuest(questID) and worldQuestCache[questID] then
return
end
- -- Cache the world quest
- WQcache[questID] = true
- -- Get the tag info for the quest
- local tagInfo = C_QuestLog_GetQuestTagInfo(questID)
- -- Check if the quest is a profession quest, if so, exit the function
- if tagInfo and tagInfo.worldQuestType == LE_QUEST_TAG_TYPE_PROFESSION then
+ worldQuestCache[questID] = true
+ local questTagInfo = GetQuestTagInfo(questID)
+ if questTagInfo and questTagInfo.worldQuestType == QUEST_TAG_TYPE_PROFESSION then
return
end
- -- Get the quest log index for the quest ID
- local questLogIndex = C_QuestLog_GetLogIndexForQuestID(questID)
- -- Check if the quest log index is valid
+ local questLogIndex = GetQuestLogIndexForQuestID(questID)
if questLogIndex then
- -- Get the information for the quest
- local info = C_QuestLog_GetInfo(questLogIndex)
- -- Check if the information is valid
- if info then
- -- Send the message using `sendQuestMsg` function with the quest ID and whether the quest is a daily quest as parameters
- sendQuestMsg(acceptText(questID, info.frequency == LE_QUEST_FREQUENCY_DAILY))
+ local questInfo = GetQuestInfo(questLogIndex)
+ if questInfo then
+ SendQuestMessage(GetQuestAcceptText(questID, questInfo.frequency == QUEST_FREQUENCY_DAILY))
end
end
end
-function Module:FindQuestComplete()
- -- Loop through all quests in player's quest log
- for i = 1, C_QuestLog_GetNumQuestLogEntries() do
- -- Get the quest ID for the current log index
- local questID = C_QuestLog_GetQuestIDForLogIndex(i)
- -- Check if the quest is complete
- local isComplete = questID and C_QuestLog_IsComplete(questID)
- -- Check if the quest is not a world quest and it is not marked as completed before
- if isComplete and not completedQuest[questID] and not C_QuestLog_IsWorldQuest(questID) then
- -- Check if this function has been called before
- if initComplete then
- -- Send the message using `sendQuestMsg` function with the quest ID as parameter
- sendQuestMsg(completeText(questID))
+-- Handle quest completion
+function Module:HandleQuestCompletion()
+ for i = 1, GetNumQuestLogEntries() do
+ local questID = GetQuestIDForLogIndex(i)
+ local isQuestComplete = questID and IsQuestComplete(questID)
+ if isQuestComplete and not completedQuests[questID] and not IsWorldQuest(questID) then
+ if initialCheckComplete then
+ SendQuestMessage(GetQuestCompleteText(questID))
end
- -- Mark the quest as completed
- completedQuest[questID] = true
+ completedQuests[questID] = true
end
end
- -- Set the `initComplete` variable to true
- initComplete = true
+ initialCheckComplete = true
end
-function Module:FindWorldQuestComplete(questID)
- -- Check if the passed quest ID is a world quest
- if C_QuestLog_IsWorldQuest(questID) then
- -- Check if the quest is not marked as completed before
- if questID and not completedQuest[questID] then
- -- Send the message using `sendQuestMsg` function with the quest ID as parameter
- sendQuestMsg(completeText(questID))
- -- Mark the quest as completed
- completedQuest[questID] = true
- end
+-- Handle world quest completion
+function Module:HandleWorldQuestCompletion(questID)
+ if IsWorldQuest(questID) and questID and not completedQuests[questID] then
+ SendQuestMessage(GetQuestCompleteText(questID))
+ completedQuests[questID] = true
end
end
-- Dragon glyph notification
-local glyphAchievements = {
+local dragonGlyphAchievements = {
[16575] = true, -- Awakened Coast
[16576] = true, -- Ounhara Plains
[16577] = true, -- Blueridge Woods
[16578] = true, -- Sodra Sulcus
}
-function Module:FindDragonGlyph(achievementID, criteriaString)
- if glyphAchievements[achievementID] then
- sendQuestMsg(criteriaString .. " " .. COLLECTED)
+function Module:HandleDragonGlyph(achievementID, criteriaString)
+ if dragonGlyphAchievements[achievementID] then
+ SendQuestMessage(criteriaString .. " " .. COLLECTED)
end
end
+-- Create or destroy quest notifier based on settings
function Module:CreateQuestNotifier()
if C["Announcements"].QuestNotifier and not K.CheckAddOnState("QuestNotifier") then
- K:RegisterEvent("QUEST_ACCEPTED", Module.FindQuestAccept)
- K:RegisterEvent("QUEST_LOG_UPDATE", Module.FindQuestComplete)
- K:RegisterEvent("QUEST_TURNED_IN", Module.FindWorldQuestComplete)
+ K:RegisterEvent("QUEST_ACCEPTED", Module.HandleQuestAccept)
+ K:RegisterEvent("QUEST_LOG_UPDATE", Module.HandleQuestCompletion)
+ K:RegisterEvent("QUEST_TURNED_IN", Module.HandleWorldQuestCompletion)
K:RegisterEvent("UI_INFO_MESSAGE", Module.FindQuestProgress)
- K:RegisterEvent("CRITERIA_EARNED", Module.FindDragonGlyph)
+ K:RegisterEvent("CRITERIA_EARNED", Module.HandleDragonGlyph)
else
- table_wipe(completedQuest)
- K:UnregisterEvent("QUEST_ACCEPTED", Module.FindQuestAccept)
- K:UnregisterEvent("QUEST_LOG_UPDATE", Module.FindQuestComplete)
- K:UnregisterEvent("QUEST_TURNED_IN", Module.FindWorldQuestComplete)
+ wipe(completedQuests)
+ K:UnregisterEvent("QUEST_ACCEPTED", Module.HandleQuestAccept)
+ K:UnregisterEvent("QUEST_LOG_UPDATE", Module.HandleQuestCompletion)
+ K:UnregisterEvent("QUEST_TURNED_IN", Module.HandleWorldQuestCompletion)
K:UnregisterEvent("UI_INFO_MESSAGE", Module.FindQuestProgress)
- K:UnregisterEvent("CRITERIA_EARNED", Module.FindDragonGlyph)
+ K:UnregisterEvent("CRITERIA_EARNED", Module.HandleDragonGlyph)
end
end
diff --git a/KkthnxUI/Modules/Announcements/Elements/RareAlert.lua b/KkthnxUI/Modules/Announcements/Elements/RareAlert.lua
index 82c663ec..41cc0e26 100644
--- a/KkthnxUI/Modules/Announcements/Elements/RareAlert.lua
+++ b/KkthnxUI/Modules/Announcements/Elements/RareAlert.lua
@@ -1,10 +1,7 @@
local K, C, L = KkthnxUI[1], KkthnxUI[2], KkthnxUI[3]
local Module = K:GetModule("Announcements")
-local string_find = string.find
-local string_format = string.format
-local table_wipe = table.wipe
-
+-- Use local functions directly instead of assigning them to variables
local C_Map_GetBestMapForUnit = C_Map.GetBestMapForUnit
local C_Texture_GetAtlasInfo = C_Texture.GetAtlasInfo
local C_VignetteInfo_GetVignetteInfo = C_VignetteInfo.GetVignetteInfo
@@ -27,27 +24,27 @@ local isIgnoredIDs = { -- todo: add option for this
[5485] = true,
}
+-- Function to check if the vignette atlas is useful
local function isUsefulAtlas(info)
local atlas = info.atlasName
- if atlas then
- return string_find(atlas, "[Vv]ignette") or (atlas == "nazjatar-nagaevent")
- end
+ return atlas and (string.find(atlas, "[Vv]ignette") or atlas == "nazjatar-nagaevent")
end
+-- Function to handle rare alerts
function Module:RareAlert_Update(id)
+ -- Check if the ID exists or is already in the cache
if not id or RareAlertCache[id] then
return
end
local info = C_VignetteInfo_GetVignetteInfo(id)
- if not info or not isUsefulAtlas(info) or isIgnoredIDs[info.vignetteID] then
+ -- Check if the info exists, the atlas is useful, and the ID is not ignored
+ if not info or not isUsefulAtlas(info) or isIgnoredIDs[id] then
return
end
- -- Use the vignetteGUID and name from the payload to get more information about the vignette
- local vignetteGUID = info.vignetteGUID
+ -- Get additional info about the vignette
local vignetteName = info.name
-
local atlasInfo = C_Texture_GetAtlasInfo(info.atlasName)
if not atlasInfo then
return
@@ -58,42 +55,47 @@ function Module:RareAlert_Update(id)
return
end
+ -- Display alert message
UIErrorsFrame:AddMessage(K.SystemColor .. tex .. L["Rare Spotted"] .. K.InfoColor .. "[" .. (vignetteName or "") .. "]" .. K.SystemColor .. "!")
if C["Announcements"].AlertInChat then
- local currrentTime = C["Chat"].TimestampFormat.Value == 1 and K.GreyColor .. "[" .. date("%H:%M:%S") .. "]" or ""
+ local currentTime = C["Chat"].TimestampFormat.Value == 1 and K.GreyColor .. "[" .. date("%H:%M:%S") .. "]" or ""
local mapID = C_Map_GetBestMapForUnit("player")
- local position = mapID and C_VignetteInfo_GetVignettePosition(vignetteGUID, mapID)
+ local position = mapID and C_VignetteInfo_GetVignettePosition(info.vignetteGUID, mapID)
local nameString = ""
if position then
local x, y = position:GetXY()
- nameString = string_format(Module.RareString, mapID, x * 10000, y * 10000, info.name, x * 100, y * 100, "")
+ nameString = string.format(Module.RareString, mapID, x * 10000, y * 10000, info.name, x * 100, y * 100, "")
end
- K.Print(currrentTime .. K.SystemColor .. tex .. L["Rare Spotted"] .. K.InfoColor .. (nameString or vignetteName or "") .. K.SystemColor .. "!")
+ K.Print(currentTime .. K.SystemColor .. tex .. L["Rare Spotted"] .. K.InfoColor .. (nameString or vignetteName or "") .. K.SystemColor .. "!")
end
- -- Add a choice in sounds the user can pick from. Have the community vote on 5 sounds???
+ -- Play sound alert if enabled
if not C["Announcements"].AlertInWild or Module.RareInstType == "none" then
PlaySound(37881, "master")
end
RareAlertCache[id] = true
+ -- Limit the size of the cache
if #RareAlertCache > 666 then
- table_wipe(RareAlertCache)
+ table.wipe(RareAlertCache)
end
end
+-- Function to check the instance type for rare alerts
function Module:RareAlert_CheckInstance()
local _, instanceType, _, _, maxPlayers, _, _, instID = GetInstanceInfo()
local shouldIgnore = (instID and isIgnoredZone[instID]) or (instanceType == "scenario" and (maxPlayers == 3 or maxPlayers == 6))
if shouldIgnore then
+ -- Unregister event if the instance should be ignored
if Module.RareInstType ~= "none" then
K:UnregisterEvent("VIGNETTE_MINIMAP_UPDATED", Module.RareAlert_Update)
Module.RareInstType = "none"
end
else
+ -- Register event if the instance should not be ignored
if Module.RareInstType ~= instanceType then
K:RegisterEvent("VIGNETTE_MINIMAP_UPDATED", Module.RareAlert_Update)
Module.RareInstType = instanceType
@@ -101,6 +103,7 @@ function Module:RareAlert_CheckInstance()
end
end
+-- Function to create rare announcements
function Module:CreateRareAnnounce()
Module.RareString = "|Hworldmap:%d+:%d+:%d+|h[%s (%.1f, %.1f)%s]|h|r"
@@ -108,7 +111,8 @@ function Module:CreateRareAnnounce()
Module:RareAlert_CheckInstance()
K:RegisterEvent("UPDATE_INSTANCE_INFO", Module.RareAlert_CheckInstance)
else
- table_wipe(RareAlertCache)
+ -- Clear cache and unregister events if rare alerts are disabled
+ table.wipe(RareAlertCache)
K:UnregisterEvent("VIGNETTE_MINIMAP_UPDATED", Module.RareAlert_Update)
K:UnregisterEvent("UPDATE_INSTANCE_INFO", Module.RareAlert_CheckInstance)
end
diff --git a/KkthnxUI/Modules/Announcements/Elements/ResetInstance.lua b/KkthnxUI/Modules/Announcements/Elements/ResetInstance.lua
index f91f7abe..e0acd89a 100644
--- a/KkthnxUI/Modules/Announcements/Elements/ResetInstance.lua
+++ b/KkthnxUI/Modules/Announcements/Elements/ResetInstance.lua
@@ -15,17 +15,11 @@ local resetMessageList = {
-- Function that sets up instance reset messages
local function SetupResetInstance(_, text)
- -- Iterate through each system message and friendly message in resetMessageList table
for systemMessage, friendlyMessage in pairs(resetMessageList) do
- -- Get the system message from global variable
systemMessage = _G[systemMessage]
- -- Check if the input text matches the system message
if string_match(text, string_gsub(systemMessage, "%%s", ".+")) then
- -- Extract the instance name from the text
local instance = string_match(text, string_gsub(systemMessage, "%%s", "(.+)"))
- -- Send the friendly message to the appropriate chat channel
SendChatMessage(string_format(friendlyMessage, instance), K.CheckChat())
- -- Exit the function once the message has been sent
return
end
end
diff --git a/KkthnxUI/Modules/Announcements/Elements/Sapped.lua b/KkthnxUI/Modules/Announcements/Elements/Sapped.lua
index 1f3a6b2a..c525ccd0 100644
--- a/KkthnxUI/Modules/Announcements/Elements/Sapped.lua
+++ b/KkthnxUI/Modules/Announcements/Elements/Sapped.lua
@@ -1,29 +1,24 @@
local K, C, L = KkthnxUI[1], KkthnxUI[2], KkthnxUI[3]
local Module = K:GetModule("Announcements")
+-- Cache WoW API functions
local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo
local SendChatMessage = SendChatMessage
local UNKNOWN = UNKNOWN
--- SetupSaySapped() checks for when Sap is applied or refreshed on the player, and then sends a chat message and prints a message in the chat window.
-local function SetupSaySapped()
- -- Get combat log info for the current event.
- local _, event, _, _, sourceName, _, _, _, destName, spellID = CombatLogGetCurrentEventInfo()
+local function HandleSapEvent()
+ local _, eventType, _, _, sourceName, _, _, _, destName, spellID = CombatLogGetCurrentEventInfo()
- -- If the spellID is Sap (6770), the destination name is the player's name and the event type is either "SPELL_AURA_APPLIED" or "SPELL_AURA_REFRESH", then execute this code.
- if (spellID == 6770) and (destName == K.Name) and (event == "SPELL_AURA_APPLIED" or event == "SPELL_AURA_REFRESH") then
- -- Send a chat message saying "Sapped".
+ if (spellID == 6770) and (destName == K.Name) and (eventType == "SPELL_AURA_APPLIED" or eventType == "SPELL_AURA_REFRESH") then
SendChatMessage(L["Sapped"], "SAY")
-
- -- Print a message in the chat window saying " sapped you!" where is either the source name or UNKNOWN if it can't be determined.
K.Print(L["SappedBy"] .. (sourceName or UNKNOWN))
end
end
-function Module:CreateSaySappedAnnounce()
- if not C["Announcements"].SaySapped then
- K:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED", SetupSaySapped)
+function Module:ToggleSapAnnounce()
+ if C["Announcements"].SaySapped then
+ K:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED", HandleSapEvent)
else
- K:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED", SetupSaySapped)
+ K:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED", HandleSapEvent)
end
end
diff --git a/KkthnxUI/Modules/Auras/Elements/AuraWatch.lua b/KkthnxUI/Modules/Auras/Elements/AuraWatch.lua
index d440cb62..9c406a98 100644
--- a/KkthnxUI/Modules/Auras/Elements/AuraWatch.lua
+++ b/KkthnxUI/Modules/Auras/Elements/AuraWatch.lua
@@ -106,11 +106,11 @@ local function ConvertTable()
end
for _, v in pairs(C.AuraWatchList[K.Class]) do
- if v.Name == "Player Aura" then
- InsertData(1, v.List)
- elseif v.Name == "Target Aura" then
- InsertData(3, v.List)
- elseif v.Name == "Special Aura" then
+ -- if v.Name == "Player Aura" then
+ -- InsertData(1, v.List)
+ -- elseif v.Name == "Target Aura" then
+ -- InsertData(3, v.List)
+ if v.Name == "Special Aura" then
InsertData(2, v.List)
elseif v.Name == "Focus Aura" then
InsertData(5, v.List)
@@ -556,9 +556,9 @@ function Module:AuraWatch_SetupAura(KEY, unit, index, filter, name, icon, count,
if frame.glowFrame then
if flash then
- K.LibCustomGlow.ButtonGlow_Start(frame.glowFrame)
+ K.ShowOverlayGlow(frame.glowFrame)
else
- K.LibCustomGlow.ButtonGlow_Stop(frame.glowFrame)
+ K.HideOverlayGlow(frame.glowFrame)
end
end
@@ -985,7 +985,7 @@ SlashCmdList.AuraWatch = function(msg)
end
if value[i].glowFrame then
- K.LibCustomGlow.ButtonGlow_Stop(value[i].glowFrame)
+ K.HideOverlayGlow(value[i].glowFrame)
end
end
Module:AuraWatch_Centralize(true)
diff --git a/KkthnxUI/Modules/Auras/Lumos/Core.lua b/KkthnxUI/Modules/Auras/Lumos/Core.lua
index 23e7611f..6f9e05a0 100644
--- a/KkthnxUI/Modules/Auras/Lumos/Core.lua
+++ b/KkthnxUI/Modules/Auras/Lumos/Core.lua
@@ -205,7 +205,7 @@ function Module:CreateLumos(self)
bu.Icon:SetTexCoord(K.TexCoords[1], K.TexCoords[2], K.TexCoords[3], K.TexCoords[4])
bu:CreateShadow(true)
- bu.glowFrame = K.CreateGlowFrame(bu, iconSize, 4)
+ bu.glowFrame = K.CreateGlowFrame(bu, iconSize)
local fontParent = CreateFrame("Frame", nil, bu)
fontParent:SetAllPoints()
diff --git a/KkthnxUI/Modules/Auras/Lumos/Rogue.lua b/KkthnxUI/Modules/Auras/Lumos/Rogue.lua
index ca97225b..c1832b1c 100644
--- a/KkthnxUI/Modules/Auras/Lumos/Rogue.lua
+++ b/KkthnxUI/Modules/Auras/Lumos/Rogue.lua
@@ -8,7 +8,7 @@ end
local diceSpells = {
[1] = { id = 193356, text = L["Combo"] },
[2] = { id = 193357, text = L["Crit"] },
- [3] = { id = 193358, text = L["AttackSpeed"] },
+ [3] = { id = 193358, text = L["Attack Speed"] },
[4] = { id = 193359, text = L["CD"] },
[5] = { id = 199603, text = L["Strike"] },
[6] = { id = 199600, text = L["Power"] },
diff --git a/KkthnxUI/Modules/Automation/Elements/Goodbye.lua b/KkthnxUI/Modules/Automation/Elements/Goodbye.lua
index 6bc523c5..37971835 100644
--- a/KkthnxUI/Modules/Automation/Elements/Goodbye.lua
+++ b/KkthnxUI/Modules/Automation/Elements/Goodbye.lua
@@ -18,24 +18,19 @@ local AutoThanksList = {
L["Thanks for the memories, farewell."],
-- WE ARE TESTING THESE TO SEE IF THEY GET FEEDBACK IN GROUPS, WE DO NOT WANNA BE CALLED A BOT :D
- "Appreciate the dungeon, everyone! Great job!",
- "Appreciate the run, folks! Well played!",
- "Appreciate the run, team! Let's hope I find my way out of the maze next time! 🙈",
- "Big thanks for the adventure, folks. Well done!",
- "Big thanks for the dungeon, team! Solid effort!",
- "Big thanks, folks! My keyboard survived, barely. 🤪",
- "Cheers for the run, team! Thank you!",
- "Cheers, everyone! I'll work on my 'ninja-looting' skills for next run! 🤣",
- "Shoutout for the teamwork, guys. Much appreciated!",
- "Thank you, everyone! Great run!",
- "Thanks for the adventure! Sorry for the 'accidental' aggro... again! 😅",
- "Thanks for the run, team! You all were fantastic!",
- "Thanks, group! That was awesome!",
- "Thanks, team! I promise I'll try not to stand in the fire next time! 😂",
- "Thanks, team! You all rocked it!",
+ "Appreciate the dungeon! Great job.",
+ "Appreciate the run! Well played.",
+ "Big thanks for the adventure. Well done.",
+ "Big thanks for the dungeon, team! Solid effort.",
+ "Cheers for the run! Thank you.",
+ "Shoutout for the teamwork. Much appreciated.",
+ "Thank you, everyone! Great run.",
+ "Thanks for the run! You all were fantastic.",
+ "Thanks! That was awesome.",
+ "Thanks! You all rocked it.",
}
-local function SetupAutoGoodbye() -- Local function definition
+local function SetupAutoGoodbye()
local waitTime = math.random() * (5 - 2) + 2 -- generates a float between 2 and 5
C_Timer_After(waitTime, function()
if #AutoThanksList > 0 then
@@ -43,7 +38,16 @@ local function SetupAutoGoodbye() -- Local function definition
local message = AutoThanksList[messageIndex]
if message then
- SendChatMessage(message, IsInGroup(LE_PARTY_CATEGORY_INSTANCE) and "INSTANCE_CHAT" or "SAY")
+ local channel
+ if IsInGroup(LE_PARTY_CATEGORY_INSTANCE) then
+ channel = "INSTANCE_CHAT"
+ elseif IsInGroup() then
+ channel = "PARTY"
+ else
+ channel = "SAY"
+ end
+
+ SendChatMessage(message, channel)
end
else
print("AutoThanksList is empty? Tell Kkthnx") -- Debugging statement
diff --git a/KkthnxUI/Modules/Automation/Elements/PartySync.lua b/KkthnxUI/Modules/Automation/Elements/PartySync.lua
index 2b3e80c7..eba3e1c6 100644
--- a/KkthnxUI/Modules/Automation/Elements/PartySync.lua
+++ b/KkthnxUI/Modules/Automation/Elements/PartySync.lua
@@ -15,9 +15,6 @@ local string_split = string.split
local UnitGUID = UnitGUID
local UnitName = UnitName
--- Define party unit IDs
-local PARTY_UNITS = { "player", "party1", "party2", "party3", "party4" }
-
-- Check if a given name is in your friends list
local function isFriend(name)
-- Do nothing if name is empty (such as whispering from the Battle.net app)
@@ -54,7 +51,8 @@ end
local function setupAutoPartySyncAccept(self)
local sessionBeginDetails = C_QuestSession_GetSessionBeginDetails()
if sessionBeginDetails then
- for _, unit in ipairs(PARTY_UNITS) do
+ for _, unit in ("player|party[1-4]"):gmatch("[^|]+") do
+ print("setupAutoPartySyncAccept", unit)
if UnitGUID(unit) == sessionBeginDetails.guid then
local requesterName = UnitName(unit)
if requesterName and isFriend(requesterName) then
diff --git a/KkthnxUI/Modules/Automation/Elements/Resurrect.lua b/KkthnxUI/Modules/Automation/Elements/Resurrect.lua
index 32ce3829..e9e5c019 100644
--- a/KkthnxUI/Modules/Automation/Elements/Resurrect.lua
+++ b/KkthnxUI/Modules/Automation/Elements/Resurrect.lua
@@ -1,12 +1,12 @@
local K, C = KkthnxUI[1], KkthnxUI[2]
local Module = K:GetModule("Automation")
+local AcceptResurrect = AcceptResurrect
local C_Timer_After = C_Timer.After
local DoEmote = DoEmote
local StaticPopup_Hide = StaticPopup_Hide
local UnitAffectingCombat = UnitAffectingCombat
local UnitIsDeadOrGhost = UnitIsDeadOrGhost
-local IsActiveBattlefieldArena = IsActiveBattlefieldArena
local localizedPylonNames = {
enUS = "Failure Detection Pylon",
@@ -35,8 +35,7 @@ local localizedBrazierNames = {
itIT = "Braciere del Risveglio",
}
-local function SetupAutoResurrect(_, arg1)
- print(arg1)
+local function SetupAutoResurrect(event, arg1)
-- Check if the arg1 is a Pylon or Brazier by comparing it to the localized names.
-- If it is, we don't need to do anything and we return
if localizedPylonNames[K.Client] == arg1 or localizedBrazierNames[K.Client] == arg1 then
@@ -66,12 +65,11 @@ local function SetupAutoResurrect(_, arg1)
end
function Module:CreateAutoResurrect()
- -- Check if the player is in a battleground or arena and if player is dead or ghost
- if IsActiveBattlefieldArena() and UnitIsDeadOrGhost("player") then
- -- Check the value of AutoResurrect
- if C["Automation"].AutoResurrect then
- -- Register the event
- K:RegisterEvent("RESURRECT_REQUEST", SetupAutoResurrect)
- end
+ if C["Automation"].AutoResurrect then
+ -- Register the event
+ K:RegisterEvent("RESURRECT_REQUEST", SetupAutoResurrect)
+ else
+ -- Unregister the event if AutoResurrect is not enabled
+ K:UnregisterEvent("RESURRECT_REQUEST", SetupAutoResurrect)
end
end
diff --git a/KkthnxUI/Modules/Automation/Elements/SetRole.lua b/KkthnxUI/Modules/Automation/Elements/SetRole.lua
index 0bae364a..26bf62ce 100644
--- a/KkthnxUI/Modules/Automation/Elements/SetRole.lua
+++ b/KkthnxUI/Modules/Automation/Elements/SetRole.lua
@@ -1,6 +1,7 @@
local K, C = KkthnxUI[1], KkthnxUI[2]
local Module = K:GetModule("Automation")
+-- WoW API functions
local GetSpecialization = GetSpecialization
local GetSpecializationRole = GetSpecializationRole
local GetTime = GetTime
@@ -9,34 +10,25 @@ local IsInGroup = IsInGroup
local IsPartyLFG = IsPartyLFG
local UnitGroupRolesAssigned = UnitGroupRolesAssigned
local UnitSetRole = UnitSetRole
--- local print = print
+-- Local variables
local lastRoleChangeTime = 0
local currentRole = nil
local ROLE_CHANGE_THRESHOLD = 2
+-- Change player role function
local function changePlayerRole(role)
local currentTime = GetTime()
- if not InCombatLockdown() and currentTime - lastRoleChangeTime > ROLE_CHANGE_THRESHOLD and UnitGroupRolesAssigned("player") ~= role then
+ if not InCombatLockdown() and (currentTime - lastRoleChangeTime > ROLE_CHANGE_THRESHOLD) and (UnitGroupRolesAssigned("player") ~= role) then
local success = UnitSetRole("player", role)
if success then
lastRoleChangeTime = currentTime
currentRole = role
- -- if role then
- -- print("Changed role to " .. role)
- -- else
- -- print("Changed role, but role is undefined")
- -- end
- -- else
- -- if role then
- -- print("Failed to change role to " .. role)
- -- else
- -- print("Failed to change role because role is undefined")
- -- end
end
end
end
+-- Setup auto role function
function Module:SetupAutoRole()
if K.Level < 10 or InCombatLockdown() or not IsInGroup() or IsPartyLFG() then
return
@@ -53,6 +45,7 @@ function Module:SetupAutoRole()
end
end
+-- Create auto set role function
function Module:CreateAutoSetRole()
if not C["Automation"].AutoSetRole then
return
diff --git a/KkthnxUI/Modules/Automation/Elements/WhisperInvite.lua b/KkthnxUI/Modules/Automation/Elements/WhisperInvite.lua
index d88725e8..5cb19310 100644
--- a/KkthnxUI/Modules/Automation/Elements/WhisperInvite.lua
+++ b/KkthnxUI/Modules/Automation/Elements/WhisperInvite.lua
@@ -1,9 +1,14 @@
local K, C = KkthnxUI[1], KkthnxUI[2]
local Module = K:GetModule("Automation")
-local acceptedKeyword
+local IsInGuild = IsInGuild
+local GetNumGuildMembers = GetNumGuildMembers
+local GetGuildRosterInfo = GetGuildRosterInfo
+local Ambiguate = Ambiguate
+local C_FriendList_IsFriend = C_FriendList.IsFriend
+
+local autoInviteKeyword
--- Check if a player is in guild
local function isPlayerInGuild(unitName)
if not unitName or not IsInGuild() then
return false
@@ -17,69 +22,51 @@ local function isPlayerInGuild(unitName)
return false
end
--- Check if a player is in the player's guild or friends list
local function isPlayerGuildOrFriend(name)
- if C["Automation"].WhisperInviteGuildFriends then -- Implement this later
- if IsInGuild() and isPlayerInGuild(name) then
- --print("Player", name, "is in the guild.")
- return true
- elseif C_FriendList.IsFriend(name) then
- --print("Player", name, "is in the friends list.")
- return true
- end
- else
- --print("WhisperInviteGuildFriends is disabled. Accepting all players.")
- return true
+ if not C["Automation"].WhisperInviteRestriction then
+ return true -- Allow all players if the option is disabled
end
- return false
+
+ if IsInGuild() and isPlayerInGuild(name) then
+ return true -- Allow players who are in the guild
+ elseif C_FriendList_IsFriend(name) then
+ return true -- Allow players who are on the friends list
+ end
+
+ return false -- Reject all other players
end
--- Handle auto-invites on chat whisper
local function onChatWhisper(event, message, sender, _, _, _, _, _, _, _, _, _, _, presenceID)
- --print("Received whisper:", message)
- --print("Sender:", sender)
-
if QueueStatusButton and QueueStatusButton:IsShown() then
- --print("You are currently in a queue. Ignoring whisper.")
return
end
- if acceptedKeyword and message:lower() == acceptedKeyword:lower() and isPlayerGuildOrFriend(sender) then
- --print("Whisper matched accepted keyword and sender is in guild or friends list.")
-
+ if autoInviteKeyword and message:lower() == autoInviteKeyword:lower() and isPlayerGuildOrFriend(sender) then
if event == "CHAT_MSG_WHISPER" then
- --print("Inviting sender to party...")
C_PartyInfo.InviteUnit(sender)
elseif event == "CHAT_MSG_BN_WHISPER" then
local accountInfo = C_BattleNet.GetAccountInfoByID(presenceID)
if accountInfo then
local gameAccountInfo = accountInfo.gameAccountInfo
local gameID = gameAccountInfo.gameAccountID
- if gameID then
- if CanCooperateWithGameAccount(accountInfo) then
- --print("Inviting sender to party via Battle.net...")
- BNInviteFriend(gameID)
- end
+ if gameID and CanCooperateWithGameAccount(accountInfo) then
+ BNInviteFriend(gameID)
end
end
end
- else
- --print("Whisper did not match accepted keyword or sender is not in guild or friends list.")
end
end
--- Update the list of accepted keywords
-local function onUpdateAcceptedKeyword()
- acceptedKeyword = C["Automation"].WhisperInvite
+local function onUpdateAutoInviteKeyword()
+ autoInviteKeyword = C["Automation"].WhisperInvite
end
--- Create auto whisper invite
function Module:CreateAutoWhisperInvite()
- if C["Chat"].WhisperInvite == "" then
+ if not C["Automation"].WhisperInvite then
return
end
- onUpdateAcceptedKeyword()
+ onUpdateAutoInviteKeyword()
K:RegisterEvent("CHAT_MSG_WHISPER", onChatWhisper)
K:RegisterEvent("CHAT_MSG_BN_WHISPER", onChatWhisper)
end
diff --git a/KkthnxUI/Modules/Blizzard/Core.lua b/KkthnxUI/Modules/Blizzard/Core.lua
index 58b1a964..0f11abf7 100644
--- a/KkthnxUI/Modules/Blizzard/Core.lua
+++ b/KkthnxUI/Modules/Blizzard/Core.lua
@@ -5,7 +5,7 @@ function Module:OnEnable()
local loadBlizzardModules = {
"CreateAlertFrames",
"CreateAltPowerbar",
- "CreateColorPicker",
+ -- "CreateColorPicker",
"CreateMirrorBars",
"CreateObjectiveFrame",
"CreateOrderHallIcon",
diff --git a/KkthnxUI/Modules/Blizzard/Elements/AlertFrames.lua b/KkthnxUI/Modules/Blizzard/Elements/AlertFrames.lua
index 18def039..0a02bc5f 100644
--- a/KkthnxUI/Modules/Blizzard/Elements/AlertFrames.lua
+++ b/KkthnxUI/Modules/Blizzard/Elements/AlertFrames.lua
@@ -7,7 +7,7 @@ local UIParent = _G.UIParent
local AlertFrame = _G.AlertFrame
local GroupLootContainer = _G.GroupLootContainer
-local POSITION, ANCHOR_POINT, YOFFSET = "TOP", "BOTTOM", -10
+local POSITION, ANCHOR_POINT, YOFFSET = "TOP", "BOTTOM", -6
local parentFrame
function Module:AlertFrame_UpdateAnchor()
@@ -16,11 +16,11 @@ function Module:AlertFrame_UpdateAnchor()
if y > screenHeight / 2 then
POSITION = "TOP"
ANCHOR_POINT = "BOTTOM"
- YOFFSET = -10
+ YOFFSET = -6
else
POSITION = "BOTTOM"
ANCHOR_POINT = "TOP"
- YOFFSET = 10
+ YOFFSET = 6
end
self:ClearAllPoints()
@@ -36,7 +36,7 @@ function Module:UpdatGroupLootContainer()
local frame = self.rollFrames[i]
if frame then
frame:ClearAllPoints()
- frame:SetPoint("CENTER", self, POSITION, 0, self.reservedSize * (i - 1 + 0.5) * YOFFSET / 10)
+ frame:SetPoint("CENTER", self, POSITION, 0, self.reservedSize * (i - 1 + 0.5) * YOFFSET / 6)
lastIdx = i
end
end
diff --git a/KkthnxUI/Modules/Blizzard/Elements/ColorPicker.lua b/KkthnxUI/Modules/Blizzard/Elements/ColorPicker.lua
index ed8827e5..98e6fa36 100644
--- a/KkthnxUI/Modules/Blizzard/Elements/ColorPicker.lua
+++ b/KkthnxUI/Modules/Blizzard/Elements/ColorPicker.lua
@@ -19,7 +19,7 @@ function Module:EnhancedPicker_UpdateColor()
g = translateColor(g)
b = translateColor(b)
- _G.ColorPickerFrame.Content.ColorPicker:SetColorRGB(r, g, b)
+ _G.ColorPickerFrame:SetColorRGB(r, g, b)
end
local function GetBoxColor(box)
@@ -57,7 +57,7 @@ local function createCodeBox(width, index, text)
box:SetTextInsets(5, 5, 0, 0)
box:SetMaxLetters(index == 4 and 6 or 3)
box:SetTextInsets(0, 0, 0, 0)
- box:SetPoint("TOPLEFT", _G.ColorPickerFrame.Content.ColorSwatchCurrent, "BOTTOMLEFT", 0, -index * 26 + -3)
+ box:SetPoint("TOPLEFT", _G.ColorSwatch, "BOTTOMLEFT", 0, -index * 26)
box:SetFontObject(K.UIFont)
box.bg = CreateFrame("Button", nil, box)
@@ -75,6 +75,8 @@ local function createCodeBox(width, index, text)
box:HookScript("OnEnterPressed", updateColorRGB)
end
+ -- box.Type = "EditBox"
+
return box
end
@@ -83,9 +85,10 @@ function Module:CreateColorPicker()
return
end
- local pickerFrame = _G.ColorPickerFrame
+ local pickerFrame = ColorPickerFrame
pickerFrame:SetHeight(250)
K.CreateMoverFrame(pickerFrame.Header, pickerFrame) -- movable by header
+ --_G.OpacitySliderFrame:SetPoint("TOPLEFT", _G.ColorSwatch, "TOPRIGHT", 50, 0)
local colorBar = CreateFrame("Frame", nil, pickerFrame)
colorBar:SetSize(1, 20)
@@ -118,29 +121,18 @@ function Module:CreateColorPicker()
pickerFrame.__boxR = createCodeBox(45, 1, "|cffff0000R")
pickerFrame.__boxG = createCodeBox(45, 2, "|cff00ff00G")
pickerFrame.__boxB = createCodeBox(45, 3, "|cff0000ffB")
- local hexBox = pickerFrame.Content and pickerFrame.Content.HexBox
- if hexBox then
- hexBox:StripTextures()
-
- local bg = CreateFrame("Button", nil, hexBox)
- bg:SetAllPoints()
- bg:SetFrameLevel(hexBox:GetFrameLevel())
- bg:CreateBorder()
-
- hexBox:ClearAllPoints()
- hexBox:SetPoint("BOTTOMRIGHT", -27, 60)
- end
+ pickerFrame.__boxH = createCodeBox(70, 4, "#")
- pickerFrame.Content.ColorPicker.__owner = pickerFrame
- pickerFrame.Content.ColorPicker:HookScript("OnColorSelect", function(self)
- local r, g, b = self.__owner:GetColorRGB()
+ pickerFrame:HookScript("OnColorSelect", function(self)
+ local r, g, b = self:GetColorRGB()
r = K.Round(r * 255)
g = K.Round(g * 255)
b = K.Round(b * 255)
- self.__owner.__boxR:SetText(r)
- self.__owner.__boxG:SetText(g)
- self.__owner.__boxB:SetText(b)
+ self.__boxR:SetText(r)
+ self.__boxG:SetText(g)
+ self.__boxB:SetText(b)
+ self.__boxH:SetText(string_format("%02x%02x%02x", r, g, b))
end)
pickerFrame.Header:StripTextures()
@@ -149,11 +141,11 @@ function Module:CreateColorPicker()
pickerFrame.Border:Hide()
pickerFrame:CreateBorder()
- _G.ColorPickerFrame.Footer.OkayButton:SkinButton()
- _G.ColorPickerFrame.Footer.CancelButton:SkinButton()
+ _G.ColorPickerOkayButton:SkinButton()
+ _G.ColorPickerCancelButton:SkinButton()
- _G.ColorPickerFrame.Footer.CancelButton:ClearAllPoints()
- _G.ColorPickerFrame.Footer.CancelButton:SetPoint("BOTTOMLEFT", pickerFrame, "BOTTOM", 3, 6)
- _G.ColorPickerFrame.Footer.OkayButton:ClearAllPoints()
- _G.ColorPickerFrame.Footer.OkayButton:SetPoint("BOTTOMRIGHT", pickerFrame, "BOTTOM", -3, 6)
+ _G.ColorPickerCancelButton:ClearAllPoints()
+ _G.ColorPickerCancelButton:SetPoint("BOTTOMLEFT", pickerFrame, "BOTTOM", 3, 6)
+ _G.ColorPickerOkayButton:ClearAllPoints()
+ _G.ColorPickerOkayButton:SetPoint("BOTTOMRIGHT", pickerFrame, "BOTTOM", -3, 6)
end
diff --git a/KkthnxUI/Modules/Blizzard/Elements/MirrorBars.lua b/KkthnxUI/Modules/Blizzard/Elements/MirrorBars.lua
index a66cd3d0..8d629269 100644
--- a/KkthnxUI/Modules/Blizzard/Elements/MirrorBars.lua
+++ b/KkthnxUI/Modules/Blizzard/Elements/MirrorBars.lua
@@ -1,7 +1,10 @@
local K, C = KkthnxUI[1], KkthnxUI[2]
local Module = K:GetModule("Blizzard")
-local function StyleMirrorBar(bar)
+-- Sourced: NDui
+
+local function SetupMirrorBar(bar)
+ -- local statusBar = bar.StatusBar
local statusbar = bar.StatusBar or _G[bar:GetName() .. "StatusBar"]
if statusbar then
statusbar:SetAllPoints()
@@ -10,6 +13,7 @@ local function StyleMirrorBar(bar)
end
local text = bar.Text
+ local spark = bar.Spark
bar:SetSize(222, 22)
bar:StripTextures(true)
@@ -19,22 +23,21 @@ local function StyleMirrorBar(bar)
text:SetFont(text:GetFont(), 12, nil)
text:SetPoint("BOTTOM", bar, "TOP", 0, 4)
- local spark = bar:CreateTexture(nil, "OVERLAY")
+ spark = bar:CreateTexture(nil, "OVERLAY")
spark:SetSize(64, bar:GetHeight())
spark:SetTexture(C["Media"].Textures.Spark128Texture)
spark:SetBlendMode("ADD")
spark:SetPoint("CENTER", statusbar:GetStatusBarTexture(), "RIGHT", 0, 0)
bar:CreateBorder()
-
- bar.styled = true -- set styled flag on the bar
end
function Module:CreateMirrorBars()
hooksecurefunc(MirrorTimerContainer, "SetupTimer", function(self, timer)
local bar = self:GetAvailableTimer(timer)
if not bar.styled then
- StyleMirrorBar(bar)
+ SetupMirrorBar(bar)
+ bar.styled = true
end
end)
end
diff --git a/KkthnxUI/Modules/Blizzard/Elements/TimerTracker.lua b/KkthnxUI/Modules/Blizzard/Elements/TimerTracker.lua
index ebe78cbb..3f032805 100644
--- a/KkthnxUI/Modules/Blizzard/Elements/TimerTracker.lua
+++ b/KkthnxUI/Modules/Blizzard/Elements/TimerTracker.lua
@@ -1,9 +1,11 @@
local K, C = KkthnxUI[1], KkthnxUI[2]
local Module = K:GetModule("Blizzard")
+-- Sourced: NDui
+
local pairs = pairs
-local function StyleTimerBar(bar)
+local function SetupTimerTracker(bar)
local texture = K.GetTexture(C["General"].Texture)
bar:SetSize(222, 22)
@@ -25,7 +27,7 @@ function Module:CreateTimerTracker()
local function UpdateTimerTracker()
for _, timer in pairs(_G.TimerTracker.timerList) do
if timer.bar and not timer.bar.styled then -- only apply style if not styled before
- StyleTimerBar(timer.bar)
+ SetupTimerTracker(timer.bar)
end
end
end
diff --git a/KkthnxUI/Modules/Chat/Core.lua b/KkthnxUI/Modules/Chat/Core.lua
index 3cc90142..a2420f51 100644
--- a/KkthnxUI/Modules/Chat/Core.lua
+++ b/KkthnxUI/Modules/Chat/Core.lua
@@ -182,8 +182,8 @@ function Module:UpdateChatSize()
end
if ChatFrame1.FontStringContainer then
- ChatFrame1.FontStringContainer:SetPoint("TOPLEFT", ChatFrame1, "TOPLEFT", -1, 1)
- ChatFrame1.FontStringContainer:SetPoint("BOTTOMRIGHT", ChatFrame1, "BOTTOMRIGHT", 1, -1)
+ ChatFrame1.FontStringContainer:SetPoint("TOPLEFT", ChatFrame1, "TOPLEFT", -2, 2)
+ ChatFrame1.FontStringContainer:SetPoint("BOTTOMRIGHT", ChatFrame1, "BOTTOMRIGHT", 2, -6)
end
ChatFrame1:ClearAllPoints()
@@ -197,7 +197,7 @@ end
local function CreateBackground(self)
local frame = CreateFrame("Frame", nil, self, "BackdropTemplate")
frame:SetPoint("TOPLEFT", self.Background, "TOPLEFT", -1, 1)
- frame:SetPoint("BOTTOMRIGHT", self.Background, "BOTTOMRIGHT", 1, -1)
+ frame:SetPoint("BOTTOMRIGHT", self.Background, "BOTTOMRIGHT", 10, -1)
frame:SetFrameLevel(self:GetFrameLevel())
frame:CreateBorder()
frame:SetShown(C["Chat"].Background)
@@ -579,7 +579,6 @@ function Module:OnEnable()
-- Add Elements
local loadChatModules = {
"ChatWhisperSticky",
- "CreateChatFilter",
"CreateChatHistory",
"CreateChatItemLevels",
"CreateChatRename",
diff --git a/KkthnxUI/Modules/Chat/Elements/Copy.lua b/KkthnxUI/Modules/Chat/Elements/Copy.lua
index 66330155..cc4d54e0 100644
--- a/KkthnxUI/Modules/Chat/Elements/Copy.lua
+++ b/KkthnxUI/Modules/Chat/Elements/Copy.lua
@@ -36,7 +36,6 @@ local editBox
local frame
local menu
-local menuFrame = CreateFrame("Frame", "KKUI_QuickMenu", UIParent, "UIDropDownMenuTemplate")
local leftButtonString = "|TInterface\\TutorialFrame\\UI-TUTORIAL-FRAME:16:12:0:0:512:512:1:76:218:318|t "
local rightButtonString = "|TInterface\\TutorialFrame\\UI-TUTORIAL-FRAME:16:12:0:0:512:512:1:76:321:421|t "
@@ -282,7 +281,7 @@ end
function Module:ChatCopy_CreateMenu()
menu = CreateFrame("Frame", "KKUI_ChatMenu", UIParent)
menu:SetSize(18, C["Chat"].Lock and C["Chat"].Height or _G.ChatFrame1:GetHeight())
- menu:SetPoint("TOPRIGHT", _G.ChatFrame1, K.IsPatch_10_1_0 and 12 or 20, -2)
+ menu:SetPoint("TOPRIGHT", _G.ChatFrame1, 20, -2)
menu:SetShown(C["Chat"].ChatMenu)
_G.ChatFrameMenuButton:ClearAllPoints()
@@ -404,7 +403,7 @@ function Module:ChatCopy_Create()
kkuiconfig:SetScript("OnClick", function(_, btn)
if btn == "LeftButton" then
PlaySound(111)
- _G.EasyMenu(menuList, menuFrame, kkuiconfig, 24, 290, "MENU", 2)
+ _G.EasyMenu(menuList, K.EasyMenu, kkuiconfig, 24, 290, "MENU", 2)
elseif btn == "RightButton" then
K.GUI:Toggle()
end
diff --git a/KkthnxUI/Modules/Chat/Elements/Filters.lua b/KkthnxUI/Modules/Chat/Elements/Filters.lua
deleted file mode 100644
index 8dd59a5b..00000000
--- a/KkthnxUI/Modules/Chat/Elements/Filters.lua
+++ /dev/null
@@ -1,174 +0,0 @@
-local K, C = KkthnxUI[1], KkthnxUI[2]
-local Module = K:GetModule("Chat")
-
-local math_min = math.min
-local gsub = string.gsub
-local pairs, ipairs = pairs, ipairs
-local tremove = table.remove
-
-local IsGuildMember, C_FriendList_IsFriend, IsGUIDInGroup = IsGuildMember, C_FriendList.IsFriend, IsGUIDInGroup
-local Ambiguate, GetTime = Ambiguate, GetTime
-local C_BattleNet_GetGameAccountInfoByGUID = C_BattleNet.GetGameAccountInfoByGUID
-
--- Filter Chat symbols
-local msgSymbols = { "`", "~", "@", "#", "^", "*", "!", "?", "。", "|", " ", "—", "——", "¥", "’", "‘", "“", "”", "【", "】", "『", "』", "《", "》", "〈", "〉", "(", ")", "〔", "〕", "、", ",", ":", ",", "_", "/", "~" }
-
-local FilterList = {}
-function Module:UpdateFilterList()
- K.SplitList(FilterList, C["Chat"].ChatFilterList, true)
-end
-
-local WhiteFilterList = {}
-function Module:UpdateFilterWhiteList()
- K.SplitList(WhiteFilterList, C["Chat"].ChatFilterWhiteList, true)
-end
-
--- ECF strings compare
--- Define two empty tables to store the results of the string comparison
-local last_table, this_table = {}, {}
-
--- Define a function to compare two strings and return their difference as a fraction
-function Module:CompareStrDiff(string_A, string_B)
- local length_A, length_B = #string_A, #string_B
-
- for j = 0, length_B do
- last_table[j + 1] = j
- end
-
- for i = 1, length_A do
- this_table[1] = i
- for j = 1, length_B do
- local cost = (string_A[i] == string_B[j]) and last_table[j] or (math_min(last_table[j + 1], this_table[j], last_table[j]) + 1)
- this_table[j + 1] = cost
- end
-
- -- Copying table elements
- for j = 0, length_B do
- last_table[j + 1] = this_table[j + 1]
- end
- end
-
- return this_table[length_B + 1] / math.max(length_A, length_B)
-end
-
-C.BadBoys = {} -- debug
-local chatLines, prevLineID, filterResult = {}, 0, false or nil
-
-function Module:GetFilterResult(event, msg, name, flag, guid)
- if name == K.Name or (event == "CHAT_MSG_WHISPER" and flag == "GM") or flag == "DEV" then
- -- Ignore messages from self, GMs in whispers, and developers
- return
- elseif guid and (IsGuildMember(guid) or C_BattleNet_GetGameAccountInfoByGUID(guid) or C_FriendList_IsFriend(guid) or IsGUIDInGroup(guid)) then
- -- Ignore messages from guild members, friends, and group members
- return
- end
-
- if C["Chat"].BlockStranger and event == "CHAT_MSG_WHISPER" then -- Block strangers
- Module.MuteCache[name] = GetTime()
- return true
- end
-
- if C["Chat"].BlockSpammer and C.BadBoys[name] and C.BadBoys[name] >= 5 then
- return true
- end
-
- local filterMsg = gsub(msg, "|H.-|h(.-)|h", "%1")
- filterMsg = gsub(filterMsg, "|c%x%x%x%x%x%x%x%x", "")
- filterMsg = gsub(filterMsg, "|r", "")
-
- if filterMsg == "" then
- -- Ignore empty messages
- return
- end
-
- -- Trash Filter
- for _, symbol in ipairs(msgSymbols) do
- filterMsg = gsub(filterMsg, symbol, "")
- end
-
- if event == "CHAT_MSG_CHANNEL" then
- local matches = 0
- local found
- for keyword in pairs(WhiteFilterList) do
- if keyword ~= "" then
- found = true
- local _, count = gsub(filterMsg, keyword, "")
- if count > 0 then
- matches = matches + 1
- end
- end
- end
- if matches == 0 and found then
- return 0
- end
- end
-
- local matches = 0
- for keyword in pairs(FilterList) do
- if keyword ~= "" then
- local _, count = gsub(filterMsg, keyword, "")
- if count > 0 then
- matches = matches + 1
- end
- end
- end
-
- if matches >= C["Chat"].FilterMatches then
- return true
- end
-
- -- ECF Repeat Filter
- local msgTable = { name, {}, GetTime() }
- if filterMsg == "" then
- filterMsg = msg
- end
- for i = 1, #filterMsg do
- msgTable[2][i] = filterMsg:byte(i)
- end
- local chatLinesSize = #chatLines
- chatLines[chatLinesSize + 1] = msgTable
- for i = 1, chatLinesSize do
- local line = chatLines[i]
- if line[1] == msgTable[1] and ((event == "CHAT_MSG_CHANNEL" and msgTable[3] - line[3] < 0.6) or Module:CompareStrDiff(line[2], msgTable[2]) <= 0.1) then
- tremove(chatLines, i)
- return true
- end
- end
- if chatLinesSize >= 30 then
- tremove(chatLines, 1)
- end
-end
-
-function Module:UpdateChatFilter(event, msg, author, _, _, _, flag, _, _, _, _, lineID, guid)
- if lineID ~= prevLineID then
- prevLineID = lineID
-
- local name = Ambiguate(author, "none")
- filterResult = Module:GetFilterResult(event, msg, name, flag, guid)
- if filterResult and filterResult ~= 0 then
- C.BadBoys[name] = (C.BadBoys[name] or 0) + 1
- end
- if filterResult == 0 then
- filterResult = true
- end
- end
-
- return filterResult
-end
-
-function Module:CreateChatFilter()
- if C_AddOns.IsAddOnLoaded("EnhancedChatFilter") then
- return
- end
-
- if C["Chat"].EnableFilter then
- self:UpdateFilterList()
- self:UpdateFilterWhiteList()
- ChatFrame_AddMessageEventFilter("CHAT_MSG_CHANNEL", self.UpdateChatFilter)
- ChatFrame_AddMessageEventFilter("CHAT_MSG_SAY", self.UpdateChatFilter)
- ChatFrame_AddMessageEventFilter("CHAT_MSG_YELL", self.UpdateChatFilter)
- ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER", self.UpdateChatFilter)
- ChatFrame_AddMessageEventFilter("CHAT_MSG_EMOTE", self.UpdateChatFilter)
- ChatFrame_AddMessageEventFilter("CHAT_MSG_TEXT_EMOTE", self.UpdateChatFilter)
- end
-end
diff --git a/KkthnxUI/Modules/Chat/Elements/Rename.lua b/KkthnxUI/Modules/Chat/Elements/Rename.lua
index 3c26e3a1..b99c54e5 100644
--- a/KkthnxUI/Modules/Chat/Elements/Rename.lua
+++ b/KkthnxUI/Modules/Chat/Elements/Rename.lua
@@ -36,7 +36,7 @@ function Module:SetupChannelNames(text, ...)
local r, g, b = ...
if WhisperColorEnabled and string_find(text, L["To"] .. " |H[BN]*player.+%]") then
- r, g, b = r * 0.7, g * 0.7, b * 0.7
+ r, g, b = 0.6274, 0.3231, 0.6274
end
if TimestampFormat > 1 then
diff --git a/KkthnxUI/Modules/Chat/Elements/RoleIcon.lua b/KkthnxUI/Modules/Chat/Elements/RoleIcon.lua
deleted file mode 100644
index 8bb8a1e5..00000000
--- a/KkthnxUI/Modules/Chat/Elements/RoleIcon.lua
+++ /dev/null
@@ -1,56 +0,0 @@
-local K, C = KkthnxUI[1], KkthnxUI[2]
-local Module = K:GetModule("Chat")
-
--- Check if a unit has a role assigned
-local UnitGroupRolesAssigned = UnitGroupRolesAssigned
-
--- Chat message types to add role icons to
-local ChatMSG = {
- CHAT_MSG_INSTANCE_CHAT = true,
- CHAT_MSG_INSTANCE_CHAT_LEADER = true,
- CHAT_MSG_PARTY = true,
- CHAT_MSG_PARTY_LEADER = true,
- CHAT_MSG_RAID = true,
- CHAT_MSG_RAID_LEADER = true,
- CHAT_MSG_RAID_WARNING = true,
- CHAT_MSG_SAY = true,
- CHAT_MSG_WHISPER = true,
- CHAT_MSG_WHISPER_INFORM = true,
- CHAT_MSG_YELL = true,
-}
-
--- Role icon textures
-local IconTex = {
- DAMAGER = "",
- HEALER = "|TInterface\\LFGFrame\\LFGRole:12:12:0:0:64:16:48:64:0:16|t",
- TANK = "|TInterface\\LFGFrame\\LFGRole:12:12:0:0:64:16:32:48:0:16|t",
-}
-
--- Get colored name with role icon
-local GetColoredName = GetColoredName
-local function GetChatRoleIcons(event, arg1, arg2, ...)
- local ret = GetColoredName(event, arg1, arg2, ...)
- if ChatMSG[event] then
- local playerRole = UnitGroupRolesAssigned(arg2)
- -- Check role for player on same realm
- if playerRole == "NONE" and arg2:match(" *- *" .. K.Realm .. "$") then
- playerRole = UnitGroupRolesAssigned(arg2:gsub(" *-[^-]+$", ""))
- end
-
- if playerRole and IconTex[playerRole] then
- ret = { IconTex[playerRole], ret }
- ret = table.concat(ret)
- end
- end
-
- return ret
-end
-
--- Create chat role icons
-function Module:CreateChatRoleIcon()
- if not C["Chat"].RoleIcons then
- return
- end
-
- GetColoredName = GetChatRoleIcons
-end
diff --git a/KkthnxUI/Modules/DataText/Core.lua b/KkthnxUI/Modules/DataText/Core.lua
index ccd56441..f5dc5e27 100644
--- a/KkthnxUI/Modules/DataText/Core.lua
+++ b/KkthnxUI/Modules/DataText/Core.lua
@@ -14,6 +14,7 @@ function Module:OnEnable()
"CreateSocialDataText",
"CreateTimeDataText",
"CreateCoordsDataText",
+ "CreateSpecDataText",
}
for _, funcName in ipairs(loadDataTextModules) do
diff --git a/KkthnxUI/Modules/DataText/Elements/Coords.lua b/KkthnxUI/Modules/DataText/Elements/Coords.lua
index 41a51933..7a8eced1 100644
--- a/KkthnxUI/Modules/DataText/Elements/Coords.lua
+++ b/KkthnxUI/Modules/DataText/Elements/Coords.lua
@@ -3,26 +3,8 @@ local Module = K:GetModule("DataText")
local string_format = string.format
-local COMBAT_ZONE = COMBAT_ZONE
-local CONTESTED_TERRITORY = CONTESTED_TERRITORY
-local C_Map_GetBestMapForUnit = C_Map.GetBestMapForUnit
-local FACTION_CONTROLLED_TERRITORY = FACTION_CONTROLLED_TERRITORY
-local FACTION_STANDING_LABEL4 = FACTION_STANDING_LABEL4
-local FREE_FOR_ALL_TERRITORY = FREE_FOR_ALL_TERRITORY
-local GameTooltip = GameTooltip
-local GetSubZoneText = GetSubZoneText
-local GetZonePVPInfo = GetZonePVPInfo
-local GetZoneText = GetZoneText
-local IsInInstance = IsInInstance
-local SANCTUARY_TERRITORY = SANCTUARY_TERRITORY
-local UnitExists = UnitExists
-local UnitIsPlayer = UnitIsPlayer
-local UnitName = UnitName
-local ZONE = ZONE
-
-local CoordsDataTextFrame
-local coordX = 0
-local coordY = 0
+local CoordsDataText
+local coordX, coordY = 0, 0
local faction
local pvpType
local subzone
@@ -45,14 +27,14 @@ end
local function OnUpdate(self, elapsed)
self.elapsed = (self.elapsed or 0) + elapsed
if self.elapsed > 0.1 then
- local x, y = K.GetPlayerMapPos(C_Map_GetBestMapForUnit("player"))
+ local x, y = K.GetPlayerMapPos(C_Map.GetBestMapForUnit("player"))
if x then
coordX, coordY = x, y
- CoordsDataTextFrame.Text:SetText(formatCoords())
- CoordsDataTextFrame:Show()
+ CoordsDataText.Text:SetText(formatCoords())
+ CoordsDataText:Show()
else
coordX, coordY = 0, 0
- CoordsDataTextFrame:Hide()
+ CoordsDataText:Hide()
end
self.elapsed = 0
end
@@ -75,7 +57,7 @@ local function OnEvent(_, event, ...)
end
local function OnEnter()
- GameTooltip:SetOwner(CoordsDataTextFrame, "ANCHOR_BOTTOM", 0, -15)
+ GameTooltip:SetOwner(CoordsDataText, "ANCHOR_BOTTOM", 0, -15)
GameTooltip:ClearLines()
if pvpType and not IsInInstance() then
@@ -90,8 +72,8 @@ local function OnEnter()
end
GameTooltip:AddLine(" ")
- GameTooltip:AddLine(K.LeftButton .. L["WorldMap"], 0.6, 0.8, 1)
- GameTooltip:AddLine(K.RightButton .. "Send My Pos", 0.6, 0.8, 1)
+ GameTooltip:AddLine(K.LeftButton .. "Toggle WorldMap", 0.6, 0.8, 1)
+ GameTooltip:AddLine(K.RightButton .. "Send My Position", 0.6, 0.8, 1)
GameTooltip:Show()
end
@@ -99,21 +81,21 @@ local function OnLeave()
GameTooltip:Hide()
end
--- Function to handle mouse up event
local function OnMouseUp(_, btn)
-- Toggle world map if left button is clicked
if btn == "LeftButton" then
ToggleWorldMap()
-- Open chat frame with position and target information if right button is clicked
elseif btn == "RightButton" then
- local hasUnit = UnitExists("target") and not UnitIsPlayer("target")
- local unitName = nil
- if hasUnit then
- unitName = UnitName("target")
- end
+ local zone = GetZoneText()
+ local subzone = GetSubZoneText()
+ local mapID = C_Map.GetBestMapForUnit("player")
+ local position = C_Map.GetPlayerMapPosition(mapID, "player")
+ local coordString = position and format("%.1f, %.1f", position:GetXY()) or "N/A"
+ local unitName = UnitExists("target") and not UnitIsPlayer("target") and UnitName("target")
-- Format chat message with position, subzone, coordinates, and target name (if applicable)
- local chatMsg = string_format("%s: %s %s (%s) %s", "My Position", zone, subzone or "", formatCoords(), unitName or "")
+ local chatMsg = format("%s: %s %s (%s) %s", L["My Position"], zone, subzone or "", coordString, unitName or "")
-- Open chat frame with message and selected dock frame
ChatFrame_OpenChat(chatMsg, SELECTED_DOCK_FRAME)
@@ -125,30 +107,32 @@ function Module:CreateCoordsDataText()
return
end
- CoordsDataTextFrame = CoordsDataTextFrame or CreateFrame("Button", nil, UIParent)
- CoordsDataTextFrame:SetPoint("TOP", UIParent, "TOP", 0, -40)
- CoordsDataTextFrame:SetSize(24, 24)
+ CoordsDataText = CreateFrame("Frame", nil, UIParent)
+ CoordsDataText:SetHitRectInsets(0, 0, -10, -10)
- CoordsDataTextFrame.Texture = CoordsDataTextFrame:CreateTexture(nil, "BACKGROUND")
- CoordsDataTextFrame.Texture:SetPoint("CENTER", CoordsDataTextFrame, "CENTER", 0, 0)
- CoordsDataTextFrame.Texture:SetTexture("Interface\\AddOns\\KkthnxUI\\Media\\DataText\\coords.blp")
- CoordsDataTextFrame.Texture:SetSize(24, 24)
- CoordsDataTextFrame.Texture:SetVertexColor(unpack(C["DataText"].IconColor))
- CoordsDataTextFrame.Texture:SetAlpha(0.8)
+ CoordsDataText.Text = K.CreateFontString(CoordsDataText, 12)
+ CoordsDataText.Text:ClearAllPoints()
+ CoordsDataText.Text:SetPoint("TOP", UIParent, "TOP", 0, -40)
- CoordsDataTextFrame.Text = CoordsDataTextFrame:CreateFontString(nil, "ARTWORK")
- CoordsDataTextFrame.Text:SetFontObject(K.UIFont)
- CoordsDataTextFrame.Text:SetPoint("CENTER", CoordsDataTextFrame.Texture, "CENTER", 0, -14)
+ CoordsDataText.Texture = CoordsDataText:CreateTexture(nil, "ARTWORK")
+ CoordsDataText.Texture:SetPoint("BOTTOM", CoordsDataText, "TOP", 0, 0)
+ CoordsDataText.Texture:SetTexture("Interface\\AddOns\\KkthnxUI\\Media\\DataText\\coords.blp")
+ CoordsDataText.Texture:SetSize(24, 24)
+ CoordsDataText.Texture:SetVertexColor(unpack(C["DataText"].IconColor))
- for _, event in pairs(eventList) do
- CoordsDataTextFrame:RegisterEvent(event)
+ CoordsDataText:SetAllPoints(CoordsDataText.Text)
+
+ local function _OnEvent(...)
+ OnEvent(...)
end
- CoordsDataTextFrame:SetScript("OnEvent", OnEvent)
- CoordsDataTextFrame:SetScript("OnMouseUp", OnMouseUp)
- CoordsDataTextFrame:SetScript("OnUpdate", OnUpdate)
- CoordsDataTextFrame:SetScript("OnLeave", OnLeave)
- CoordsDataTextFrame:SetScript("OnEnter", OnEnter)
+ for _, event in pairs(eventList) do
+ CoordsDataText:RegisterEvent(event)
+ end
- K.Mover(CoordsDataTextFrame, "CoordsDataText", "CoordsDataText", { "TOP", UIParent, "TOP", 0, -40 })
+ CoordsDataText:SetScript("OnEvent", _OnEvent)
+ CoordsDataText:SetScript("OnEnter", OnEnter)
+ CoordsDataText:SetScript("OnLeave", OnLeave)
+ CoordsDataText:SetScript("OnMouseUp", OnMouseUp)
+ CoordsDataText:SetScript("OnUpdate", OnUpdate)
end
diff --git a/KkthnxUI/Modules/DataText/Elements/Durability.lua b/KkthnxUI/Modules/DataText/Elements/Durability.lua
index ea71b835..5cc9bb66 100644
--- a/KkthnxUI/Modules/DataText/Elements/Durability.lua
+++ b/KkthnxUI/Modules/DataText/Elements/Durability.lua
@@ -86,7 +86,7 @@ local eventList = {
"PLAYER_ENTERING_WORLD",
}
-local function OnEvent(_, event)
+local function OnEvent(event)
if event == "PLAYER_ENTERING_WORLD" then
DurabilityDataText:UnregisterEvent(event)
end
@@ -100,9 +100,11 @@ local function OnEvent(_, event)
else
if numSlots > 0 then
local r, g, b = getDurabilityColor(math_floor(localSlots[1][3] * 100), 100)
- DurabilityDataText:SetFormattedText("%s%%|r" .. " " .. DURABILITY, K.RGBToHex(r, g, b) .. math_floor(localSlots[1][3] * 100))
+ local yellowColor = "|cFFF0C500" -- Hexadecimal color code for yellow, the closest I could find/get to match other tabs
+ -- Set the text color to yellow and format the durability text
+ DurabilityDataText.Text:SetFormattedText("%s%%|r %s", K.RGBToHex(r, g, b) .. math.floor(localSlots[1][3] * 100), yellowColor .. DURABILITY)
else
- DurabilityDataText:SetText(DURABILITY .. ": " .. K.MyClassColor .. NONE)
+ DurabilityDataText.Text:SetText(DURABILITY .. ": " .. K.MyClassColor .. NONE)
end
end
@@ -161,22 +163,19 @@ function Module:CreateDurabilityDataText()
DurabilityDataText:SetParent(PaperDollFrame)
DurabilityDataText:Disable()
- if DurabilityDataText.LeftActive then
- DurabilityDataText.LeftActive:SetAlpha(0)
- end
- if DurabilityDataText.RightActive then
- DurabilityDataText.RightActive:SetAlpha(0)
- end
- if DurabilityDataText.MiddleActive then
- DurabilityDataText.MiddleActive:SetAlpha(0)
+ DurabilityDataText.LeftActive:Hide()
+ DurabilityDataText.MiddleActive:Hide()
+ DurabilityDataText.RightActive:Hide()
+
+ local function _OnEvent(...)
+ OnEvent(...)
end
for _, event in pairs(eventList) do
DurabilityDataText:RegisterEvent(event)
end
- DurabilityDataText:SetScript("OnEvent", OnEvent)
- DurabilityDataText:SetScript("OnClick", nil)
+ DurabilityDataText:SetScript("OnEvent", _OnEvent)
DurabilityDataText:SetScript("OnEnter", OnEnter)
DurabilityDataText:SetScript("OnLeave", OnLeave)
end
diff --git a/KkthnxUI/Modules/DataText/Elements/Friends.lua b/KkthnxUI/Modules/DataText/Elements/Friends.lua
index 0110ec4e..9eb22580 100644
--- a/KkthnxUI/Modules/DataText/Elements/Friends.lua
+++ b/KkthnxUI/Modules/DataText/Elements/Friends.lua
@@ -150,7 +150,7 @@ local function buildBNetTable(num)
local isMobile = gameAccountInfo.isWowMobile
local level = gameAccountInfo.characterLevel
local wowProjectID = gameAccountInfo.wowProjectID
- local zoneName = gameAccountInfo.areaName
+ local zoneName = gameAccountInfo.areaName or UNKNOWN
charName = BNet_GetValidatedCharacterName(charName, battleTag, client)
class = K.ClassList[class]
@@ -170,7 +170,7 @@ local function buildBNetTable(num)
local infoText = GetOnlineInfoText(client, isMobile, rafLinkType, gameText)
if client == BNET_CLIENT_WOW and wowProjectID == WOW_PROJECT_ID then
- infoText = GetOnlineInfoText(client, isMobile, rafLinkType, zoneName or gameText)
+ infoText = GetOnlineInfoText(client, isMobile, rafLinkType, zoneName)
end
if client == BNET_CLIENT_WOW and wowProjectID ~= WOW_PROJECT_ID then
@@ -209,7 +209,9 @@ local function FriendsPanel_UpdateButton(button)
local classColor = K.ClassColors[class] or levelColor
button.name:SetText(string_format("%s%s|r %s%s", levelColor, level, K.RGBToHex(classColor), name))
button.zone:SetText(string_format("%s%s", zoneColor, area))
- button.gameIcon:SetTexture(BNet_GetBattlenetClientAtlas(BNET_CLIENT_WOW))
+ -- button.gameIcon:SetTexture(BNet_GetBattlenetClientAtlas(BNET_CLIENT_WOW))
+ -- C_Texture.SetTitleIconTexture(button.gameIcon, BNET_CLIENT_WOW, Enum.TitleIconVersion.Medium)
+ button.gameIcon:SetAtlas(BNet_GetBattlenetClientAtlas(BNET_CLIENT_WOW))
button.isBNet = nil
button.data = friendTable[index]
@@ -229,10 +231,12 @@ local function FriendsPanel_UpdateButton(button)
button.zone:SetText(string_format("%s%s", zoneColor, infoText))
if client == CLIENT_WOW_DIFF then
button.gameIcon:SetAtlas(BNet_GetBattlenetClientAtlas(BNET_CLIENT_WOW))
+ -- C_Texture.SetTitleIconTexture(button.gameIcon, BNET_CLIENT_WOW, Enum.TitleIconVersion.Medium)
elseif client == BNET_CLIENT_WOW then
button.gameIcon:SetTexture("Interface\\FriendsFrame\\PlusManz-" .. factionName)
else
button.gameIcon:SetAtlas(BNet_GetBattlenetClientAtlas(client))
+ -- C_Texture.SetTitleIconTexture(button.gameIcon, client, Enum.TitleIconVersion.Medium)
end
button.isBNet = true
@@ -301,8 +305,8 @@ local function GetNameAndInviteType(class, charName, guid, factionName)
return format("%s%s|r %s", K.RGBToHex(K.ColorClass(K.ClassList[class])), charName, GetButtonTexFromInviteType(guid, factionName))
end
-local function buttonOnClick(self, btn)
- if btn == "LeftButton" then
+local function buttonOnClick(self, button)
+ if button == "LeftButton" then
if IsAltKeyDown() then
if self.isBNet then
local index = 2
@@ -376,7 +380,7 @@ local function buttonOnClick(self, btn)
end
local function buttonOnEnter(self)
- GameTooltip:SetOwner(FriendsDataText.Texture, "ANCHOR_NONE")
+ GameTooltip:SetOwner(FriendsDataText, "ANCHOR_NONE")
GameTooltip:SetPoint("TOPLEFT", infoFrame, "TOPRIGHT", 5, 0)
GameTooltip:ClearLines()
@@ -397,7 +401,7 @@ local function buttonOnEnter(self)
local level = gameAccountInfo.characterLevel
local gameText = gameAccountInfo.richPresence or ""
local wowProjectID = gameAccountInfo.wowProjectID
- local clientString = BNet_GetClientEmbeddedAtlas(client, 16)
+ local clientString = BNet_GetClientEmbeddedAtlas(client, 16) or BNet_GetClientEmbeddedTexture(client, 16)
if client == BNET_CLIENT_WOW then
if charName ~= "" then -- fix for weird account
@@ -461,7 +465,7 @@ end
local function FriendsPanel_CreateButton(parent, index)
local button = CreateFrame("Button", nil, parent)
button:SetSize(370, 20)
- button:SetPoint("TOPLEFT", 0, -(index - 1) * 20)
+ button:SetPoint("TOPLEFT", 0, -(index - 1) * 22)
button.HL = button:CreateTexture(nil, "HIGHLIGHT")
button.HL:SetAllPoints()
@@ -485,10 +489,10 @@ local function FriendsPanel_CreateButton(parent, index)
button.gameIcon:SetSize(16, 16)
button.gameIcon:SetTexCoord(0.17, 0.83, 0.17, 0.83)
- local gameIconBorder = CreateFrame("Frame", nil, button)
- gameIconBorder:SetFrameLevel(button:GetFrameLevel())
- gameIconBorder:SetAllPoints(button.gameIcon)
- gameIconBorder:CreateBorder()
+ button.gameIcon.border = CreateFrame("Frame", nil, button)
+ button.gameIcon.border:SetFrameLevel(button:GetFrameLevel())
+ button.gameIcon.border:SetAllPoints(button.gameIcon)
+ button.gameIcon.border:CreateBorder()
button:RegisterForClicks("AnyUp")
button:SetScript("OnClick", buttonOnClick)
@@ -582,12 +586,12 @@ local function OnEnter()
local totalFriends = Module.totalFriends
if totalOnline == 0 then
- GameTooltip:SetOwner(FriendsDataText.Texture, "ANCHOR_NONE")
- GameTooltip:SetPoint(K.GetAnchors(FriendsDataText.Texture))
+ GameTooltip:SetOwner(FriendsDataText, "ANCHOR_NONE")
+ GameTooltip:SetPoint(K.GetAnchors(FriendsDataText.Text))
GameTooltip:ClearLines()
GameTooltip:AddDoubleLine(FRIENDS_LIST, string_format("%s: %s/%s", GUILD_ONLINE_LABEL, totalOnline, totalFriends), 0.4, 0.6, 1, 0.4, 0.6, 1)
GameTooltip:AddLine(" ")
- GameTooltip:AddLine(L["No Online"], 1, 1, 1)
+ GameTooltip:AddLine("Guess it's time to talk to the voices in my head.", 1, 1, 1) -- Display the random funny quote about having no friends online
GameTooltip:Show()
return
end
@@ -621,7 +625,7 @@ local eventList = {
"PLAYER_ENTERING_WORLD",
}
-local function OnEvent(_, event, arg1)
+local function OnEvent(event, arg1)
if event == "CHAT_MSG_SYSTEM" then
if not string_find(arg1, onlineString) and not string_find(arg1, offlineString) then
return
@@ -677,28 +681,33 @@ function Module:CreateSocialDataText()
return
end
- FriendsDataText = FriendsDataText or CreateFrame("Button", nil, UIParent)
- FriendsDataText:SetPoint("LEFT", UIParent, "LEFT", 0, -270)
- FriendsDataText:SetSize(24, 24)
+ FriendsDataText = CreateFrame("Frame", nil, UIParent)
+ FriendsDataText:SetHitRectInsets(-16, 0, -10, -10)
- FriendsDataText.Texture = FriendsDataText:CreateTexture(nil, "BACKGROUND")
- FriendsDataText.Texture:SetPoint("LEFT", FriendsDataText, "LEFT", 0, 0)
+ FriendsDataText.Text = K.CreateFontString(FriendsDataText, 12)
+ FriendsDataText.Text:ClearAllPoints()
+ FriendsDataText.Text:SetPoint("LEFT", UIParent, "LEFT", 24, -270)
+
+ FriendsDataText.Texture = FriendsDataText:CreateTexture(nil, "ARTWORK")
+ FriendsDataText.Texture:SetPoint("RIGHT", FriendsDataText.Text, "LEFT", 0, 2)
FriendsDataText.Texture:SetTexture("Interface\\AddOns\\KkthnxUI\\Media\\DataText\\player.blp")
FriendsDataText.Texture:SetSize(24, 24)
FriendsDataText.Texture:SetVertexColor(unpack(C["DataText"].IconColor))
- FriendsDataText.Text = FriendsDataText:CreateFontString(nil, "ARTWORK")
- FriendsDataText.Text:SetFontObject(K.UIFont)
- FriendsDataText.Text:SetPoint("LEFT", FriendsDataText.Texture, "RIGHT", 0, 0)
+ FriendsDataText:SetAllPoints(FriendsDataText.Text)
+
+ local function _OnEvent(...)
+ OnEvent(...)
+ end
for _, event in pairs(eventList) do
FriendsDataText:RegisterEvent(event)
end
- FriendsDataText:SetScript("OnEvent", OnEvent)
- FriendsDataText:SetScript("OnMouseUp", OnMouseUp)
+ FriendsDataText:SetScript("OnEvent", _OnEvent)
FriendsDataText:SetScript("OnEnter", OnEnter)
FriendsDataText:SetScript("OnLeave", OnLeave)
+ FriendsDataText:SetScript("OnMouseUp", OnMouseUp)
- K.Mover(FriendsDataText, "FriendsDataText", "FriendsDataText", { "LEFT", UIParent, "LEFT", 4, -270 })
+ K.Mover(FriendsDataText.Text, "FriendsDT", "FriendsDT", { "LEFT", UIParent, "LEFT", 24, -270 }, 56, 12)
end
diff --git a/KkthnxUI/Modules/DataText/Elements/Gold.lua b/KkthnxUI/Modules/DataText/Elements/Gold.lua
index 1ebace0d..cb78eee2 100644
--- a/KkthnxUI/Modules/DataText/Elements/Gold.lua
+++ b/KkthnxUI/Modules/DataText/Elements/Gold.lua
@@ -1,10 +1,12 @@
local K, C, L = KkthnxUI[1], KkthnxUI[2], KkthnxUI[3]
local Module = K:GetModule("DataText")
+-- Utility Functions
local pairs = pairs
local string_format = string.format
local unpack = unpack
+-- WoW API and Constants
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
local CURRENCY = CURRENCY
local C_CurrencyInfo_GetBackpackCurrencyInfo = C_CurrencyInfo.GetBackpackCurrencyInfo
@@ -21,17 +23,21 @@ local StaticPopupDialogs = StaticPopupDialogs
local TOTAL = TOTAL
local YES = YES
+-- Variables
local slotString = BAGSLOTTEXT .. ": %s%d"
local ticker
local profit = 0
local spent = 0
local oldMoney = 0
-local crossRealms = GetAutoCompleteRealms()
local GoldDataText
local RebuildCharList
+-- Player Information
+local myName, myRealm = K.Name, K.Realm
+myRealm = gsub(myRealm, "%s", "") -- fix for multi-word realm name
+local crossRealms = GetAutoCompleteRealms()
if not crossRealms or #crossRealms == 0 then
- crossRealms = { [1] = K.Realm }
+ crossRealms = { [1] = myRealm }
end
StaticPopupDialogs["RESETGOLD"] = {
@@ -44,7 +50,7 @@ StaticPopupDialogs["RESETGOLD"] = {
wipe(KkthnxUIDB.Gold[realm])
end
end
- KkthnxUIDB.Gold[K.Realm][K.Name] = { GetMoney(), K.Class }
+ KkthnxUIDB.Gold[myRealm][myName] = { GetMoney(), K.Class, K.Faction }
end,
whileDead = 1,
}
@@ -66,6 +72,17 @@ local function getClassIcon(class)
return classStr or ""
end
+local function getFactionIcon(faction)
+ local factionPath, trimIcon = "|TInterface\\ICONS\\", ":12:12:0:0:50:50:4:46:4:46|t "
+ if faction == "Horde" then
+ return factionPath .. "ui_horde_honorboundmedal" .. trimIcon
+ elseif faction == "Alliance" then
+ return factionPath .. "UI_Alliance_7LegionMedal" .. trimIcon
+ else
+ return factionPath .. "INV_Misc_QuestionMark" .. trimIcon -- return ?? icon for unknown factions
+ end
+end
+
local function getSlotString()
local num = CalculateTotalNumberOfFreeBagSlots()
if num < 10 then
@@ -106,7 +123,7 @@ local function OnEvent(_, event, arg1)
end
end
- if not ticker then
+ if not ticker and not K.IsFirestorm then
C_WowTokenPublic_UpdateMarketPrice()
ticker = C_Timer_NewTicker(60, UpdateMarketPrice)
end
@@ -131,16 +148,17 @@ local function OnEvent(_, event, arg1)
end
end
- if not KkthnxUIDB.Gold[K.Realm] then
- KkthnxUIDB.Gold[K.Realm] = {}
+ if not KkthnxUIDB.Gold[myRealm] then
+ KkthnxUIDB.Gold[myRealm] = {}
end
- if not KkthnxUIDB.Gold[K.Realm][K.Name] then
- KkthnxUIDB.Gold[K.Realm][K.Name] = {}
+ if not KkthnxUIDB.Gold[myRealm][myName] then
+ KkthnxUIDB.Gold[myRealm][myName] = {}
end
- KkthnxUIDB.Gold[K.Realm][K.Name][1] = GetMoney()
- KkthnxUIDB.Gold[K.Realm][K.Name][2] = K.Class
+ KkthnxUIDB.Gold[myRealm][myName][1] = GetMoney()
+ KkthnxUIDB.Gold[myRealm][myName][2] = K.Class
+ KkthnxUIDB.Gold[myRealm][myName][3] = K.Faction
oldMoney = newMoney
end
@@ -163,7 +181,7 @@ function RebuildCharList()
for _, realm in pairs(crossRealms) do
if KkthnxUIDB.Gold[realm] then
for name, value in pairs(KkthnxUIDB.Gold[realm]) do
- if not (realm == K.Realm and name == K.Name) then
+ if not (realm == myRealm and name == myName) then
index = index + 1
if not menuList[index] then
menuList[index] = {}
@@ -180,9 +198,9 @@ function RebuildCharList()
end
local title
-local function OnEnter(self)
- GameTooltip:SetOwner(self, "ANCHOR_NONE")
- GameTooltip:SetPoint(K.GetAnchors(self))
+local function OnEnter(self) -- We need self for the bags since we use this on the bags gold info
+ GameTooltip:SetOwner(self, "ANCHOR_NONE") -- Dont change from self, note above
+ GameTooltip:SetPoint(K.GetAnchors(self)) -- Dont change from self, note above
GameTooltip:ClearLines()
GameTooltip:AddLine(K.InfoColor .. CURRENCY)
@@ -205,9 +223,9 @@ local function OnEnter(self)
if thisRealmList then
for k, v in pairs(thisRealmList) do
local name = Ambiguate(k .. " - " .. realm, "none")
- local gold, class = unpack(v)
+ local gold, class, faction = unpack(v)
local r, g, b = K.ColorClass(class)
- GameTooltip:AddDoubleLine(getClassIcon(class) .. name, K.FormatMoney(gold), r, g, b, 1, 1, 1)
+ GameTooltip:AddDoubleLine(getFactionIcon(faction) .. getClassIcon(class) .. name, K.FormatMoney(gold), r, g, b, 1, 1, 1)
totalGold = totalGold + gold
end
end
@@ -215,8 +233,10 @@ local function OnEnter(self)
GameTooltip:AddLine(" ")
GameTooltip:AddDoubleLine(TOTAL .. ":", K.FormatMoney(totalGold), 0.63, 0.82, 1, 1, 1, 1)
- GameTooltip:AddLine(" ")
- GameTooltip:AddDoubleLine("|TInterface\\ICONS\\WoW_Token01:12:12:0:0:50:50:4:46:4:46|t " .. TOKEN_FILTER_LABEL .. ":", K.FormatMoney(C_WowTokenPublic_GetCurrentMarketPrice() or 0), 0.5, 0.7, 1, 1, 1, 1)
+ if not K.IsFirestorm then
+ GameTooltip:AddLine(" ")
+ GameTooltip:AddDoubleLine("|TInterface\\ICONS\\WoW_Token01:12:12:0:0:50:50:4:46:4:46|t " .. TOKEN_FILTER_LABEL .. ":", K.FormatMoney(C_WowTokenPublic_GetCurrentMarketPrice() or 0), 0.5, 0.7, 1, 1, 1, 1)
+ end
title = false
local chargeInfo = C_CurrencyInfo_GetCurrencyInfo(2533) -- Tier charges
@@ -305,20 +325,20 @@ end
K.GoldButton_OnLeave = OnLeave
function Module:CreateGoldDataText()
- GoldDataText = CreateFrame("Button", "KKUI_GoldDataText", UIParent)
+ GoldDataText = CreateFrame("Frame", nil, UIParent)
+ GoldDataText:SetHitRectInsets(-16, 0, -10, -10)
if C["DataText"].Gold then
- GoldDataText:SetPoint("LEFT", UIParent, "LEFT", 0, -302)
- GoldDataText:SetSize(24, 24)
+ GoldDataText.Text = K.CreateFontString(GoldDataText, 12)
+ GoldDataText.Text:ClearAllPoints()
+ GoldDataText.Text:SetPoint("LEFT", UIParent, "LEFT", 24, -302)
- GoldDataText.Texture = GoldDataText:CreateTexture(nil, "BACKGROUND")
- GoldDataText.Texture:SetPoint("LEFT", GoldDataText, "LEFT", 3, 0)
+ GoldDataText.Texture = GoldDataText:CreateTexture(nil, "ARTWORK")
+ GoldDataText.Texture:SetPoint("RIGHT", GoldDataText.Text, "LEFT", 0, 2)
GoldDataText.Texture:SetTexture("Interface\\AddOns\\KkthnxUI\\Media\\DataText\\bags.blp")
GoldDataText.Texture:SetSize(24, 24)
GoldDataText.Texture:SetVertexColor(unpack(C["DataText"].IconColor))
- GoldDataText.Text = GoldDataText:CreateFontString(nil, "ARTWORK")
- GoldDataText.Text:SetFontObject(K.UIFont)
- GoldDataText.Text:SetPoint("LEFT", GoldDataText.Texture, "RIGHT", -2, 0)
+ GoldDataText:SetAllPoints(GoldDataText.Text)
end
for _, event in pairs(eventList) do
@@ -328,9 +348,8 @@ function Module:CreateGoldDataText()
GoldDataText:SetScript("OnEvent", OnEvent)
GoldDataText:SetScript("OnEnter", OnEnter)
GoldDataText:SetScript("OnLeave", OnLeave)
+
if C["DataText"].Gold then
GoldDataText:SetScript("OnMouseUp", OnMouseUp)
-
- K.Mover(GoldDataText, "GoldDataText", "GoldDataText", { "LEFT", UIParent, "LEFT", 0, -302 })
end
end
diff --git a/KkthnxUI/Modules/DataText/Elements/Guild.lua b/KkthnxUI/Modules/DataText/Elements/Guild.lua
index 85a89917..44d1c97d 100644
--- a/KkthnxUI/Modules/DataText/Elements/Guild.lua
+++ b/KkthnxUI/Modules/DataText/Elements/Guild.lua
@@ -1,7 +1,6 @@
local K, C, L = KkthnxUI[1], KkthnxUI[2], KkthnxUI[3]
local Module = K:GetModule("DataText")
-local table_wipe = table.wipe
local table_sort = table.sort
local string_format = string.format
local select = select
@@ -11,6 +10,7 @@ local CLASS_ABBR = CLASS_ABBR
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
local C_GuildInfo_GuildRoster = C_GuildInfo.GuildRoster
local C_PartyInfo_InviteUnit = C_PartyInfo.InviteUnit
+local C_PartyInfo_RequestInviteFromUnit = C_PartyInfo.RequestInviteFromUnit
local C_Timer_After = C_Timer.After
local ChatEdit_ActivateChat = ChatEdit_ActivateChat
local ChatEdit_ChooseBoxForSend = ChatEdit_ChooseBoxForSend
@@ -49,11 +49,31 @@ local prevTime
local r, g, b = K.r, K.g, K.b
local GuildDataText
-local function rosterButtonOnClick(self, btn)
- local name = guildTable[self.index][3]
- if btn == "LeftButton" then
+local function rosterButtonOnClick(self, button)
+ local index = self.index
+ local _, _, name, _, _, _, _, _, guid = unpack(guildTable[index])
+
+ -- Check if the index is valid
+ if not index or not guildTable[index] then
+ return
+ end
+
+ if not (name and name ~= "") then
+ return
+ end
+
+ if button == "LeftButton" then
if IsAltKeyDown() then
- C_PartyInfo_InviteUnit(name)
+ if guid then
+ local inviteType = GetDisplayedInviteType(guid)
+ if inviteType == "INVITE" or inviteType == "SUGGEST_INVITE" then
+ C_PartyInfo_InviteUnit(name)
+ elseif inviteType == "REQUEST_INVITE" then
+ C_PartyInfo_RequestInviteFromUnit(name)
+ end
+ else
+ C_PartyInfo_InviteUnit(name)
+ end
elseif IsShiftKeyDown() then
if MailFrame:IsShown() then
MailFrameTab_OnClick(nil, 2)
@@ -74,6 +94,55 @@ local function rosterButtonOnClick(self, btn)
end
end
+local tooltipColors = {
+ title = { r = 1, g = 1, b = 1 },
+ subHeader = { r = 0.75, g = 0.9, b = 1 },
+ officerNote = { r = 0.3, g = 1, b = 0.3 },
+}
+
+local noteLabel = "|cff999999" .. _G.LABEL_NOTE .. ":|r %s"
+local officerNoteLabel = "|cff999999" .. _G.GUILD_RANK1_DESC .. ":|r %s"
+local title = "|cffffffff" .. GUILD_INFORMATION .. "|r"
+local noNoteText = "|cff999999" .. NOT_APPLICABLE .. "|r"
+local rankLabel = "|cff999999" .. _G.RANK .. ":|r %s"
+
+-- Event handler for guild roster button hover
+local function rosterButtonOnEnter(self)
+ local index = self.index
+ local _, _, _, _, _, note, officerNote, rank = unpack(guildTable[index])
+
+ -- Check if the index is valid
+ if not index or not guildTable[index] then
+ return
+ end
+
+ GameTooltip:SetOwner(GuildDataText, "ANCHOR_NONE")
+ GameTooltip:SetPoint("TOPLEFT", infoFrame, "TOPRIGHT", 6, 2)
+ GameTooltip:ClearLines()
+ GameTooltip:AddLine(title, tooltipColors.title.r, tooltipColors.title.g, tooltipColors.title.b, 1)
+ GameTooltip:AddLine(" ")
+
+ if rank then
+ GameTooltip:AddLine(rankLabel:format(rank), tooltipColors.subHeader.r, tooltipColors.subHeader.g, tooltipColors.subHeader.b, 1)
+ end
+
+ GameTooltip:AddLine(" ")
+
+ if note ~= "" then
+ GameTooltip:AddLine(noteLabel:format(note), tooltipColors.subHeader.r, tooltipColors.subHeader.g, tooltipColors.subHeader.b, 1)
+ else
+ GameTooltip:AddLine(noteLabel:format(noNoteText), tooltipColors.subHeader.r, tooltipColors.subHeader.g, tooltipColors.subHeader.b, 1)
+ end
+
+ if officerNote ~= "" then
+ GameTooltip:AddLine(officerNoteLabel:format(officerNote), tooltipColors.officerNote.r, tooltipColors.officerNote.g, tooltipColors.officerNote.b, 1)
+ else
+ GameTooltip:AddLine(officerNoteLabel:format(noNoteText), tooltipColors.officerNote.r, tooltipColors.officerNote.g, tooltipColors.officerNote.b, 1)
+ end
+
+ GameTooltip:Show()
+end
+
local function GuildPanel_CreateButton(parent, index)
local button = CreateFrame("Button", nil, parent)
button:SetSize(305, 20)
@@ -101,6 +170,8 @@ local function GuildPanel_CreateButton(parent, index)
button:RegisterForClicks("AnyUp")
button:SetScript("OnClick", rosterButtonOnClick)
+ button:SetScript("OnEnter", rosterButtonOnEnter)
+ button:SetScript("OnLeave", K.HideTooltip)
return button
end
@@ -109,6 +180,11 @@ local function GuildPanel_UpdateButton(button)
local index = button.index
local level, class, name, zone, status = unpack(guildTable[index])
+ -- Check if the index is valid
+ if not index or not guildTable[index] then
+ return
+ end
+
local levelcolor = K.RGBToHex(GetQuestDifficultyColor(level))
button.level:SetText(levelcolor .. level)
@@ -259,9 +335,9 @@ local function GuildPanel_Init()
local scrollChild = scrollFrame.scrollChild
local numButtons = 16 + 1
local buttonHeight = 22
- local buttons = {}
+ local buttons = scrollFrame.buttons or {}
for i = 1, numButtons do
- buttons[i] = GuildPanel_CreateButton(scrollChild, i)
+ buttons[i] = buttons[i] or GuildPanel_CreateButton(scrollChild, i)
end
scrollFrame.buttons = buttons
@@ -288,18 +364,18 @@ local function GuildPanel_Refresh()
prevTime = thisTime
end
- table_wipe(guildTable)
+ wipe(guildTable)
local count = 0
local total, _, online = GetNumGuildMembers()
local guildName, guildRank = GetGuildInfo("player")
gName:SetText("|cff0099ff<" .. (guildName or "") .. ">")
gOnline:SetText(string_format(K.InfoColor .. "%s:" .. " %d/%d", GUILD_ONLINE_LABEL, online, total))
- -- gApps:SetText(string_format(K.InfoColor..GUILDINFOTAB_APPLICANTS, GetNumGuildApplicants()))
gRank:SetText(K.InfoColor .. RANK .. ": " .. (guildRank or ""))
+ -- Declare status variable as string
for i = 1, total do
- local name, _, _, level, _, zone, _, _, connected, status, class, _, _, mobile = GetGuildRosterInfo(i)
+ local name, rank, _, level, _, zone, note, officerNote, connected, status, class, _, _, mobile, _, _, guid = GetGuildRosterInfo(i)
if connected or mobile then
if mobile and not connected then
zone = REMOTE_CHAT
@@ -334,6 +410,10 @@ local function GuildPanel_Refresh()
guildTable[count][3] = Ambiguate(name, "none")
guildTable[count][4] = zone
guildTable[count][5] = status
+ guildTable[count][6] = note
+ guildTable[count][7] = officerNote
+ guildTable[count][8] = rank
+ guildTable[count][9] = guid
end
end
@@ -347,31 +427,21 @@ local eventList = {
}
local function OnEvent(_, event, arg1)
- if not IsInGuild() then
- if C["DataText"].HideText then
- GuildDataText.Text:SetText("")
- else
- GuildDataText.Text:SetText(GUILD .. ": " .. K.MyClassColor .. NONE)
- end
- return
+ if event == "GUILD_ROSTER_UPDATE" and arg1 then
+ C_GuildInfo_GuildRoster()
end
- if event == "GUILD_ROSTER_UPDATE" then
- if arg1 then
- C_GuildInfo_GuildRoster()
- end
- end
+ if IsInGuild() then
+ local online = select(3, GetNumGuildMembers())
+ local message = C["DataText"].HideText and "" or GUILD .. ": " .. K.MyClassColor .. online
+ GuildDataText.Text:SetText(message)
- local online = select(3, GetNumGuildMembers())
- if C["DataText"].HideText then
- GuildDataText.Text:SetText("")
+ if infoFrame and infoFrame:IsShown() then
+ GuildPanel_Refresh()
+ GuildPanel_SortUpdate()
+ end
else
- GuildDataText.Text:SetText(GUILD .. ": " .. K.MyClassColor .. online)
- end
-
- if infoFrame and infoFrame:IsShown() then
- GuildPanel_Refresh()
- GuildPanel_SortUpdate()
+ GuildDataText.Text:SetText(GUILD .. ": " .. K.MyClassColor .. NO .. " " .. GUILD)
end
end
@@ -428,28 +498,31 @@ function Module:CreateGuildDataText()
return
end
- GuildDataText = GuildDataText or CreateFrame("Button", nil, UIParent)
- GuildDataText:SetPoint("LEFT", UIParent, "LEFT", 0, -240)
- GuildDataText:SetSize(24, 24)
+ GuildDataText = CreateFrame("Frame", nil, UIParent)
+ GuildDataText:SetHitRectInsets(-16, 0, -10, -10)
- GuildDataText.Texture = GuildDataText:CreateTexture(nil, "BACKGROUND")
- GuildDataText.Texture:SetPoint("LEFT", GuildDataText, "LEFT", 0, 0)
- GuildDataText.Texture:SetTexture("Interface\\AddOns\\KkthnxUI\\Media\\DataText\\guild.blp")
+ GuildDataText.Text = K.CreateFontString(GuildDataText, 12)
+ GuildDataText.Text:ClearAllPoints()
+ GuildDataText.Text:SetPoint("LEFT", UIParent, "LEFT", 24, -240)
+
+ GuildDataText.Texture = GuildDataText:CreateTexture(nil, "ARTWORK")
+ GuildDataText.Texture:SetPoint("RIGHT", GuildDataText.Text, "LEFT", 0, 2)
+ GuildDataText.Texture:SetTexture(K.MediaFolder .. "DataText\\guild.blp")
GuildDataText.Texture:SetSize(24, 24)
GuildDataText.Texture:SetVertexColor(unpack(C["DataText"].IconColor))
- GuildDataText.Text = GuildDataText:CreateFontString(nil, "ARTWORK")
- GuildDataText.Text:SetFontObject(K.UIFont)
- GuildDataText.Text:SetPoint("LEFT", GuildDataText.Texture, "RIGHT", 0, 0)
+ GuildDataText:SetAllPoints(GuildDataText.Text)
+
+ local function _OnEvent(...)
+ OnEvent(...)
+ end
for _, event in pairs(eventList) do
GuildDataText:RegisterEvent(event)
end
- GuildDataText:SetScript("OnEvent", OnEvent)
- GuildDataText:SetScript("OnMouseUp", OnMouseUp)
+ GuildDataText:SetScript("OnEvent", _OnEvent)
GuildDataText:SetScript("OnEnter", OnEnter)
GuildDataText:SetScript("OnLeave", OnLeave)
-
- K.Mover(GuildDataText, "GuildDataText", "GuildDataText", { "LEFT", UIParent, "LEFT", 4, -240 })
+ GuildDataText:SetScript("OnMouseUp", OnMouseUp)
end
diff --git a/KkthnxUI/Modules/DataText/Elements/Latency.lua b/KkthnxUI/Modules/DataText/Elements/Latency.lua
index 30f21882..7f67ece2 100644
--- a/KkthnxUI/Modules/DataText/Elements/Latency.lua
+++ b/KkthnxUI/Modules/DataText/Elements/Latency.lua
@@ -79,28 +79,27 @@ function Module:CreateLatencyDataText()
return
end
- LatencyDataText = LatencyDataText or CreateFrame("Button", "KKUI_LatencyDataText", UIParent)
- LatencyDataText:SetSize(24, 24)
+ local xOffset = C["DataText"].System and 26 or 0
+ local anchorFrame = C["DataText"].System and _G.KKUI_SystemDataText.Text or UIParent
+ local anchorPoint1 = C["DataText"].System and "LEFT" or "TOPLEFT"
+ local anchorPoint2 = C["DataText"].System and "RIGHT" or "TOPLEFT"
- LatencyDataText.Texture = LatencyDataText:CreateTexture(nil, "BACKGROUND")
- LatencyDataText.Texture:SetPoint("LEFT", LatencyDataText, "LEFT", 2, 0)
+ LatencyDataText = CreateFrame("Frame", nil, UIParent)
+ LatencyDataText:SetHitRectInsets(-16, 0, -10, -10)
+
+ LatencyDataText.Text = K.CreateFontString(LatencyDataText, 12)
+ LatencyDataText.Text:ClearAllPoints()
+ LatencyDataText.Text:SetPoint(anchorPoint1, anchorFrame, anchorPoint2, xOffset, 0)
+
+ LatencyDataText.Texture = LatencyDataText:CreateTexture(nil, "ARTWORK")
+ LatencyDataText.Texture:SetPoint("RIGHT", LatencyDataText.Text, "LEFT", -4, 2)
LatencyDataText.Texture:SetTexture("Interface\\AddOns\\KkthnxUI\\Media\\DataText\\ping.tga")
LatencyDataText.Texture:SetSize(16, 16)
LatencyDataText.Texture:SetVertexColor(unpack(C["DataText"].IconColor))
- LatencyDataText.Text = LatencyDataText:CreateFontString("OVERLAY")
- LatencyDataText.Text:SetFontObject(K.UIFont)
- LatencyDataText.Text:SetPoint("LEFT", LatencyDataText.Texture, "RIGHT", 4, 0)
-
- if C["DataText"].System then
- LatencyDataText.Pos = { "LEFT", _G.KKUI_SystemDataText.Text, "RIGHT", 4, 0 }
- else
- LatencyDataText.Pos = { "TOPLEFT", UIParent, "TOPLEFT", 0, 0 }
- end
+ LatencyDataText:SetAllPoints(LatencyDataText.Text)
- LatencyDataText:SetScript("OnUpdate", OnUpdate)
LatencyDataText:SetScript("OnEnter", OnEnter)
LatencyDataText:SetScript("OnLeave", OnLeave)
-
- K.Mover(LatencyDataText, "KKUI_LatencyDataText", "KKUI_LatencyDataText", LatencyDataText.Pos)
+ LatencyDataText:SetScript("OnUpdate", OnUpdate)
end
diff --git a/KkthnxUI/Modules/DataText/Elements/Location.lua b/KkthnxUI/Modules/DataText/Elements/Location.lua
index baf492b0..a3ca5410 100644
--- a/KkthnxUI/Modules/DataText/Elements/Location.lua
+++ b/KkthnxUI/Modules/DataText/Elements/Location.lua
@@ -79,7 +79,7 @@ function Module:CreateLocationDataText()
LocationDataText:Hide()
end)
- LocationDataText = LocationDataText or CreateFrame("Frame", "KKUI_LocationDataText", UIParent)
+ LocationDataText = CreateFrame("Frame", nil, UIParent)
LocationDataText:SetPoint("TOP", Minimap, "TOP", 0, -4)
LocationDataText:SetSize(Minimap:GetWidth(), 13)
LocationDataText:SetFrameLevel(Minimap:GetFrameLevel() + 2)
@@ -87,24 +87,26 @@ function Module:CreateLocationDataText()
LocationDataText:Hide()
end
- LocationDataText.MainZoneText = LocationDataText:CreateFontString("OVERLAY")
- LocationDataText.MainZoneText:SetFontObject(K.UIFont)
- LocationDataText.MainZoneText:SetFont(select(1, LocationDataText.MainZoneText:GetFont()), 13, select(3, LocationDataText.MainZoneText:GetFont()))
+ LocationDataText.MainZoneText = K.CreateFontString(LocationDataText, 12)
LocationDataText.MainZoneText:SetAllPoints(LocationDataText)
LocationDataText.MainZoneText:SetWordWrap(true)
LocationDataText.MainZoneText:SetNonSpaceWrap(true)
LocationDataText.MainZoneText:SetMaxLines(2)
- LocationDataText.SubZoneText = LocationDataText:CreateFontString("OVERLAY")
- LocationDataText.SubZoneText:SetFontObject(K.UIFont)
- LocationDataText.SubZoneText:SetFont(select(1, LocationDataText.SubZoneText:GetFont()), 11, select(3, LocationDataText.SubZoneText:GetFont()))
- LocationDataText.SubZoneText:SetPoint("TOP", LocationDataText.MainZoneText, "BOTTOM", 0, -1)
+ LocationDataText.SubZoneText = K.CreateFontString(LocationDataText, 11)
+ LocationDataText.SubZoneText:ClearAllPoints()
+ LocationDataText.SubZoneText:SetPoint("TOP", LocationDataText.MainZoneText, "BOTTOM", 0, -2)
+ LocationDataText.SubZoneText:SetWordWrap(true)
LocationDataText.SubZoneText:SetNonSpaceWrap(true)
LocationDataText.SubZoneText:SetMaxLines(2)
+ local function _OnEvent(...)
+ OnEvent(...) -- ??
+ end
+
for _, event in pairs(eventList) do
LocationDataText:RegisterEvent(event)
end
- LocationDataText:SetScript("OnEvent", OnEvent)
+ LocationDataText:SetScript("OnEvent", _OnEvent)
end
diff --git a/KkthnxUI/Modules/DataText/Elements/Spec.lua b/KkthnxUI/Modules/DataText/Elements/Spec.lua
new file mode 100644
index 00000000..bd275950
--- /dev/null
+++ b/KkthnxUI/Modules/DataText/Elements/Spec.lua
@@ -0,0 +1,284 @@
+local K, C = KkthnxUI[1], KkthnxUI[2]
+local Module = K:GetModule("DataText")
+
+local format, wipe, select, next = string.format, table.wipe, select, next
+local SPECIALIZATION, TALENTS_BUTTON, MAX_TALENT_TIERS = SPECIALIZATION, TALENTS_BUTTON, MAX_TALENT_TIERS
+local PVP_TALENTS, LOOT_SPECIALIZATION_DEFAULT = PVP_TALENTS, LOOT_SPECIALIZATION_DEFAULT
+local GetSpecialization, GetSpecializationInfo, GetLootSpecialization, GetSpecializationInfoByID = GetSpecialization, GetSpecializationInfo, GetLootSpecialization, GetSpecializationInfoByID
+local GetTalentInfo, GetPvpTalentInfoByID, SetLootSpecialization, SetSpecialization = GetTalentInfo, GetPvpTalentInfoByID, SetLootSpecialization, SetSpecialization
+local C_SpecializationInfo_GetAllSelectedPvpTalentIDs = C_SpecializationInfo.GetAllSelectedPvpTalentIDs
+local C_SpecializationInfo_CanPlayerUsePVPTalentUI = C_SpecializationInfo.CanPlayerUsePVPTalentUI
+local STARTER_BUILD = Constants.TraitConsts.STARTER_BUILD_TRAIT_CONFIG_ID
+
+local function addIcon(texture)
+ texture = texture and "|T" .. texture .. ":12:16:0:0:50:50:4:46:4:46|t" or ""
+ return texture
+end
+
+local currentSpecIndex, currentLootIndex, newMenu, numSpecs, numLocal
+
+local eventList = {
+ "PLAYER_ENTERING_WORLD",
+ "ACTIVE_TALENT_GROUP_CHANGED",
+ "PLAYER_LOOT_SPEC_UPDATED",
+}
+
+local function OnEvent()
+ currentSpecIndex = GetSpecialization()
+ if currentSpecIndex and currentSpecIndex < 5 then
+ local _, name, _, icon = GetSpecializationInfo(currentSpecIndex)
+ if not name then
+ return
+ end
+ currentLootIndex = GetLootSpecialization()
+ if currentLootIndex == 0 then
+ icon = addIcon(icon)
+ else
+ icon = addIcon(select(4, GetSpecializationInfoByID(currentLootIndex)))
+ end
+ SpecDataText.Text:SetText(CLUB_FINDER_SPEC .. ": " .. icon)
+ else
+ SpecDataText.Text:SetText(CLUB_FINDER_SPEC .. ": " .. K.MyClassColor .. NONE)
+ end
+end
+
+local pvpTalents
+local pvpIconTexture = C_CurrencyInfo.GetCurrencyInfo(104).iconFileID
+
+local function OnEnter()
+ if not currentSpecIndex or currentSpecIndex == 5 then
+ return
+ end
+
+ GameTooltip:SetOwner(SpecDataText, "ANCHOR_NONE")
+ GameTooltip:SetPoint(K.GetAnchors(SpecDataText))
+ GameTooltip:ClearLines()
+ GameTooltip:AddLine(TALENTS_BUTTON, 0, 0.6, 1)
+ GameTooltip:AddLine(" ")
+
+ local specID, specName, _, specIcon = GetSpecializationInfo(currentSpecIndex)
+ GameTooltip:AddLine(addIcon(specIcon) .. " " .. specName, 0.6, 0.8, 1)
+
+ for t = 1, MAX_TALENT_TIERS do
+ for c = 1, 3 do
+ local _, name, icon, selected = GetTalentInfo(t, c, 1)
+ if selected then
+ GameTooltip:AddLine(addIcon(icon) .. " " .. name, 1, 1, 1)
+ end
+ end
+ end
+
+ local configID = C_ClassTalents.GetLastSelectedSavedConfigID(specID)
+ local info = configID and C_Traits.GetConfigInfo(configID)
+ if info and info.name then
+ GameTooltip:AddLine(" (" .. info.name .. ")", 1, 1, 1)
+ end
+
+ if C_SpecializationInfo_CanPlayerUsePVPTalentUI() then
+ pvpTalents = C_SpecializationInfo_GetAllSelectedPvpTalentIDs()
+
+ if #pvpTalents > 0 then
+ GameTooltip:AddLine(" ")
+ GameTooltip:AddLine(addIcon(pvpIconTexture) .. " " .. PVP_TALENTS, 0.6, 0.8, 1)
+ for _, talentID in next, pvpTalents do
+ local _, name, icon, _, _, _, unlocked = GetPvpTalentInfoByID(talentID)
+ if name and unlocked then
+ GameTooltip:AddLine(addIcon(icon) .. " " .. name, 1, 1, 1)
+ end
+ end
+ end
+
+ wipe(pvpTalents)
+ end
+
+ GameTooltip:AddLine(" ")
+ GameTooltip:AddDoubleLine(" ", K.LeftButton .. "Toggle TalentFrame" .. " ", 1, 1, 1, 0.6, 0.8, 1)
+ GameTooltip:AddDoubleLine(" ", K.RightButton .. "Select Your Spec" .. " ", 1, 1, 1, 0.6, 0.8, 1)
+ GameTooltip:Show()
+end
+
+local OnLeave = K.HideTooltip
+
+local function selectSpec(_, specIndex)
+ if currentSpecIndex == specIndex then
+ return
+ end
+ SetSpecialization(specIndex)
+ DropDownList1:Hide()
+end
+
+local function checkSpec(self)
+ return currentSpecIndex == self.arg1
+end
+
+local function selectLootSpec(_, index)
+ SetLootSpecialization(index)
+ DropDownList1:Hide()
+end
+
+local function checkLootSpec(self)
+ return currentLootIndex == self.arg1
+end
+
+local function refreshDefaultLootSpec()
+ if not currentSpecIndex or currentSpecIndex == 5 then
+ return
+ end
+ local mult = 3 + numSpecs
+ newMenu[numLocal - mult].text = format(LOOT_SPECIALIZATION_DEFAULT, (select(2, GetSpecializationInfo(currentSpecIndex))) or NONE)
+end
+
+local function selectCurrentConfig(_, configID, specID)
+ if InCombatLockdown() then
+ UIErrorsFrame:AddMessage(K.InfoColor .. ERR_NOT_IN_COMBAT)
+ return
+ end
+ if configID == STARTER_BUILD then
+ C_ClassTalents.SetStarterBuildActive(true)
+ else
+ C_ClassTalents.LoadConfig(configID, true)
+ C_ClassTalents.SetStarterBuildActive(false)
+ end
+ C_ClassTalents.UpdateLastSelectedSavedConfigID(specID or GetSpecializationInfo(currentSpecIndex), configID)
+end
+
+local function checkCurrentConfig(self)
+ return C_ClassTalents.GetLastSelectedSavedConfigID(self.arg2) == self.arg1
+end
+
+local function refreshAllTraits()
+ local numConfig = numLocal or 0
+ local specID = GetSpecializationInfo(currentSpecIndex)
+ local configIDs = specID and C_ClassTalents.GetConfigIDsBySpecID(specID)
+ if configIDs then
+ for i = 1, #configIDs do
+ local configID = configIDs[i]
+ if configID then
+ local info = C_Traits.GetConfigInfo(configID)
+ numConfig = numConfig + 1
+ if not newMenu[numConfig] then
+ newMenu[numConfig] = {}
+ end
+ newMenu[numConfig].text = info.name
+ newMenu[numConfig].arg1 = configID
+ newMenu[numConfig].arg2 = specID
+ newMenu[numConfig].func = selectCurrentConfig
+ newMenu[numConfig].checked = checkCurrentConfig
+ end
+ end
+ end
+
+ for i = numConfig + 1, #newMenu do
+ if newMenu[i] then
+ newMenu[i].text = nil
+ end
+ end
+end
+
+local seperatorMenu = {
+ text = "",
+ isTitle = true,
+ notCheckable = true,
+ iconOnly = true,
+ icon = "Interface\\Common\\UI-TooltipDivider-Transparent",
+ iconInfo = {
+ tCoordLeft = 0,
+ tCoordRight = 1,
+ tCoordTop = 0,
+ tCoordBottom = 1,
+ tSizeX = 0,
+ tSizeY = 8,
+ tFitDropDownSizeX = true,
+ },
+}
+
+local function BuildSpecMenu()
+ if newMenu then
+ return
+ end
+
+ newMenu = {
+ { text = SPECIALIZATION, isTitle = true, notCheckable = true },
+ seperatorMenu,
+ { text = SELECT_LOOT_SPECIALIZATION, isTitle = true, notCheckable = true },
+ { text = "", arg1 = 0, func = selectLootSpec, checked = checkLootSpec },
+ }
+
+ for i = 1, 4 do
+ local id, name = GetSpecializationInfo(i)
+ if id then
+ numSpecs = (numSpecs or 0) + 1
+ tinsert(newMenu, i + 1, { text = name, arg1 = i, func = selectSpec, checked = checkSpec })
+ tinsert(newMenu, { text = name, arg1 = id, func = selectLootSpec, checked = checkLootSpec })
+ end
+ end
+
+ tinsert(newMenu, seperatorMenu)
+ tinsert(newMenu, { text = GetSpellInfo(384255), isTitle = true, notCheckable = true })
+ tinsert(newMenu, {
+ text = BLUE_FONT_COLOR:WrapTextInColorCode(TALENT_FRAME_DROP_DOWN_STARTER_BUILD),
+ func = selectCurrentConfig,
+ arg1 = STARTER_BUILD,
+ checked = function()
+ return C_ClassTalents.GetStarterBuildActive()
+ end,
+ })
+
+ numLocal = #newMenu
+
+ refreshDefaultLootSpec()
+ K:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED", refreshDefaultLootSpec)
+
+ refreshAllTraits()
+ K:RegisterEvent("TRAIT_CONFIG_DELETED", refreshAllTraits)
+ K:RegisterEvent("TRAIT_CONFIG_UPDATED", refreshAllTraits)
+ K:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED", refreshAllTraits)
+end
+
+local function OnMouseUp(self, btn)
+ if not currentSpecIndex or currentSpecIndex == 5 then
+ return
+ end
+
+ if btn == "LeftButton" then
+ ToggleTalentFrame(2)
+ else
+ BuildSpecMenu()
+ EasyMenu(newMenu, K.EasyMenu, self, -80, 100, "MENU", 1)
+ GameTooltip:Hide()
+ end
+end
+
+function Module:CreateSpecDataText()
+ if not C["DataText"].Spec then
+ return
+ end
+
+ SpecDataText = CreateFrame("Frame", nil, UIParent)
+ SpecDataText:SetHitRectInsets(-16, 0, -10, -10)
+
+ SpecDataText.Text = K.CreateFontString(SpecDataText, 12)
+ SpecDataText.Text:ClearAllPoints()
+ SpecDataText.Text:SetPoint("LEFT", UIParent, "LEFT", 24, -210)
+
+ SpecDataText.Texture = SpecDataText:CreateTexture(nil, "ARTWORK")
+ SpecDataText.Texture:SetPoint("RIGHT", SpecDataText.Text, "LEFT", 0, 2)
+ SpecDataText.Texture:SetTexture("Interface\\AddOns\\KkthnxUI\\Media\\DataText\\talents.blp")
+ SpecDataText.Texture:SetSize(24, 24)
+ SpecDataText.Texture:SetVertexColor(unpack(C["DataText"].IconColor))
+
+ SpecDataText:SetAllPoints(SpecDataText.Text)
+
+ local function _OnEvent(...)
+ OnEvent(...)
+ end
+
+ for _, event in pairs(eventList) do
+ SpecDataText:RegisterEvent(event)
+ end
+
+ SpecDataText:SetScript("OnEvent", _OnEvent)
+ SpecDataText:SetScript("OnEnter", OnEnter)
+ SpecDataText:SetScript("OnLeave", OnLeave)
+ SpecDataText:SetScript("OnMouseUp", OnMouseUp)
+end
diff --git a/KkthnxUI/Modules/DataText/Elements/System.lua b/KkthnxUI/Modules/DataText/Elements/System.lua
index 875bd6a1..b0b4c50c 100644
--- a/KkthnxUI/Modules/DataText/Elements/System.lua
+++ b/KkthnxUI/Modules/DataText/Elements/System.lua
@@ -185,15 +185,28 @@ StaticPopupDialogs["CPUUSAGE"] = {
whileDead = 1,
}
+-- Cooldown variables
+local lastClickTime = 0
+local clickCooldown = 60 -- Cooldown in seconds
+
local function OnMouseUp(_, btn)
+ local currentTime = GetTime()
+
if btn == "LeftButton" then
if scriptProfileStatus then
ResetCPUUsage()
Module.CheckLoginTime = GetTime()
end
+
+ if currentTime - lastClickTime < clickCooldown then
+ return
+ end
+
+ lastClickTime = currentTime
local before = gcinfo()
collectgarbage("collect")
K.Print(string_format(K.InfoColorTint .. "%s:|r %s", L["Memory Collected"], formatMemory(before - gcinfo())))
+
OnEnter()
elseif btn == "RightButton" and scriptProfileStatus then
Module.ShowMemory = not Module.ShowMemory
@@ -220,23 +233,25 @@ function Module:CreateSystemDataText()
return
end
- SystemDataText = SystemDataText or CreateFrame("Frame", "KKUI_SystemDataText", UIParent)
- SystemDataText:SetSize(24, 24)
+ SystemDataText = CreateFrame("Frame", "KKUI_SystemDataText", UIParent)
+ SystemDataText:SetHitRectInsets(-16, 0, -10, -10)
- SystemDataText.Texture = SystemDataText:CreateTexture(nil, "BACKGROUND")
- SystemDataText.Texture:SetPoint("LEFT", SystemDataText, "LEFT", 4, 0)
+ SystemDataText.Text = K.CreateFontString(SystemDataText, 12)
+ SystemDataText.Text:ClearAllPoints()
+ SystemDataText.Text:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 24, -6)
+
+ SystemDataText.Texture = SystemDataText:CreateTexture(nil, "ARTWORK")
+ SystemDataText.Texture:SetPoint("RIGHT", SystemDataText.Text, "LEFT", -4, 2)
SystemDataText.Texture:SetTexture("Interface\\AddOns\\KkthnxUI\\Media\\DataText\\fps.blp")
SystemDataText.Texture:SetSize(15, 15)
SystemDataText.Texture:SetVertexColor(unpack(C["DataText"].IconColor))
- SystemDataText.Text = SystemDataText:CreateFontString("OVERLAY")
- SystemDataText.Text:SetFontObject(K.UIFont)
- SystemDataText.Text:SetPoint("LEFT", SystemDataText.Texture, "RIGHT", 4, 0)
+ SystemDataText:SetAllPoints(SystemDataText.Text)
- SystemDataText:SetScript("OnUpdate", OnUpdate)
SystemDataText:SetScript("OnEnter", OnEnter)
SystemDataText:SetScript("OnLeave", OnLeave)
SystemDataText:SetScript("OnMouseUp", OnMouseUp)
-
- K.Mover(SystemDataText, "KKUI_SystemDataText", "KKUI_SystemDataText", { "TOPLEFT", UIParent, "TOPLEFT", 0, 0 })
+ SystemDataText:SetScript("OnUpdate", OnUpdate)
end
+
+K.SystemDataText = SystemDataText
diff --git a/KkthnxUI/Modules/DataText/Elements/Time.lua b/KkthnxUI/Modules/DataText/Elements/Time.lua
index 13d25456..9ad0c8ae 100644
--- a/KkthnxUI/Modules/DataText/Elements/Time.lua
+++ b/KkthnxUI/Modules/DataText/Elements/Time.lua
@@ -12,6 +12,7 @@ local tonumber = tonumber
local CALENDAR_FULLDATE_MONTH_NAMES = CALENDAR_FULLDATE_MONTH_NAMES
local CALENDAR_WEEKDAY_NAMES = CALENDAR_WEEKDAY_NAMES
+local C_AreaPoiInfo_GetAreaPOIInfo = C_AreaPoiInfo.GetAreaPOIInfo
local C_AreaPoiInfo_GetAreaPOISecondsLeft = C_AreaPoiInfo.GetAreaPOISecondsLeft
local C_Calendar_GetDayEvent = C_Calendar.GetDayEvent
local C_Calendar_GetNumDayEvents = C_Calendar.GetNumDayEvents
@@ -25,7 +26,6 @@ local C_TaskQuest_GetQuestInfoByQuestID = C_TaskQuest.GetQuestInfoByQuestID
local C_TaskQuest_GetThreatQuests = C_TaskQuest.GetThreatQuests
local FULLDATE = FULLDATE
local GameTime_GetGameTime = GameTime_GetGameTime
-local C_AreaPoiInfo_GetAreaPOIInfo = C_AreaPoiInfo.GetAreaPOIInfo
local GameTime_GetLocalTime = GameTime_GetLocalTime
local GameTooltip = GameTooltip
local GetCVar = GetCVar
@@ -45,7 +45,6 @@ local TIMEMANAGER_TICKER_12HOUR = TIMEMANAGER_TICKER_12HOUR
local TIMEMANAGER_TICKER_24HOUR = TIMEMANAGER_TICKER_24HOUR
local TimeDataText
-local TimeDataTextEntered
-- Data
local region = GetCVar("portal")
@@ -63,7 +62,7 @@ local bfaZoneTime = {
local invIndex = {
[1] = { title = L["Legion Invasion"], duration = 66600, maps = { 630, 641, 650, 634 }, timeTable = {}, baseTime = legionZoneTime[region] or legionZoneTime["CN"] },
[2] = {
- title = L["BFA Invasion"],
+ title = L["Faction Assault"],
duration = 68400,
maps = { 862, 863, 864, 896, 942, 895 },
timeTable = { 4, 1, 6, 2, 5, 3 },
@@ -136,8 +135,7 @@ end
-- Declare onUpdateTimer as a local variable
local onUpdateTimer = onUpdateTimer or 3
--- Assuming Module is already defined somewhere in your code
-function Module:TimeOnUpdate(elapsed)
+local function OnUpdate(_, elapsed)
onUpdateTimer = onUpdateTimer + elapsed
if onUpdateTimer > 5 then
local color = C_Calendar_GetNumPendingInvites() > 0 and "|cffFF0000" or ""
@@ -147,7 +145,7 @@ function Module:TimeOnUpdate(elapsed)
else
hour, minute = GetGameTime()
end
- TimeDataText.Font:SetText(updateTimerFormat(color, hour, minute))
+ TimeDataText.Text:SetText(updateTimerFormat(color, hour, minute))
onUpdateTimer = 0
end
@@ -312,14 +310,14 @@ local function addTitle(text)
end
end
-function Module:TimeOnShiftDown()
- if TimeDataTextEntered then
- Module:TimeOnEnter()
+local function OnShiftDown()
+ if Module.Entered then
+ Module:OnEnter()
end
end
-function Module:TimeOnEnter()
- TimeDataTextEntered = true
+function Module:OnEnter()
+ Module.Entered = true
RequestRaidInfo()
@@ -336,9 +334,9 @@ function Module:TimeOnEnter()
GameTooltip:AddDoubleLine(L["Realm Time"], GameTime_GetGameTime(true), nil, nil, nil, 192 / 255, 192 / 255, 192 / 255)
-- World bosses
+ title = false
local numSavedWorldBosses = GetNumSavedWorldBosses()
if numSavedWorldBosses > 0 then
- title = false
addTitle(RAID_INFO_WORLD_BOSS)
for i = 1, numSavedWorldBosses do
local name, id, reset = GetSavedWorldBossInfo(i)
@@ -512,16 +510,16 @@ function Module:TimeOnEnter()
GameTooltip:AddLine(K.RightButton .. GAMETIME_TOOLTIP_TOGGLE_CLOCK)
GameTooltip:Show()
- K:RegisterEvent("MODIFIER_STATE_CHANGED", Module.TimeOnShiftDown)
+ K:RegisterEvent("MODIFIER_STATE_CHANGED", OnShiftDown)
end
-function Module:TimeOnLeave()
- TimeDataTextEntered = false
+local function OnLeave()
+ Module.Entered = true
K.HideTooltip()
- K:UnregisterEvent("MODIFIER_STATE_CHANGED", Module.TimeOnShiftDown)
+ K:UnregisterEvent("MODIFIER_STATE_CHANGED", OnShiftDown)
end
-function Module:TimeOnMouseUp(btn)
+local function OnMouseUp(_, btn)
if btn == "RightButton" then
_G.ToggleTimeManager()
elseif btn == "MiddleButton" then
@@ -551,18 +549,18 @@ function Module:CreateTimeDataText()
return
end
- TimeDataText = TimeDataText or CreateFrame("Frame", "KKUI_TimeDataText", Minimap)
+ TimeDataText = CreateFrame("Frame", nil, UIParent)
TimeDataText:SetFrameLevel(8)
+ TimeDataText:SetHitRectInsets(0, 0, -10, -10)
- TimeDataText.Font = TimeDataText.Font or TimeDataText:CreateFontString("OVERLAY")
- TimeDataText.Font:SetFontObject(K.UIFont)
- TimeDataText.Font:SetFont(select(1, TimeDataText.Font:GetFont()), 13, select(3, TimeDataText.Font:GetFont()))
- TimeDataText.Font:SetPoint("BOTTOM", _G.Minimap, "BOTTOM", 0, 2)
+ TimeDataText.Text = K.CreateFontString(TimeDataText, 13)
+ TimeDataText.Text:ClearAllPoints()
+ TimeDataText.Text:SetPoint("BOTTOM", _G.Minimap, "BOTTOM", 0, 2)
- TimeDataText:SetAllPoints(TimeDataText.Font)
+ TimeDataText:SetAllPoints(TimeDataText.Text)
- TimeDataText:SetScript("OnUpdate", Module.TimeOnUpdate)
- TimeDataText:SetScript("OnEnter", Module.TimeOnEnter)
- TimeDataText:SetScript("OnLeave", Module.TimeOnLeave)
- TimeDataText:SetScript("OnMouseUp", Module.TimeOnMouseUp)
+ TimeDataText:SetScript("OnEnter", Module.OnEnter)
+ TimeDataText:SetScript("OnLeave", OnLeave)
+ TimeDataText:SetScript("OnMouseUp", OnMouseUp)
+ TimeDataText:SetScript("OnUpdate", OnUpdate)
end
diff --git a/KkthnxUI/Modules/Inventory/Core.lua b/KkthnxUI/Modules/Inventory/Core.lua
index 7010754b..49ff3b29 100644
--- a/KkthnxUI/Modules/Inventory/Core.lua
+++ b/KkthnxUI/Modules/Inventory/Core.lua
@@ -536,7 +536,7 @@ function Module:CreateFreeSlots()
local slot = CreateFrame("Button", name .. "FreeSlot", self)
slot:SetSize(self.iconSize, self.iconSize)
- slot:CreateBorder(nil, nil, nil, nil, nil, nil, "Interface\\PaperDoll\\UI-PaperDoll-Slot-Bag", nil, nil, nil, { 0.7, 0.7, 0.7 })
+ slot:CreateBorder(nil, nil, nil, nil, nil, nil, "Interface\\PaperDoll\\UI-PaperDoll-Slot-Bag", nil, nil, nil, { 1, 1, 1 })
slot:StyleButton()
slot:SetScript("OnMouseUp", Module.FreeSlotOnDrop)
slot:SetScript("OnReceiveDrag", Module.FreeSlotOnDrop)
@@ -996,9 +996,6 @@ function Module:OnEnable()
end
function Backpack:OnInit()
- -----
- -- ADD LATER -- AddNewContainer("Bag", 8, "BagLegendary", filters.bagLegendary)
- -----
AddNewContainer("Bag", 6, "BagReagent", filters.onlyBagReagent)
AddNewContainer("Bag", 17, "Junk", filters.bagsJunk)
for i = 1, 5 do
@@ -1097,7 +1094,7 @@ function Module:OnEnable()
self.IconOverlay2:SetPoint("TOPLEFT", 1, -1)
self.IconOverlay2:SetPoint("BOTTOMRIGHT", -1, 1)
- self:CreateBorder(nil, nil, nil, nil, nil, nil, K.MediaFolder .. "Skins\\UI-Slot-Background", nil, nil, nil, { 0.7, 0.7, 0.7 })
+ self:CreateBorder(nil, nil, nil, nil, nil, nil, K.MediaFolder .. "Skins\\UI-Slot-Background", nil, nil, nil, { 1, 1, 1 })
self:StyleButton()
local parentFrame = CreateFrame("Frame", nil, self)
@@ -1128,10 +1125,22 @@ function Module:OnEnable()
self.usableTexture:SetVertexColor(1, 0, 0)
self.usableTexture:SetBlendMode("MOD")
- if showNewItem then
- self.glowFrame = CreateFrame("Frame", nil, self)
- self.glowFrame:SetPoint("CENTER")
- self.glowFrame:SetSize(iconSize + 8, iconSize + 8)
+ if showNewItem and not self.glowFrame then
+ self.glowFrame = CreateFrame("Frame", nil, self, "BackdropTemplate")
+ self.glowFrame:SetFrameLevel(self:GetFrameLevel() + 2)
+ self.glowFrame:SetBackdrop({ edgeFile = C["Media"].Borders.GlowBorder, edgeSize = 16 })
+ self.glowFrame:SetBackdropBorderColor(1, 223 / 255, 0, 1)
+ self.glowFrame:SetPoint("TOPLEFT", self, -6, 6)
+ self.glowFrame:SetPoint("BOTTOMRIGHT", self, 6, -6)
+
+ self.glowFrame.Animation = self.glowFrame.Animation or self.glowFrame:CreateAnimationGroup()
+ self.glowFrame.Animation:SetLooping("BOUNCE")
+
+ self.glowFrame.Animation.FadeOut = self.glowFrame.Animation.FadeOut or self.glowFrame.Animation:CreateAnimation("Alpha")
+ self.glowFrame.Animation.FadeOut:SetFromAlpha(1)
+ self.glowFrame.Animation.FadeOut:SetToAlpha(0.1)
+ self.glowFrame.Animation.FadeOut:SetDuration(0.6)
+ self.glowFrame.Animation.FadeOut:SetSmoothing("IN_OUT")
end
self:HookScript("OnClick", Module.ButtonOnClick)
@@ -1149,25 +1158,31 @@ function Module:OnEnable()
end
function MyButton:ItemOnEnter()
- if self.glowFrame then
- K.LibCustomGlow.ButtonGlow_Stop(self.glowFrame)
- C_NewItems_RemoveNewItem(self.bagId, self.slotId)
+ if self.glowFrame and self.glowFrame.Animation then
+ local isNewItem = C_NewItems.IsNewItem(self.bagId, self.slotId)
+ local isAnimationPlaying = self.glowFrame.Animation:IsPlaying()
+
+ if not isNewItem and isAnimationPlaying then
+ self.glowFrame.Animation:Stop()
+ self.glowFrame:Hide()
+ C_NewItems_RemoveNewItem(self.bagId, self.slotId)
+ end
end
end
local bagTypeColor = {
- [0] = { 1, 1, 1, 0.3 }, -- 容器
- [1] = false, -- 灵魂袋
- [2] = { 0, 0.5, 0, 0.25 }, -- 草药袋
- [3] = { 0.8, 0, 0.8, 0.25 }, -- 附魔袋
- [4] = { 1, 0.8, 0, 0.25 }, -- 工程袋
- [5] = { 0, 0.8, 0.8, 0.25 }, -- 宝石袋
- [6] = { 0.5, 0.4, 0, 0.25 }, -- 矿石袋
- [7] = { 0.8, 0.5, 0.5, 0.25 }, -- 制皮包
- [8] = { 0.8, 0.8, 0.8, 0.25 }, -- 铭文包
- [9] = { 0.4, 0.6, 1, 0.25 }, -- 工具箱
- [10] = { 0.8, 0, 0, 0.25 }, -- 烹饪包
- [11] = { 0.2, 0.8, 0.2, 0.25 }, -- 材料包
+ [0] = { 1, 1, 1, 0.3 }, -- Container
+ [1] = false, -- Soul Bag
+ [2] = { 0, 0.5, 0, 0.25 }, -- Herb Bag
+ [3] = { 0.8, 0, 0.8, 0.25 }, -- Enchanting Bag
+ [4] = { 1, 0.8, 0, 0.25 }, -- Engineering Bag
+ [5] = { 0, 0.8, 0.8, 0.25 }, -- Gem Bag
+ [6] = { 0.5, 0.4, 0, 0.25 }, -- Mining Bag
+ [7] = { 0.8, 0.5, 0.5, 0.25 }, -- Leatherworking Bag
+ [8] = { 0.8, 0.8, 0.8, 0.25 }, -- Inscription Bag
+ [9] = { 0.4, 0.6, 1, 0.25 }, -- Toolbox
+ [10] = { 0.8, 0, 0, 0.25 }, -- Cooking Bag
+ [11] = { 0.2, 0.8, 0.2, 0.25 }, -- Material Bag
}
local function isItemNeedsLevel(item)
@@ -1221,7 +1236,7 @@ function Module:OnEnable()
function MyButton:OnUpdateButton(item)
if self.JunkIcon then
- if (MerchantFrame:IsShown() or customJunkEnable) and (item.quality == Enum.ItemQuality.Poor or KkthnxUIDB.Variables[K.Realm][K.Name].CustomJunkList[item.id]) and item.hasPrice then
+ if (item.quality == Enum.ItemQuality.Poor or KkthnxUIDB.Variables[K.Realm][K.Name].CustomJunkList[item.id]) and item.hasPrice then
self.JunkIcon:Show()
else
self.JunkIcon:Hide()
@@ -1285,23 +1300,26 @@ function Module:OnEnable()
local BoE, BoU = item.bindType == 2, item.bindType == 3
if not item.bound and (BoE or BoU) then
local color = K.QualityColors[item.quality]
- self.bindType:SetText(BoE and "BoE" or "BoU") -- Local these asap
+ self.bindType:SetText(BoE and L["BoE"] or L["BoU"]) -- Local these asap
self.bindType:SetTextColor(color.r, color.g, color.b)
end
end
if self.glowFrame then
if C_NewItems_IsNewItem(item.bagId, item.slotId) then
- local color = K.QualityColors[item.quality]
+ local color = K.QualityColors[item.quality] or {}
if item.questID or item.isQuestItem then
- K.LibCustomGlow.ButtonGlow_Start(self.glowFrame, { 1, 0.82, 0.2, 1 })
- elseif color and item.quality and item.quality > -1 then
- K.LibCustomGlow.ButtonGlow_Start(self.glowFrame, { color.r, color.g, color.b, 1 })
+ self.glowFrame:SetBackdropBorderColor(1, 0.82, 0.2, 1)
+ elseif color.r and color.g and color.b then
+ self.glowFrame:SetBackdropBorderColor(color.r, color.g, color.b, 1)
else
- K.LibCustomGlow.ButtonGlow_Start(self.glowFrame)
+ self.glowFrame:SetBackdropBorderColor(1, 223 / 255, 0, 1)
end
+ self.glowFrame:Show()
+ self.glowFrame.Animation:Play()
else
- K.LibCustomGlow.ButtonGlow_Stop(self.glowFrame)
+ self.glowFrame:Hide()
+ self.glowFrame.Animation:Stop()
end
end
@@ -1314,7 +1332,7 @@ function Module:OnEnable()
end
-- Hide empty tooltip
- if not item.texture and GameTooltip:GetOwner() == self then
+ if not item.texture and not GameTooltip:IsForbidden() and GameTooltip:GetOwner() == self then
GameTooltip:Hide()
end
@@ -1411,37 +1429,42 @@ function Module:OnEnable()
Module.CreateFreeSlots(self)
local label
- if string_match(name, "AzeriteItem$") then
+ -- Use patterns with '$' to match the end of the string
+ if name:match("AzeriteItem$") then
label = "Azerite Armor"
- elseif string_match(name, "Equipment$") then
+ elseif name:match("Equipment$") then
label = BAG_FILTER_EQUIPMENT
- elseif string_match(name, "EquipSet$") then
- label = L["Equipement Set"]
- elseif string_match(name, "Legendary$") then
- label = LOOT_JOURNAL_LEGENDARIES
- elseif string_match(name, "Consumable$") then
- label = BAG_FILTER_CONSUMABLES
+ elseif name:match("EquipSet$") then
+ label = L["Equipment Set"]
elseif name == "Junk" then
label = BAG_FILTER_JUNK
- elseif string_match(name, "Collection") then
- label = COLLECTIONS
- elseif string_match(name, "Goods") then
- label = AUCTION_CATEGORY_TRADE_GOODS
- elseif string_match(name, "Quest") then
- label = QUESTS_LABEL
- elseif string_match(name, "Anima") then
- label = POWER_TYPE_ANIMA
elseif name == "BagRelic" then
label = "Korthian Relics"
- elseif strmatch(name, "Custom%d") then
- label = GetCustomGroupTitle(settings.Index)
elseif name == "BagReagent" then
label = "Reagent Bag"
elseif name == "BagStone" then
label = GetSpellInfo(404861)
+ else
+ if name:match("Legendary$") then
+ label = LOOT_JOURNAL_LEGENDARIES
+ elseif name:match("Consumable$") then
+ label = BAG_FILTER_CONSUMABLES
+ elseif name:match("Collection") then
+ label = COLLECTIONS
+ elseif name:match("Goods") then
+ label = AUCTION_CATEGORY_TRADE_GOODS
+ elseif name:match("Quest") then
+ label = QUESTS_LABEL
+ elseif name:match("Anima") then
+ label = POWER_TYPE_ANIMA
+ elseif name:match("Custom%d") then
+ -- If 'name' matches the pattern "Custom%d", call GetCustomGroupTitle
+ label = GetCustomGroupTitle(settings.Index)
+ end
end
if label then
+ -- Create font string only if label is found
self.label = K.CreateFontString(self, 13, label, "OUTLINE", true, "TOPLEFT", 6, -8)
return
end
diff --git a/KkthnxUI/Modules/Inventory/Elements/AutoRepair.lua b/KkthnxUI/Modules/Inventory/Elements/AutoRepair.lua
index ca527212..08b097ca 100644
--- a/KkthnxUI/Modules/Inventory/Elements/AutoRepair.lua
+++ b/KkthnxUI/Modules/Inventory/Elements/AutoRepair.lua
@@ -14,94 +14,70 @@ local IsShiftKeyDown = IsShiftKeyDown
local LE_GAME_ERR_GUILD_NOT_ENOUGH_MONEY = LE_GAME_ERR_GUILD_NOT_ENOUGH_MONEY
-- Auto repair
-local autoRepair -- function that handles the repair of all items
-local canRepair -- boolean indicating if repair is possible
-local isBankEmpty -- boolean indicating if guild bank is empty
-local isShown -- boolean indicating if the function is currently shown
-local repairAllCost -- cost to repair all items
+local autoRepair
+local canRepair
+local isBankEmpty
+local isShown
+local repairAllCost
local function delayFunc()
- -- Check if the guild bank is empty
if isBankEmpty then
- -- Call the autoRepair function with the override argument set to true
autoRepair(true)
else
- -- Print a message indicating that the repair was done with the guild bank
K.Print(string_format("%s%s", K.SystemColor .. L["Repaired Items Guild"], K.FormatMoney(repairAllCost)))
end
end
function autoRepair(override)
- -- If the function is already shown and override is not set, return immediately
if isShown and not override then
return
end
- -- set isShown to true and isBankEmpty to false
isShown = true
isBankEmpty = false
- -- Get the player's current money
local myMoney = GetMoney()
-
- -- Get the cost to repair all items and check if repair is possible
repairAllCost, canRepair = GetRepairAllCost()
- -- If repair is possible and there is a cost to repair
if canRepair and repairAllCost > 0 then
- -- If override is not set, check if C["Inventory"].AutoRepair.Value is 1 and the player is in a guild and the guild bank can repair
if not override and C["Inventory"].AutoRepair.Value == 1 and IsInGuild() and CanGuildBankRepair() and GetGuildBankWithdrawMoney() >= repairAllCost then
_G.RepairAllItems(true)
else
- -- If the player has enough money, repair the items and print a message
if myMoney > repairAllCost then
_G.RepairAllItems()
K.Print(string_format("%s%s", K.SystemColor .. L["Repaired Items"], K.FormatMoney(repairAllCost)))
return
else
- -- If the player doesn't have enough money, print a message
K.Print(K.SystemColor .. L["Repaired Failed"] .. K.Name)
return
end
end
-
- -- Wait 0.5 seconds before calling delayFunc
C_Timer_After(0.5, delayFunc)
end
end
local function checkBankFund(_, msgType)
- -- Check if the message type is indicating that the guild doesn't have enough money
if msgType == LE_GAME_ERR_GUILD_NOT_ENOUGH_MONEY then
- -- Set the isBankEmpty variable to true
isBankEmpty = true
end
end
local function merchantClose()
- -- Set isShown to false
isShown = false
- -- Unregister the UI_ERROR_MESSAGE event
K:UnregisterEvent("UI_ERROR_MESSAGE", checkBankFund)
- -- Unregister the MERCHANT_CLOSED event
K:UnregisterEvent("MERCHANT_CLOSED", merchantClose)
end
local function merchantShow()
- -- If shift key is down or C["Inventory"].AutoRepair.Value is 0 or the merchant can't repair, return
if IsShiftKeyDown() or C["Inventory"].AutoRepair.Value == 0 or not CanMerchantRepair() then
return
end
- -- Call the autoRepair function
autoRepair()
- -- Register the UI_ERROR_MESSAGE event
K:RegisterEvent("UI_ERROR_MESSAGE", checkBankFund)
- -- Register the MERCHANT_CLOSED event
K:RegisterEvent("MERCHANT_CLOSED", merchantClose)
end
function Module:CreateAutoRepair()
- -- Register the MERCHANT_SHOW event
K:RegisterEvent("MERCHANT_SHOW", merchantShow)
end
diff --git a/KkthnxUI/Modules/Inventory/Elements/AutoSell.lua b/KkthnxUI/Modules/Inventory/Elements/AutoSell.lua
index c54c1fe0..fe4be8e9 100644
--- a/KkthnxUI/Modules/Inventory/Elements/AutoSell.lua
+++ b/KkthnxUI/Modules/Inventory/Elements/AutoSell.lua
@@ -1,4 +1,4 @@
-local K, C, L = KkthnxUI[1], KkthnxUI[2], KkthnxUI[3]
+local K, C = KkthnxUI[1], KkthnxUI[2]
local Module = K:GetModule("Bags")
local table_wipe = table.wipe
@@ -10,66 +10,54 @@ local C_Timer_After = C_Timer.After
local C_TransmogCollection_GetItemInfo = C_TransmogCollection.GetItemInfo
local IsShiftKeyDown = IsShiftKeyDown
-local stop = true -- a flag used to stop the selling process
-local cache = {} -- a table used to store items that have already been processed
-local errorText = ERR_VENDOR_DOESNT_BUY -- error message for when the vendor doesn't buy certain items
+local autoSellStop = true -- Flag to stop the selling process
+local sellCache = {} -- Table to store items that have already been processed
+local errorText = ERR_VENDOR_DOESNT_BUY -- Error message for when the vendor doesn't buy certain items
local function startSelling()
- -- if the stop flag is set, exit the function
- if stop then
+ if autoSellStop then
return
end
- -- loop through all bags
for bag = 0, 5 do
- -- loop through all slots in the current bag
for slot = 1, C_Container_GetContainerNumSlots(bag) do
- -- if the stop flag is set, exit the function
- if stop then
+ if autoSellStop then
return
end
- -- get information about the item in the current slot
local info = C_Container_GetContainerItemInfo(bag, slot)
- if info then
- if not cache["b" .. bag .. "s" .. slot] and info.hyperlink and not info.hasNoValue and (info.quality == 0 or KkthnxUIDB.Variables[K.Realm][K.Name].CustomJunkList[info.itemID]) and (not Module:IsPetTrashCurrency(info.itemID)) and (not C_TransmogCollection_GetItemInfo(info.hyperlink) or not K.IsUnknownTransmog(bag, slot)) then
- cache["b" .. bag .. "s" .. slot] = true
- C_Container_UseContainerItem(bag, slot)
- C_Timer_After(0.15, startSelling)
- return
- end
+ if info and not sellCache["b" .. bag .. "s" .. slot] and info.hyperlink and not info.hasNoValue and (info.quality == 0 or KkthnxUIDB.Variables[K.Realm][K.Name].CustomJunkList[info.itemID]) and (not Module:IsPetTrashCurrency(info.itemID)) and (not C_TransmogCollection_GetItemInfo(info.hyperlink) or not K.IsUnknownTransmog(bag, slot)) then
+ sellCache["b" .. bag .. "s" .. slot] = true
+ C_Container_UseContainerItem(bag, slot)
+ C_Timer_After(0.15, startSelling)
+ return
end
end
end
end
-local function updateSelling(event, ...)
- -- exit if AutoSell feature is not enabled
+local function updateAutoSell(event, ...)
if not C["Inventory"].AutoSell then
return
end
local _, arg = ...
if event == "MERCHANT_SHOW" then
- -- exit if shift key is pressed
if IsShiftKeyDown() then
return
end
- -- set stop flag to false and clear cache table
- stop = false
- table_wipe(cache)
- -- start selling items
+ autoSellStop = false
+ table_wipe(sellCache)
startSelling()
- -- register for error messages and merchant close events
- K:RegisterEvent("UI_ERROR_MESSAGE", updateSelling)
- elseif event == "UI_ERROR_MESSAGE" and arg == errorText or event == "MERCHANT_CLOSED" then
- -- set stop flag to true
- stop = true
+ K:RegisterEvent("UI_ERROR_MESSAGE", updateAutoSell)
+ elseif (event == "UI_ERROR_MESSAGE" and arg == errorText) or event == "MERCHANT_CLOSED" then
+ autoSellStop = true
+ K:UnregisterEvent("UI_ERROR_MESSAGE")
end
end
function Module:CreateAutoSell()
- K:RegisterEvent("MERCHANT_SHOW", updateSelling)
- K:RegisterEvent("MERCHANT_CLOSED", updateSelling)
+ K:RegisterEvent("MERCHANT_SHOW", updateAutoSell)
+ K:RegisterEvent("MERCHANT_CLOSED", updateAutoSell)
end
diff --git a/KkthnxUI/Modules/Load_Modules.xml b/KkthnxUI/Modules/Load_Modules.xml
index bd7457c3..e1c4fb18 100644
--- a/KkthnxUI/Modules/Load_Modules.xml
+++ b/KkthnxUI/Modules/Load_Modules.xml
@@ -9,6 +9,7 @@
+
@@ -26,11 +27,9 @@
-
-
@@ -39,17 +38,17 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -110,6 +109,7 @@
+
@@ -173,6 +173,7 @@
+
@@ -186,6 +187,7 @@
+
\ No newline at end of file
diff --git a/KkthnxUI/Modules/Loot/Core.lua b/KkthnxUI/Modules/Loot/Core.lua
index 49112856..75f0f791 100644
--- a/KkthnxUI/Modules/Loot/Core.lua
+++ b/KkthnxUI/Modules/Loot/Core.lua
@@ -1,7 +1,6 @@
local K, C, L = KkthnxUI[1], KkthnxUI[2], KkthnxUI[3]
local Module = K:NewModule("Loot")
-local unpack = unpack
local tinsert = tinsert
local next = next
local max = max
@@ -269,13 +268,13 @@ function Module:LOOT_OPENED(_, autoloot)
local questTexture = slot.questTexture
if questId and not isActive then
questTexture:Show()
- K.LibCustomGlow.ButtonGlow_Start(slot.iconFrame)
+ K.ShowOverlayGlow(slot.iconFrame)
elseif questId or isQuestItem then
questTexture:Hide()
- K.LibCustomGlow.ButtonGlow_Start(slot.iconFrame)
+ K.ShowOverlayGlow(slot.iconFrame)
else
questTexture:Hide()
- K.LibCustomGlow.ButtonGlow_Stop(slot.iconFrame)
+ K.HideOverlayGlow(slot.iconFrame)
end
-- Check for FasterLooting scripts or w/e (if bag is full)
diff --git a/KkthnxUI/Modules/Loot/Elements/FasterLoot.lua b/KkthnxUI/Modules/Loot/Elements/FasterLoot.lua
index 43af037f..4ad01dca 100644
--- a/KkthnxUI/Modules/Loot/Elements/FasterLoot.lua
+++ b/KkthnxUI/Modules/Loot/Elements/FasterLoot.lua
@@ -7,88 +7,19 @@ local GetNumLootItems = GetNumLootItems
local GetTime = GetTime
local IsModifiedClick = IsModifiedClick
local LootSlot = LootSlot
-local GetItemInfo = GetItemInfo
-local GetItemFamily = GetItemFamily
-local C_Container_GetContainerNumFreeSlots = C_Container.GetContainerNumFreeSlots
-local GetItemCount = GetItemCount
-local PlaySound = PlaySound
+local SlashCmdList = SlashCmdList
--- Variable to store the time of the last loot action
local lootDelay = 0
-local isItemLocked = false
--- Function to check if an item can be looted based on bag space and item type
-local function CanLootItem(itemLink, itemQuantity)
- if not itemLink then
- -- print("Item link is nil.")
- return false
- end
-
- -- print("Checking if can loot item:", itemLink, itemQuantity)
- local itemStackSize, _, _, _, _, _, _, _, _, isCraftingReagent = select(8, GetItemInfo(itemLink))
- local itemFamily = GetItemFamily(itemLink)
-
- for i = BACKPACK_CONTAINER, NUM_TOTAL_EQUIPPED_BAG_SLOTS or NUM_BAG_SLOTS do
- local free, bagFamily = C_Container_GetContainerNumFreeSlots(i)
- if i == 5 then
- if isCraftingReagent and free > 0 then
- return true
- end
- break
- end
-
- if free > 0 then
- if not bagFamily or bagFamily == 0 or (itemFamily and bit.band(itemFamily, bagFamily) > 0) then
- return true
- end
- end
- end
-
- local inventoryItemCount = GetItemCount(itemLink)
- if inventoryItemCount > 0 and itemStackSize > 1 then
- if ((itemStackSize - inventoryItemCount) % itemStackSize) >= itemQuantity then
- return true
- end
- end
-
- return false
-end
-
--- Function to play a sound when the inventory is full
-local function PlayInventoryFullSound()
- -- if C["Loot"].EnableSound and not isItemLocked then
- if not isItemLocked then
- PlaySound(44321, "master") -- Replace 44321 with your preferred sound ID
- end
-end
-
--- Function to handle error messages related to looting
-local function HandleErrorMessage(_, event, errorType)
- -- print("Handling error message:", event, errorType)
- if tContains({ ERR_INV_FULL, ERR_ITEM_MAX_COUNT, ERR_LOOT_ROLL_PENDING }, errorType) then
- PlayInventoryFullSound()
- end
-end
-
--- Function to handle faster looting
+-- Function to handle faster loot
local function HandleFasterLoot()
local thisTime = GetTime()
-
if thisTime - lootDelay >= 0.3 then
lootDelay = thisTime
- isItemLocked = false
if GetCVarBool("autoLootDefault") ~= IsModifiedClick("AUTOLOOTTOGGLE") then
for i = GetNumLootItems(), 1, -1 do
- local lootSlotType = GetLootSlotType(i)
- local itemLink = GetLootSlotLink(i)
- local lootQuantity, _, _, lootLocked = GetLootSlotInfo(i)
-
- if lootLocked then
- isItemLocked = true
- elseif lootSlotType ~= Enum.LootSlotType.Item or CanLootItem(itemLink, lootQuantity) then
- LootSlot(i)
- end
+ LootSlot(i)
end
lootDelay = thisTime
end
@@ -99,9 +30,7 @@ end
function Module:CreateFasterLoot()
if C["Loot"].FastLoot then
K:RegisterEvent("LOOT_READY", HandleFasterLoot)
- K:RegisterEvent("UI_ERROR_MESSAGE", HandleErrorMessage)
else
K:UnregisterEvent("LOOT_READY", HandleFasterLoot)
- K:UnregisterEvent("UI_ERROR_MESSAGE", HandleErrorMessage)
end
end
diff --git a/KkthnxUI/Modules/Loot/Elements/GroupLoot.lua b/KkthnxUI/Modules/Loot/Elements/GroupLoot.lua
index 45a50c5d..e5bf351b 100644
--- a/KkthnxUI/Modules/Loot/Elements/GroupLoot.lua
+++ b/KkthnxUI/Modules/Loot/Elements/GroupLoot.lua
@@ -1,4 +1,4 @@
-local K, C = KkthnxUI[1], KkthnxUI[2]
+local K, C, L = KkthnxUI[1], KkthnxUI[2], KkthnxUI[3]
local Module = K:GetModule("Loot")
-- Lua functions
@@ -346,7 +346,7 @@ function Module:LootRoll_Start(rollID, rollTime)
end
-- Update bind and loot text
- bar.fsbind:SetText(bindOnPickUp and "BoP" or "BoE")
+ bar.fsbind:SetText(bindOnPickUp and L["BoP"] or L["BoE"])
bar.fsbind:SetVertexColor(bindOnPickUp and 1 or 0.3, bindOnPickUp and 0.3 or 1, bindOnPickUp and 0.1 or 0.3)
bar.fsloot:SetText(name)
@@ -452,98 +452,3 @@ function Module:CreateGroupLoot()
_G.UIParent:UnregisterEvent("START_LOOT_ROLL")
_G.UIParent:UnregisterEvent("CANCEL_LOOT_ROLL")
end
-
--- Hide the parent of the clicked button
-local function OnClick_Hide(self)
- self:GetParent():Hide()
-end
-
--- Function to test the loot roll
-local testFrame
-function Module:LootRollTest()
- if not parentFrame then
- return
- end
-
- if testFrame then
- testFrame:SetShown(not testFrame:IsShown())
- return
- end
-
- testFrame = Module:CreateRollBar("KKUI_LootRoll")
- testFrame.isTest = true
- testFrame:SetPoint("TOP", parentFrame, "TOP")
- testFrame:Show()
-
- -- Set hide script for roll buttons
- local buttons = { testFrame.need, testFrame.transmog, testFrame.greed, testFrame.pass }
- for _, button in ipairs(buttons) do
- button:SetScript("OnClick", OnClick_Hide)
- end
- testFrame.greed:Hide()
- if testFrame.disenchant then
- testFrame.disenchant:SetScript("OnClick", OnClick_Hide)
- end
-
- -- Randomly select a test item
- local itemID, name, quality, itemLevel, icon = 122349, "Bloodied Arcanite Reaper", 7, 79, 132400 -- ??
- local color = ITEM_QUALITY_COLORS[quality]
-
- -- Set test frame item details
- testFrame.button.icon:SetTexture(icon)
- testFrame.button.link = "|cffa335ee|Hitem:" .. itemID .. "::::::::17:::::::|h[" .. name .. "]|h|r"
- testFrame.fsloot:SetText(name)
- testFrame.fsbind:SetText(bop and "BoP" or "BoE")
- testFrame.fsbind:SetVertexColor(bop and 1 or 0.3, bop and 0.3 or 1, bop and 0.1 or 0.3)
-
- testFrame.transmog:SetShown(canTransmog)
- testFrame.greed:SetShown(not canTransmog)
-
- testFrame.status:SetStatusBarColor(color.r, color.g, color.b, 0.7)
- testFrame.status.KKUI_Border:SetVertexColor(color.r, color.g, color.b)
- testFrame.status:SetMinMaxValues(0, 100)
- testFrame.status:SetValue(80)
- testFrame.status.spark:SetColorTexture(color.r, color.g, color.b, 0.5)
- testFrame.button.itemLevel = itemLevel
- testFrame.button.color = color
- testFrame.button.ilvl:SetText(itemLevel or "")
- testFrame.button.ilvl:SetTextColor(color.r, color.g, color.b)
- testFrame.button.KKUI_Border:SetVertexColor(color.r, color.g, color.b)
-end
-
--- Function to update loot roll test
-function Module:UpdateLootRollTest()
- if not parentFrame or not testFrame then
- Module:LootRollTest()
- return
- end
-
- -- Update test frame size and font
- testFrame:SetSize(RollWidth, RollHeight)
- testFrame.button:SetSize(RollHeight, RollHeight)
- testFrame.fsbind:SetFontObject(K.UIFontOutline)
- testFrame.fsloot:SetFontObject(K.UIFontOutline)
-
- -- Update size of roll buttons
- local buttons = { testFrame.need, testFrame.transmog, testFrame.greed, testFrame.pass, testFrame.disenchant }
- for _, button in ipairs(buttons) do
- if button then
- button:SetSize(RollHeight - 4, RollHeight - 4)
- end
- end
-
- testFrame.status:SetAllPoints()
-
- -- Update item level and border color
- local itemLevel, color = testFrame.button.itemLevel, testFrame.button.color
- testFrame.button.ilvl:SetText(itemLevel or "")
- testFrame.button.ilvl:SetFontObject(K.UIFontOutline)
- testFrame.button.KKUI_Border:SetVertexColor(color.r, color.g, color.b)
-end
-
--- Slash command for testing loot roll
-SlashCmdList["KKUI_LOOTROLL_TESTING"] = function()
- Module:LootRollTest()
-end
-SLASH_KKUI_LOOTROLL_TESTING1 = "/testroll"
-SLASH_KKUI_LOOTROLL_TESTING2 = "/rolltest"
diff --git a/KkthnxUI/Modules/Maps/Elements/MapReveal.lua b/KkthnxUI/Modules/Maps/Elements/MapReveal.lua
index 7176f92c..abc338cd 100644
--- a/KkthnxUI/Modules/Maps/Elements/MapReveal.lua
+++ b/KkthnxUI/Modules/Maps/Elements/MapReveal.lua
@@ -1,4 +1,4 @@
-local K, C = KkthnxUI[1], KkthnxUI[2]
+local K, C, L = KkthnxUI[1], KkthnxUI[2], KkthnxUI[3]
local Module = K:GetModule("WorldMap")
local math_ceil = math.ceil
@@ -153,6 +153,44 @@ function Module:CreateWorldMapReveal()
pin.overlayTexturePool.resetterFunc = Module.MapData_ResetTexturePool
end
+ function bu.UpdateTooltip(self)
+ if GameTooltip:IsForbidden() then
+ return
+ end
+
+ GameTooltip:SetOwner(self, "ANCHOR_TOP", 0, 10)
+
+ local r, g, b = 0.2, 1.0, 0.2
+
+ if KkthnxUIDB.Variables[K.Realm][K.Name].RevealWorldMap == true then
+ GameTooltip:AddLine(L["Reveal Enabled"])
+ GameTooltip:AddLine(" ")
+ GameTooltip:AddLine(L["Reveal Enabled Desc"], r, g, b)
+ else
+ GameTooltip:AddLine(L["Reveal Disabled"])
+ GameTooltip:AddLine(" ")
+ GameTooltip:AddLine(L["Reveal Disabled Desc"], r, g, b)
+ end
+
+ GameTooltip:Show()
+ end
+
+ bu:HookScript("OnEnter", function(self)
+ if GameTooltip:IsForbidden() then
+ return
+ end
+
+ self:UpdateTooltip()
+ end)
+
+ bu:HookScript("OnLeave", function()
+ if GameTooltip:IsForbidden() then
+ return
+ end
+
+ GameTooltip:Hide()
+ end)
+
bu:SetScript("OnClick", function(self)
KkthnxUIDB.Variables[K.Realm][K.Name].RevealWorldMap = self:GetChecked()
diff --git a/KkthnxUI/Modules/Maps/Elements/WowHeadLink.lua b/KkthnxUI/Modules/Maps/Elements/WowHeadLink.lua
index deb932f5..369d3548 100644
--- a/KkthnxUI/Modules/Maps/Elements/WowHeadLink.lua
+++ b/KkthnxUI/Modules/Maps/Elements/WowHeadLink.lua
@@ -1,223 +1,208 @@
-local K, C, L = KkthnxUI[1], KkthnxUI[2], KkthnxUI[3]
+-- KkthnxUI Namespace
+local K, C, L = unpack(KkthnxUI)
local Module = K:GetModule("WorldMap")
+-- WoW API Functions
local GameTooltip = GameTooltip
local GetAchievementLink = GetAchievementLink
local GetQuestLink = GetQuestLink
-local C_AddOns_IsAddOnLoaded = C_AddOns.IsAddOnLoaded
-local QuestMapFrame_GetDetailQuestID = QuestMapFrame_GetDetailQuestID
+local IsAddOnLoaded = IsAddOnLoaded
+local GetSuperTrackedQuestID = C_SuperTrack.GetSuperTrackedQuestID
+local CreateFrame = CreateFrame
local hooksecurefunc = hooksecurefunc
local setmetatable = setmetatable
--- Wowhead Links
-function Module:CreateWowHeadLinks()
- if not C["Misc"].ShowWowHeadLinks or C_AddOns_IsAddOnLoaded("Leatrix_Maps") then
- return
- end
+-- Wowhead URL Components
+local subDomain = (setmetatable({
+ ruRU = "ru",
+ frFR = "fr",
+ deDE = "de",
+ esES = "es",
+ esMX = "es",
+ ptBR = "pt",
+ ptPT = "pt",
+ itIT = "it",
+ koKR = "ko",
+ zhTW = "cn",
+ zhCN = "cn",
+}, {
+ __index = function()
+ return "www"
+ end,
+}))[K.Locale]
+local wowheadLoc = subDomain .. ".wowhead.com"
+local urlQuestIcon = "|TInterface\\OptionsFrame\\UI-OptionsFrame-NewFeatureIcon:0:0:0:0|t"
+
+-- Achievement Frame Functionality
+local function InitializeAchievementLink()
+ local achievementEditBox = CreateFrame("EditBox", nil, AchievementFrame)
+ achievementEditBox:ClearAllPoints()
+ achievementEditBox:SetPoint("BOTTOMRIGHT", -50, 1)
+ achievementEditBox:SetHeight(16)
+ achievementEditBox:SetFontObject("GameFontNormalSmall")
+ achievementEditBox:SetBlinkSpeed(0)
+ achievementEditBox:SetJustifyH("RIGHT")
+ achievementEditBox:SetAutoFocus(false)
+ achievementEditBox:EnableKeyboard(false)
+ achievementEditBox:SetHitRectInsets(90, 0, 0, 0)
+ achievementEditBox:SetScript("OnKeyDown", function() end)
+ achievementEditBox:SetScript("OnMouseUp", function()
+ if achievementEditBox:IsMouseOver() then
+ achievementEditBox:HighlightText()
+ else
+ achievementEditBox:HighlightText(0, 0)
+ end
+ end)
- -- Add wowhead link by Goldpaw "Lars" Norberg
- local subDomain = (setmetatable({
- ruRU = "ru",
- frFR = "fr",
- deDE = "de",
- esES = "es",
- esMX = "es",
- ptBR = "pt",
- ptPT = "pt",
- itIT = "it",
- koKR = "ko",
- zhTW = "cn",
- zhCN = "cn",
- }, {
- __index = function(t, v)
- return "www"
- end,
- }))[K.Locale]
-
- local wowheadLoc = subDomain .. ".wowhead.com"
- local urlQuestIcon = [[|TInterface\OptionsFrame\UI-OptionsFrame-NewFeatureIcon:0:0:0:0|t]]
-
- -- Achievements frame
- -- Achievement link function
- local function DoWowheadAchievementFunc()
- -- Create editbox
- local AchievementEditBox = CreateFrame("EditBox", nil, _G.AchievementFrame)
- AchievementEditBox:ClearAllPoints()
- AchievementEditBox:SetPoint("BOTTOMRIGHT", -50, 1)
- AchievementEditBox:SetHeight(16)
- AchievementEditBox:SetFontObject("GameFontNormalSmall")
- AchievementEditBox:SetBlinkSpeed(0)
- AchievementEditBox:SetJustifyH("RIGHT")
- AchievementEditBox:SetAutoFocus(false)
- AchievementEditBox:EnableKeyboard(false)
- AchievementEditBox:SetHitRectInsets(90, 0, 0, 0)
- AchievementEditBox:SetScript("OnKeyDown", function() end)
- AchievementEditBox:SetScript("OnMouseUp", function()
- if AchievementEditBox:IsMouseOver() then
- AchievementEditBox:HighlightText()
- else
- AchievementEditBox:HighlightText(0, 0)
- end
- end)
+ -- Create hidden font string (used for setting width of editbox)
+ achievementEditBox.hiddenText = achievementEditBox:CreateFontString(nil, "ARTWORK", "GameFontNormalSmall")
+ achievementEditBox.hiddenText:Hide()
- -- Create hidden font string (used for setting width of editbox)
- AchievementEditBox.FakeText = AchievementEditBox:CreateFontString(nil, "ARTWORK", "GameFontNormalSmall")
- AchievementEditBox.FakeText:Hide()
-
- -- Store last link in case editbox is cleared
- local lastAchievementLink
-
- -- Function to set editbox value
- local function SetAchievementFunc(self, achievementID)
- if achievementID then
- -- Set editbox text
- AchievementEditBox:SetText(urlQuestIcon .. "https://" .. wowheadLoc .. "/achievement=" .. achievementID)
- lastAchievementLink = AchievementEditBox:GetText()
- -- Set hidden fontstring then resize editbox to match
- AchievementEditBox.FakeText:SetText(AchievementEditBox:GetText())
- AchievementEditBox:SetWidth(AchievementEditBox.FakeText:GetStringWidth() + 90)
- -- Get achievement title for tooltip
- local achievementLink = GetAchievementLink(self.id)
- if achievementLink then
- AchievementEditBox.tiptext = achievementLink:match("%[(.-)%]") .. "|n" .. L["Press To Copy"]
- end
- -- Show the editbox
- AchievementEditBox:Show()
- end
- end
- hooksecurefunc(AchievementTemplateMixin, "DisplayObjectives", SetAchievementFunc)
- hooksecurefunc("AchievementFrameComparisonTab_OnClick", function(self)
- AchievementEditBox:Hide()
- end)
+ local lastAchievementLink
- -- Create tooltip
- AchievementEditBox:HookScript("OnEnter", function()
- AchievementEditBox:HighlightText()
- AchievementEditBox:SetFocus()
- GameTooltip:SetOwner(AchievementEditBox, "ANCHOR_TOP", 0, 10)
- GameTooltip:SetText(AchievementEditBox.tiptext, nil, nil, nil, nil, true)
- GameTooltip:Show()
- end)
+ local function SetAchievementLink(self, achievementID)
+ if achievementID then
+ local achievementURL = urlQuestIcon .. "https://" .. wowheadLoc .. "/achievement=" .. achievementID
+ achievementEditBox:SetText(achievementURL)
+ achievementEditBox.hiddenText:SetText(achievementURL)
+ achievementEditBox:SetWidth(achievementEditBox.hiddenText:GetStringWidth() + 90)
- AchievementEditBox:HookScript("OnLeave", function()
- -- Set link text again if it"s changed since it was set
- if AchievementEditBox:GetText() ~= lastAchievementLink then
- AchievementEditBox:SetText(lastAchievementLink)
+ local achievementTitle = GetAchievementLink(achievementID)
+ if achievementTitle then
+ achievementEditBox.tooltipText = achievementTitle:match("%[(.-)%]") .. "|n" .. L["Press To Copy"]
end
- AchievementEditBox:HighlightText(0, 0)
- AchievementEditBox:ClearFocus()
- GameTooltip:Hide()
- end)
- -- Hide editbox when achievement is deselected
- -- hooksecurefunc("AchievementFrameAchievements_ClearSelection", function(self)
- -- AchievementEditBox:Hide()
- -- end)
-
- -- hooksecurefunc("AchievementCategoryButton_OnClick", function(self)
- -- AchievementEditBox:Hide()
- -- end)
+ achievementEditBox:Show()
+ lastAchievementLink = achievementEditBox:GetText()
+ end
end
- -- Run function when achievement UI is loaded
- if C_AddOns.IsAddOnLoaded("Blizzard_AchievementUI") then
- DoWowheadAchievementFunc()
- else
- local waitAchievementsFrame = CreateFrame("FRAME")
- waitAchievementsFrame:RegisterEvent("ADDON_LOADED")
- waitAchievementsFrame:SetScript("OnEvent", function(self, event, arg1)
- if arg1 == "Blizzard_AchievementUI" then
- DoWowheadAchievementFunc()
- waitAchievementsFrame:UnregisterAllEvents()
- end
- end)
- end
+ hooksecurefunc(AchievementTemplateMixin, "DisplayObjectives", SetAchievementLink)
+ hooksecurefunc("AchievementFrameComparisonTab_OnClick", function(self)
+ achievementEditBox:Hide()
+ end)
- -- World map frame
- -- Hide the title text
- WorldMapFrameTitleText:Hide()
-
- -- Create editbox
- local WorldMapEditBox = CreateFrame("EditBox", nil, WorldMapFrame.BorderFrame)
- WorldMapEditBox:SetFrameLevel(999)
- WorldMapEditBox:ClearAllPoints()
- WorldMapEditBox:SetPoint("TOPLEFT", 60, -4)
- WorldMapEditBox:SetHeight(16)
- WorldMapEditBox:SetFontObject("GameFontNormal")
- WorldMapEditBox:SetBlinkSpeed(0)
- WorldMapEditBox:SetAutoFocus(false)
- WorldMapEditBox:EnableKeyboard(false)
- WorldMapEditBox:SetHitRectInsets(0, 90, 0, 0)
- WorldMapEditBox:SetScript("OnKeyDown", function() end)
- WorldMapEditBox:SetScript("OnMouseUp", function()
- if WorldMapEditBox:IsMouseOver() then
- WorldMapEditBox:HighlightText()
+ achievementEditBox:SetScript("OnEnter", function()
+ achievementEditBox:HighlightText()
+ achievementEditBox:SetFocus()
+ GameTooltip:SetOwner(achievementEditBox, "ANCHOR_TOP", 0, 10)
+ GameTooltip:SetText(achievementEditBox.tooltipText, nil, nil, nil, nil, true)
+ GameTooltip:Show()
+ end)
+
+ achievementEditBox:SetScript("OnLeave", function()
+ if achievementEditBox:GetText() ~= lastAchievementLink then
+ achievementEditBox:SetText(lastAchievementLink)
+ end
+ achievementEditBox:HighlightText(0, 0)
+ achievementEditBox:ClearFocus()
+ GameTooltip:Hide()
+ end)
+end
+
+-- World Map Functionality
+local function InitializeQuestLink()
+ local questEditBox = CreateFrame("EditBox", nil, WorldMapFrame.BorderFrame)
+ questEditBox:SetFrameLevel(501)
+ questEditBox:ClearAllPoints()
+ questEditBox:SetPoint("TOPLEFT", 100, -4)
+ questEditBox:SetHeight(16)
+ questEditBox:SetFontObject("GameFontNormal")
+ questEditBox:SetBlinkSpeed(0)
+ questEditBox:SetAutoFocus(false)
+ questEditBox:EnableKeyboard(false)
+ questEditBox:SetHitRectInsets(0, 90, 0, 0)
+ questEditBox:SetScript("OnKeyDown", function() end)
+ questEditBox:SetScript("OnMouseUp", function()
+ if questEditBox:IsMouseOver() then
+ questEditBox:HighlightText()
else
- WorldMapEditBox:HighlightText(0, 0)
+ questEditBox:HighlightText(0, 0)
end
end)
-- Create hidden font string (used for setting width of editbox)
- WorldMapEditBox.FakeText = WorldMapEditBox:CreateFontString(nil, "ARTWORK", "GameFontNormal")
- WorldMapEditBox.FakeText:Hide()
+ questEditBox.hiddenText = questEditBox:CreateFontString(nil, "ARTWORK", "GameFontNormal")
+ questEditBox.hiddenText:Hide()
- -- Function to set editbox value
- local function SetQuestInBox()
+ local function SetQuestLink()
local questID
if QuestMapFrame.DetailsFrame:IsShown() then
- -- Get quest ID from currently showing quest in details panel
questID = QuestMapFrame_GetDetailQuestID()
else
- -- Get quest ID from currently selected quest on world map
- questID = C_SuperTrack.GetSuperTrackedQuestID()
+ questID = GetSuperTrackedQuestID()
end
+
if questID then
- -- Hide editbox if quest ID is invalid
if questID == 0 then
- WorldMapEditBox:Hide()
+ questEditBox:Hide()
else
- WorldMapEditBox:Show()
+ questEditBox:Show()
end
- -- Set editbox text
- WorldMapEditBox:SetText("https://" .. wowheadLoc .. "/quest=" .. questID)
- -- Set hidden fontstring then resize editbox to match
- WorldMapEditBox.FakeText:SetText(WorldMapEditBox:GetText())
- WorldMapEditBox:SetWidth(WorldMapEditBox.FakeText:GetStringWidth() + 90)
- -- Get quest title for tooltip
- local questLink = GetQuestLink(questID) or nil
- if questLink then
- WorldMapEditBox.tiptext = questLink:match("%[(.-)%]") .. "|n" .. L["Press To Copy"]
+
+ local questURL = urlQuestIcon .. "https://" .. wowheadLoc .. "/quest=" .. questID
+ questEditBox:SetText(questURL)
+ questEditBox.hiddenText:SetText(questURL)
+ questEditBox:SetWidth(questEditBox.hiddenText:GetStringWidth() + 90)
+
+ local questTitle = GetQuestLink(questID)
+ if questTitle then
+ questEditBox.tooltipText = questTitle:match("%[(.-)%]") .. "|n" .. L["Press To Copy"]
else
- WorldMapEditBox.tiptext = ""
- if WorldMapEditBox:IsMouseOver() and GameTooltip:IsShown() then
+ questEditBox.tooltipText = ""
+ if questEditBox:IsMouseOver() and GameTooltip:IsShown() then
GameTooltip:Hide()
end
end
end
end
- -- Set URL when super tracked quest changes and on startup
- WorldMapEditBox:RegisterEvent("SUPER_TRACKING_CHANGED")
- WorldMapEditBox:SetScript("OnEvent", SetQuestInBox)
- SetQuestInBox()
-
- -- Set URL when quest details frame is shown or hidden
- hooksecurefunc("QuestMapFrame_ShowQuestDetails", SetQuestInBox)
- hooksecurefunc("QuestMapFrame_CloseQuestDetails", SetQuestInBox)
-
- -- Create tooltip
- WorldMapEditBox:HookScript("OnEnter", function()
- WorldMapEditBox:HighlightText()
- WorldMapEditBox:SetFocus()
- GameTooltip:SetOwner(WorldMapEditBox, "ANCHOR_BOTTOM", 0, -10)
- GameTooltip:SetText(WorldMapEditBox.tiptext, nil, nil, nil, nil, true)
+ questEditBox:RegisterEvent("SUPER_TRACKING_CHANGED")
+ questEditBox:SetScript("OnEvent", SetQuestLink)
+ SetQuestLink()
+
+ hooksecurefunc("QuestMapFrame_ShowQuestDetails", SetQuestLink)
+ hooksecurefunc("QuestMapFrame_CloseQuestDetails", SetQuestLink)
+
+ questEditBox:SetScript("OnEnter", function()
+ questEditBox:HighlightText()
+ questEditBox:SetFocus()
+ GameTooltip:SetOwner(questEditBox, "ANCHOR_BOTTOM", 0, -10)
+ GameTooltip:SetText(questEditBox.tooltipText, nil, nil, nil, nil, true)
GameTooltip:Show()
end)
- WorldMapEditBox:HookScript("OnLeave", function()
- WorldMapEditBox:HighlightText(0, 0)
- WorldMapEditBox:ClearFocus()
+ questEditBox:SetScript("OnLeave", function()
+ questEditBox:HighlightText(0, 0)
+ questEditBox:ClearFocus()
GameTooltip:Hide()
- SetQuestInBox()
+ SetQuestLink()
end)
end
+
+-- Main Function
+function Module:CreateWowHeadLinks()
+ if not C["Misc"].ShowWowHeadLinks or IsAddOnLoaded("Leatrix_Maps") then
+ return
+ end
+
+ if IsAddOnLoaded("Blizzard_AchievementUI") then
+ InitializeAchievementLink()
+ else
+ local waitAchievementsFrame = CreateFrame("FRAME")
+ waitAchievementsFrame:RegisterEvent("ADDON_LOADED")
+ waitAchievementsFrame:SetScript("OnEvent", function(self, _, addon)
+ if addon == "Blizzard_AchievementUI" then
+ InitializeAchievementLink()
+ self:UnregisterAllEvents()
+ end
+ end)
+ end
+
+ InitializeQuestLink()
+
+ -- Hide the title text
+ if WorldMapFrameTitleText then
+ WorldMapFrameTitleText:Hide()
+ end
+end
diff --git a/KkthnxUI/Modules/Maps/Minimap.lua b/KkthnxUI/Modules/Maps/Minimap.lua
index 075da9bf..fba1e5b2 100644
--- a/KkthnxUI/Modules/Maps/Minimap.lua
+++ b/KkthnxUI/Modules/Maps/Minimap.lua
@@ -252,21 +252,22 @@ function Module:ReskinRegions()
-- Garrison
local garrMinimapButton = ExpansionLandingPageMinimapButton
if garrMinimapButton then
+ local buttonTextureIcon = "ShipMissionIcon-Combat-Mission"
local function updateMinimapButtons(self)
self:ClearAllPoints()
- self:SetPoint("BOTTOMLEFT", Minimap, "BOTTOMLEFT", 4, 2)
- self:GetNormalTexture():SetAtlas("UI-HUD-UnitFrame-Player-CombatIcon-2x")
- self:GetPushedTexture():SetAtlas("UI-HUD-UnitFrame-Player-CombatIcon-2x")
- self:GetHighlightTexture():SetAtlas("UI-HUD-UnitFrame-Player-CombatIcon-2x")
- self:GetNormalTexture():SetVertexColor(1, 1, 1, 0.9)
+ self:SetPoint("BOTTOMLEFT", Minimap, "BOTTOMLEFT", 4, 4)
+ self:GetNormalTexture():SetAtlas(buttonTextureIcon)
+ self:GetPushedTexture():SetAtlas(buttonTextureIcon)
+ self:GetHighlightTexture():SetAtlas(buttonTextureIcon)
+ self:GetNormalTexture():SetVertexColor(1, 1, 1, 1)
self:GetPushedTexture():SetVertexColor(1, 1, 1, 1)
self:GetHighlightTexture():SetVertexColor(1, 1, 1, 1)
- self.LoopingGlow:SetAtlas("UI-HUD-UnitFrame-Player-CombatIcon-2x")
- self.LoopingGlow:SetSize(24, 24)
+ self.LoopingGlow:SetAtlas(buttonTextureIcon)
+ self.LoopingGlow:SetSize(26, 26)
self:SetHitRectInsets(0, 0, 0, 0)
- self:SetSize(24, 24)
+ self:SetSize(26, 26)
end
updateMinimapButtons(garrMinimapButton)
garrMinimapButton:HookScript("OnShow", updateMinimapButtons)
@@ -316,26 +317,26 @@ function Module:ReskinRegions()
-- QueueStatus Button
if QueueStatusButton then
QueueStatusButton:SetParent(MinimapCluster)
- QueueStatusButton:ClearAllPoints()
- QueueStatusButton:SetPoint("BOTTOMRIGHT", Minimap, "BOTTOMRIGHT", 2, -2)
+ QueueStatusButton:SetSize(24, 24)
QueueStatusButton:SetFrameLevel(999)
- QueueStatusButton:SetSize(33, 33)
-
- hooksecurefunc(QueueStatusButton, "SetPoint", function(button, _, _, _, x, y)
- if not (x == 2 and y == -2) then
- button:ClearAllPoints()
- button:SetPoint("BOTTOMRIGHT", Minimap, "BOTTOMRIGHT", 2, -2)
- end
- end)
+ QueueStatusButton:ClearAllPoints()
+ QueueStatusButton:SetPoint("BOTTOMRIGHT", Minimap, "BOTTOMRIGHT", -9, 9)
QueueStatusButtonIcon:SetAlpha(0)
QueueStatusFrame:ClearAllPoints()
QueueStatusFrame:SetPoint("TOPRIGHT", QueueStatusButton, "TOPLEFT")
+ hooksecurefunc(QueueStatusButton, "SetPoint", function(button, _, _, _, x, y)
+ if not (x == -9 and y == 9) then
+ button:ClearAllPoints()
+ button:SetPoint("BOTTOMRIGHT", Minimap, "BOTTOMRIGHT", -9, 9)
+ end
+ end)
+
local queueIcon = Minimap:CreateTexture(nil, "ARTWORK")
queueIcon:SetPoint("CENTER", QueueStatusButton)
- queueIcon:SetSize(50, 50)
+ queueIcon:SetSize(56, 56)
queueIcon:SetTexture("Interface\\Minimap\\Dungeon_Icon")
local anim = queueIcon:CreateAnimationGroup()
@@ -361,6 +362,7 @@ function Module:ReskinRegions()
queueStatusDisplay.text:ClearAllPoints()
queueStatusDisplay.text:SetPoint("CENTER", QueueStatusButton, 0, -5)
queueStatusDisplay.text:SetFontObject(K.UIFont)
+ queueStatusDisplay.text:SetFont(select(1, queueStatusDisplay.text:GetFont()), 16, select(3, queueStatusDisplay.text:GetFont()))
if queueStatusDisplay.title then
Module:ClearQueueStatus()
@@ -371,29 +373,39 @@ function Module:ReskinRegions()
-- Difficulty Flags
local instDifficulty = MinimapCluster.InstanceDifficulty
if instDifficulty then
- local function updateFlagAnchor(frame, _, _, _, _, _, force)
+ instDifficulty:SetParent(Minimap)
+ instDifficulty:SetScale(0.9)
+
+ local function UpdateFlagAnchor(frame, _, _, _, _, _, force)
if force then
return
end
frame:ClearAllPoints()
- frame:SetPoint("TOPRIGHT", Minimap, "TOPRIGHT", 2, 2, true)
+ frame:SetPoint("TOPLEFT", Minimap, "TOPLEFT", 2, -2, true)
end
- instDifficulty:SetParent(Minimap)
- instDifficulty:SetScale(0.7)
- updateFlagAnchor(instDifficulty)
- hooksecurefunc(instDifficulty, "SetPoint", updateFlagAnchor)
- local function replaceFlag(self)
- self:SetTexture(K.MediaFolder .. "Minimap\\Flag")
+ UpdateFlagAnchor(instDifficulty)
+ hooksecurefunc(instDifficulty, "SetPoint", UpdateFlagAnchor)
+
+ local function ReplaceFlagTexture(texture)
+ texture:SetTexture(K.MediaFolder .. "Minimap\\Flag")
end
- local function reskinDifficulty(frame)
- frame.Border:Hide()
- replaceFlag(frame.Background)
- hooksecurefunc(frame.Background, "SetAtlas", replaceFlag)
+
+ local function ReskinDifficultyFrame(frame)
+ if not frame then
+ return
+ end
+
+ if frame.Border then
+ frame.Border:Hide()
+ end
+ ReplaceFlagTexture(frame.Background)
+ hooksecurefunc(frame.Background, "SetAtlas", ReplaceFlagTexture)
end
- reskinDifficulty(instDifficulty.Instance)
- reskinDifficulty(instDifficulty.Guild)
- reskinDifficulty(instDifficulty.ChallengeMode)
+
+ ReskinDifficultyFrame(instDifficulty.Instance)
+ ReskinDifficultyFrame(instDifficulty.Guild)
+ ReskinDifficultyFrame(instDifficulty.ChallengeMode)
end
local function updateMapAnchor(frame, _, _, newAnchor, _, _, force)
@@ -436,7 +448,7 @@ function Module:ReskinRegions()
if GameTimeCalendarInvitesTexture then
GameTimeCalendarInvitesTexture:ClearAllPoints()
GameTimeCalendarInvitesTexture:SetParent(Minimap)
- GameTimeCalendarInvitesTexture:SetPoint("TOPRIGHT")
+ GameTimeCalendarInvitesTexture:SetPoint("TOPLEFT")
end
-- Streaming icon
@@ -556,7 +568,7 @@ function Module:ShowCalendar()
GameTimeFrame:SetSize(22, 22)
calendarText:ClearAllPoints()
- calendarText:SetPoint("CENTER", 0, -5)
+ calendarText:SetPoint("CENTER", 0, -4)
calendarText:SetFontObject(K.UIFont)
calendarText:SetFont(select(1, calendarText:GetFont()), 12, select(3, calendarText:GetFont()))
calendarText:SetTextColor(0, 0, 0)
@@ -656,7 +668,7 @@ function Module:Minimap_TrackingDropdown()
end
function Module:Minimap_OnMouseUp(btn)
- menuFrame:Hide()
+ K.EasyMenu:Hide()
if Module.TrackingDropdown then
_G.HideDropDownMenu(1, nil, Module.TrackingDropdown)
@@ -670,9 +682,9 @@ function Module:Minimap_OnMouseUp(btn)
end
if position:match("LEFT") then
- EasyMenu(menuList, menuFrame, "cursor", 0, 0)
+ EasyMenu(menuList, K.EasyMenu, "cursor", 0, 0)
else
- EasyMenu(menuList, menuFrame, "cursor", -160, 0)
+ EasyMenu(menuList, K.EasyMenu, "cursor", -160, 0)
end
elseif btn == "RightButton" and Module.TrackingDropdown then
if position:match("LEFT") then
@@ -790,11 +802,66 @@ function Module:BlizzardACF()
end
end
+-- Define the module and its offsets
+do
+ local meep = 12.125
+ local MICRO_OFFSETS = {
+ CharacterMicroButton = 0.07 / meep,
+ SpellbookMicroButton = 1.05 / meep,
+ TalentMicroButton = 2.04 / meep,
+ AchievementMicroButton = 3.03 / meep,
+ QuestLogMicroButton = 4.02 / meep,
+ GuildMicroButton = 5.01 / meep, -- Retail
+ LFDMicroButton = 6.00 / meep, -- Retail
+ EJMicroButton = 7.00 / meep,
+ CollectionsMicroButton = 8.00 / meep,
+ MainMenuMicroButton = 9 / meep, -- flip these
+ HelpMicroButton = 10 / meep, -- on classic
+ StoreMicroButton = 10.0 / meep,
+ }
+
+ Module.MICRO_OFFSETS = MICRO_OFFSETS
+end
+
+function Module:GetMicroCoords(name, icons, character)
+ local l, r, t, b = 0.17, 0.87, 0.5, 0.908
+
+ if character and name == "CharacterMicroButton" then
+ l, r, t, b = 0, 1, 0, 1
+ elseif icons then
+ local offset = Module.MICRO_OFFSETS[name]
+ if offset then
+ l, r = offset, offset + 0.065
+ t, b = icons and 0.41 or 0.038, icons and 0.72 or 0.35
+ end
+ end
+
+ return l, r, t, b
+end
+
function Module:OnEnable()
if not C["Minimap"].Enable then
return
end
+ for _, menu in ipairs(menuList) do
+ menu.notCheckable = true
+
+ if menu.cropIcon then
+ local left = 0.02 * menu.cropIcon
+ local right = 1 - left
+ menu.tCoordLeft, menu.tCoordRight, menu.tCoordTop, menu.tCoordBottom = left, right, left, right
+ menu.cropIcon = nil
+ end
+
+ if menu.microOffset then
+ local left, right, top, bottom = Module:GetMicroCoords(menu.microOffset, true)
+ menu.tCoordLeft, menu.tCoordRight, menu.tCoordTop, menu.tCoordBottom = left, right, top, bottom
+ menu.icon = menu.microOffset == "PVPMicroButton" and ((K.Faction == "Horde" and "H") or "A") or "?"
+ menu.microOffset = nil
+ end
+ end
+
-- Shape and Position
Minimap:SetFrameLevel(10)
Minimap:SetMaskTexture(C["Media"].Textures.White8x8Texture)
@@ -822,7 +889,7 @@ function Module:OnEnable()
-- Hide Blizz
MinimapCluster:EnableMouse(false)
- MinimapCluster.TrackingFrame:Hide()
+ -- MinimapCluster.Tracking:Hide()
MinimapCluster.BorderTop:Hide()
MinimapCluster.ZoneTextButton:Hide()
Minimap:SetArchBlobRingScalar(0)
diff --git a/KkthnxUI/Modules/Maps/WorldMap.lua b/KkthnxUI/Modules/Maps/WorldMap.lua
index b29757c0..ccccbe40 100644
--- a/KkthnxUI/Modules/Maps/WorldMap.lua
+++ b/KkthnxUI/Modules/Maps/WorldMap.lua
@@ -1,30 +1,28 @@
local K, C = KkthnxUI[1], KkthnxUI[2]
local Module = K:NewModule("WorldMap")
+local _G = _G
+
local C_Map_GetBestMapForUnit = C_Map.GetBestMapForUnit
local CreateFrame = CreateFrame
+local CreateFrame = CreateFrame
+local IsPlayerMoving = IsPlayerMoving
local IsPlayerMoving = IsPlayerMoving
local PLAYER = PLAYER
-local SetUIPanelAttribute = SetUIPanelAttribute
+local PlayerMovementFrameFader = PlayerMovementFrameFader
local UIParent = UIParent
local hooksecurefunc = hooksecurefunc
+local hooksecurefunc = hooksecurefunc
local currentMapID, playerCoords, cursorCoords
local smallerMapScale = 0.8
function Module:SetLargeWorldMap()
+ local WorldMapFrame = _G.WorldMapFrame
WorldMapFrame:SetParent(UIParent)
WorldMapFrame:SetScale(1)
WorldMapFrame.ScrollContainer.Child:SetScale(smallerMapScale)
- if WorldMapFrame:GetAttribute("UIPanelLayout-area") ~= "center" then
- SetUIPanelAttribute(WorldMapFrame, "area", "center")
- end
-
- if WorldMapFrame:GetAttribute("UIPanelLayout-allowOtherPanels") ~= true then
- SetUIPanelAttribute(WorldMapFrame, "allowOtherPanels", true)
- end
-
WorldMapFrame:OnFrameSizeChanged()
if WorldMapFrame:GetMapID() then
WorldMapFrame.NavBar:Refresh()
@@ -32,48 +30,26 @@ function Module:SetLargeWorldMap()
end
function Module:UpdateMaximizedSize()
+ local WorldMapFrame = _G.WorldMapFrame
local width, height = WorldMapFrame:GetSize()
local magicNumber = (1 - smallerMapScale) * 100
WorldMapFrame:SetSize((width * smallerMapScale) - (magicNumber + 2), (height * smallerMapScale) - 2)
end
function Module:SynchronizeDisplayState()
+ local WorldMapFrame = _G.WorldMapFrame
if WorldMapFrame:IsMaximized() then
WorldMapFrame:ClearAllPoints()
WorldMapFrame:SetPoint("CENTER", UIParent)
end
-end
-function Module:SetSmallWorldMap()
- if not WorldMapFrame:IsMaximized() then
- WorldMapFrame:ClearAllPoints()
- WorldMapFrame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 16, -94)
- end
+ K.RestoreMoverFrame(self)
end
-function Module:WorldMapOnShow(event)
- if Module.mapSized then
- return
- end
-
- -- Don't do this in combat, there are secure elements here.
- if InCombatLockdown() then
- K:RegisterEvent("PLAYER_REGEN_ENABLED", Module.WorldMapOnShow)
- return
- -- Only ever need this event once.
- elseif event == "PLAYER_REGEN_ENABLED" then
- K:UnregisterEvent(event, Module.WorldMapOnShow)
- end
-
- if WorldMapFrame:IsMaximized() then
- WorldMapFrame:UpdateMaximizedSize()
- Module:SetLargeWorldMap()
- else
- Module:SetSmallWorldMap()
- end
-
- -- Never again!
- Module.mapSized = true
+function Module:SetSmallWorldMap()
+ local WorldMapFrame = _G.WorldMapFrame
+ WorldMapFrame:ClearAllPoints()
+ WorldMapFrame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 16, -94)
end
function Module:GetCursorCoords()
@@ -95,6 +71,11 @@ local function CoordsFormat(owner, none)
end
function Module:UpdateCoords(elapsed)
+ local WorldMapFrame = _G.WorldMapFrame
+ if not WorldMapFrame:IsShown() then
+ return
+ end
+
self.elapsed = (self.elapsed or 0) + elapsed
if self.elapsed > 0.2 then
@@ -129,14 +110,15 @@ function Module:UpdateMapID()
end
function Module:MapShouldFade()
- -- normally we would check GetCVarBool("mapFade") here instead of the setting
+ -- normally we would check GetCVarBool('mapFade') here instead of the setting
return C["WorldMap"].FadeWhenMoving and not _G.WorldMapFrame:IsMouseOver()
end
function Module:MapFadeOnUpdate(elapsed)
self.elapsed = (self.elapsed or 0) + elapsed
+ if self.elapsed > 0.1 then
+ self.elapsed = 0
- if self.elapsed > 0.2 then
local object = self.FadeObject
local settings = object and object.FadeSettings
if not settings then
@@ -145,7 +127,7 @@ function Module:MapFadeOnUpdate(elapsed)
local fadeOut = IsPlayerMoving() and (not settings.fadePredicate or settings.fadePredicate())
local endAlpha = (fadeOut and (settings.minAlpha or 0.5)) or settings.maxAlpha or 1
- local startAlpha = WorldMapFrame:GetAlpha()
+ local startAlpha = _G.WorldMapFrame:GetAlpha()
object.timeToFade = settings.durationSec or 0.5
object.startAlpha = startAlpha
@@ -157,8 +139,6 @@ function Module:MapFadeOnUpdate(elapsed)
end
UIFrameFade(_G.WorldMapFrame, object)
-
- self.elapsed = 0
end
end
@@ -171,16 +151,11 @@ end
function Module:EnableMapFading(frame)
if not fadeFrame then
- fadeFrame = CreateFrame("Frame")
+ fadeFrame = CreateFrame("FRAME")
fadeFrame:SetScript("OnUpdate", Module.MapFadeOnUpdate)
frame:HookScript("OnHide", Module.StopMapFromFading)
- end
- if not fadeFrame.FadeObject then
fadeFrame.FadeObject = {}
- end
-
- if not fadeFrame.FadeObject.FadeSettings then
fadeFrame.FadeObject.FadeSettings = {}
end
@@ -193,7 +168,7 @@ function Module:EnableMapFading(frame)
fadeFrame:Show()
end
-function Module:UpdateMapFade(_, _, _, fadePredicate) -- self is frame
+function Module:UpdateMapFade(minAlpha, maxAlpha, durationSec, fadePredicate) -- self is frame
if self:IsShown() and (self == _G.WorldMapFrame and fadePredicate ~= Module.MapShouldFade) then
-- blizzard spams code in OnUpdate and doesnt finish their functions, so we shut their fader down :L
PlayerMovementFrameFader.RemoveFrame(self)
@@ -205,19 +180,62 @@ function Module:UpdateMapFade(_, _, _, fadePredicate) -- self is frame
end
end
+function Module:WorldMap_OnShow()
+ -- Update coordinates if necessary
+ if Module.CoordsUpdater then
+ Module.CoordsUpdater:SetScript("OnUpdate", Module.UpdateCoords)
+ end
+
+ -- Check if the map has been size adjusted already
+ if Module.mapSizeAdjusted then
+ return
+ end
+
+ -- Resize the map if necessary
+ local frame = _G.WorldMapFrame
+ local maxed = frame:IsMaximized()
+ if maxed then -- Call this outside of smallerWorldMap
+ frame:UpdateMaximizedSize()
+ end
+
+ -- Set the appropriate map size
+ if C["WorldMap"].SmallWorldMap then
+ if maxed then
+ Module:SetLargeWorldMap()
+ else
+ Module:SetSmallWorldMap()
+ end
+ end
+
+ -- Mark the map as size adjusted
+ Module.mapSizeAdjusted = true
+end
+
+function Module:WorldMap_OnHide()
+ if Module.CoordsUpdater then
+ Module.CoordsUpdater:SetScript("OnUpdate", nil)
+ end
+end
+
function Module:OnEnable()
+ local WorldMapFrame = _G.WorldMapFrame
if C["WorldMap"].Coordinates then
- local coordsFrame = CreateFrame("FRAME", nil, WorldMapFrame.ScrollContainer)
+ -- Define the desired color (#F0C500 or RGB values 240/255, 197/255, 0)
+ local textColor = { r = 240 / 255, g = 197 / 255, b = 0 }
+
+ -- Create the coordinates frame
+ local coordsFrame = CreateFrame("Frame", nil, WorldMapFrame.ScrollContainer)
coordsFrame:SetSize(WorldMapFrame:GetWidth(), 17)
coordsFrame:SetPoint("BOTTOMLEFT", 17)
coordsFrame:SetPoint("BOTTOMRIGHT", 0)
+ -- Background texture for the coordinates frame
coordsFrame.Texture = coordsFrame:CreateTexture(nil, "BACKGROUND")
coordsFrame.Texture:SetAllPoints()
coordsFrame.Texture:SetTexture(C["Media"].Textures.White8x8Texture)
coordsFrame.Texture:SetVertexColor(0.04, 0.04, 0.04, 0.5)
- -- Create cursor coordinates frame
+ -- Create the cursor coordinates text
cursorCoords = WorldMapFrame.ScrollContainer:CreateFontString(nil, "OVERLAY")
cursorCoords:SetFontObject(K.UIFontOutline)
cursorCoords:SetFont(select(1, cursorCoords:GetFont()), 13, select(3, cursorCoords:GetFont()))
@@ -225,10 +243,10 @@ function Module:OnEnable()
cursorCoords:SetParent(coordsFrame)
cursorCoords:ClearAllPoints()
cursorCoords:SetPoint("BOTTOMLEFT", 152, 1)
- cursorCoords:SetTextColor(255 / 255, 204 / 255, 102 / 255)
+ cursorCoords:SetTextColor(textColor.r, textColor.g, textColor.b)
cursorCoords:SetAlpha(0.9)
- -- Create player coordinates frame
+ -- Create the player coordinates text
playerCoords = WorldMapFrame.ScrollContainer:CreateFontString(nil, "OVERLAY")
playerCoords:SetFontObject(K.UIFontOutline)
playerCoords:SetFont(select(1, playerCoords:GetFont()), 13, select(3, playerCoords:GetFont()))
@@ -236,47 +254,43 @@ function Module:OnEnable()
playerCoords:SetParent(coordsFrame)
playerCoords:ClearAllPoints()
playerCoords:SetPoint("BOTTOMRIGHT", -132, 1)
- playerCoords:SetTextColor(255 / 255, 204 / 255, 102 / 255)
+ playerCoords:SetTextColor(textColor.r, textColor.g, textColor.b)
playerCoords:SetAlpha(0.9)
hooksecurefunc(WorldMapFrame, "OnFrameSizeChanged", self.UpdateMapID)
hooksecurefunc(WorldMapFrame, "OnMapChanged", self.UpdateMapID)
- local CoordsUpdater = CreateFrame("Frame", nil, WorldMapFrame.ScrollContainer)
- CoordsUpdater:SetScript("OnUpdate", self.UpdateCoords)
+ self.CoordsUpdater = CreateFrame("Frame", nil, WorldMapFrame.ScrollContainer)
+ self.CoordsUpdater:SetScript("OnUpdate", self.UpdateCoords)
end
if C["WorldMap"].SmallWorldMap then
smallerMapScale = C["WorldMap"].SmallWorldMapScale or 0.9
- WorldMapFrame.BlackoutFrame.Blackout:SetTexture(nil)
+ K.CreateMoverFrame(WorldMapFrame, nil, true)
+
+ WorldMapFrame.BlackoutFrame.Blackout:SetTexture()
WorldMapFrame.BlackoutFrame:EnableMouse(false)
hooksecurefunc(WorldMapFrame, "Maximize", self.SetLargeWorldMap)
hooksecurefunc(WorldMapFrame, "Minimize", self.SetSmallWorldMap)
hooksecurefunc(WorldMapFrame, "SynchronizeDisplayState", self.SynchronizeDisplayState)
hooksecurefunc(WorldMapFrame, "UpdateMaximizedSize", self.UpdateMaximizedSize)
-
- WorldMapFrame:HookScript("OnShow", function()
- Module:WorldMapOnShow()
- end)
end
- -- This lets us control the maps fading function
- hooksecurefunc(PlayerMovementFrameFader, "AddDeferredFrame", self.UpdateMapFade)
+ WorldMapFrame:HookScript("OnShow", Module.WorldMap_OnShow)
+ WorldMapFrame:HookScript("OnHide", Module.WorldMap_OnHide)
+
+ hooksecurefunc(PlayerMovementFrameFader, "AddDeferredFrame", Module.UpdateMapFade)
if C["General"].NoTutorialButtons then
WorldMapFrame.BorderFrame.Tutorial:Kill()
end
- -- Enable/Disable map fading when moving
- -- currently we dont need to touch this cvar because we have our own control for this currently
- -- see the comment in "Module:UpdateMapFade" about "durationSec" for more information
- -- SetCVar("mapFade", C["WorldMap"].AlphaWhenMoving and 1 or 0)
-
local loadWorldMapModules = {
"CreateWorldMapReveal",
"CreateWowHeadLinks",
+ "CreateWorldMapPins",
}
for _, funcName in ipairs(loadWorldMapModules) do
diff --git a/KkthnxUI/Modules/Miscellaneous/Core.lua b/KkthnxUI/Modules/Miscellaneous/Core.lua
index c02b0536..a261ab12 100644
--- a/KkthnxUI/Modules/Miscellaneous/Core.lua
+++ b/KkthnxUI/Modules/Miscellaneous/Core.lua
@@ -59,7 +59,6 @@ function Module:OnEnable()
-- Second loop: Iterating over loadMiscModules
local loadMiscModules = {
- "CreateBlockStrangerInvites",
"CreateBossBanner",
"CreateBossEmote",
"CreateCustomWaypoint",
@@ -73,7 +72,6 @@ function Module:OnEnable()
"CreateTicketStatusFrameMove",
"CreateTradeTargetInfo",
"CreateVehicleSeatMover",
- "HandleKkthnxUITitle",
"UpdateMaxCameraZoom",
}
@@ -125,14 +123,65 @@ function Module:OnEnable()
end
enableAutoBubbles()
- -- Instant delete
local function modifyDeleteDialog()
- local deleteDialog = StaticPopupDialogs["DELETE_GOOD_ITEM"]
- if deleteDialog.OnShow then
- hooksecurefunc(deleteDialog, "OnShow", function(self)
- self.editBox:SetText(DELETE_ITEM_CONFIRM_STRING)
- end)
- end
+ -- Modify DELETE_GOOD_ITEM text to get the confirmation type
+ local confirmationText = DELETE_GOOD_ITEM:gsub("[\r\n]", "@")
+ local _, confirmationType = strsplit("@", confirmationText, 2)
+
+ -- Add hyperlinks to regular item destroy
+ local function setHyperlinkHandlers(dialog)
+ dialog.OnHyperlinkEnter = StaticPopupDialogs["DELETE_GOOD_ITEM"].OnHyperlinkEnter
+ dialog.OnHyperlinkLeave = StaticPopupDialogs["DELETE_GOOD_ITEM"].OnHyperlinkLeave
+ end
+
+ setHyperlinkHandlers(StaticPopupDialogs["DELETE_ITEM"])
+ setHyperlinkHandlers(StaticPopupDialogs["DELETE_QUEST_ITEM"])
+ setHyperlinkHandlers(StaticPopupDialogs["DELETE_GOOD_QUEST_ITEM"])
+
+ -- Create frame to handle events
+ local deleteConfirmationFrame = CreateFrame("FRAME")
+ deleteConfirmationFrame:RegisterEvent("DELETE_ITEM_CONFIRM")
+ deleteConfirmationFrame:SetScript("OnEvent", function()
+ local staticPopup = StaticPopup1
+ local editBox = StaticPopup1EditBox
+ local button = StaticPopup1Button1
+ local popupText = StaticPopup1Text
+
+ -- Check if edit box is shown
+ if editBox:IsShown() then
+ staticPopup:SetHeight(staticPopup:GetHeight() - 14)
+ editBox:Hide()
+ button:Enable()
+ local link = select(3, GetCursorInfo())
+
+ -- Handle battle pets
+ if link then
+ local linkType, linkOptions, name = LinkUtil.ExtractLink(link)
+ if linkType == "battlepet" then
+ local _, level, breedQuality = strsplit(":", linkOptions)
+ local qualityColor = BAG_ITEM_QUALITY_COLORS[tonumber(breedQuality)]
+ link = qualityColor:WrapTextInColorCode(name .. " |n" .. "Level" .. " " .. level .. "Battle Pet")
+ end
+ popupText:SetText(popupText:GetText():gsub(confirmationType, "") .. "|n|n" .. link)
+ end
+ else
+ staticPopup:SetHeight(staticPopup:GetHeight() + 40)
+ editBox:Hide()
+ button:Enable()
+ local link = select(3, GetCursorInfo())
+
+ -- Handle battle pets
+ if link then
+ local linkType, linkOptions, name = LinkUtil.ExtractLink(link)
+ if linkType == "battlepet" then
+ local _, level, breedQuality = strsplit(":", linkOptions)
+ local qualityColor = BAG_ITEM_QUALITY_COLORS[tonumber(breedQuality)]
+ link = qualityColor:WrapTextInColorCode(name .. " |n" .. "Level" .. " " .. level .. "Battle Pet")
+ end
+ popupText:SetText(popupText:GetText():gsub(confirmationType, "") .. "|n|n" .. link)
+ end
+ end
+ end)
end
modifyDeleteDialog()
@@ -267,33 +316,43 @@ function Module:CreateMinimapButtonToggle()
end
local function MainMenu_OnShow(self)
- local buttonToReanchor, buttonHeight
+ local buttonToReanchor
+ local buttonHeight = 0
local isCharacterNewlyBoosted = IsCharacterNewlyBoosted()
local canViewSplashScreen = C_SplashScreen.CanViewSplashScreen()
- if isCharacterNewlyBoosted or not canViewSplashScreen then
- buttonToReanchor = GameMenuButtonStore
- buttonHeight = Module.GameMenuButton:GetHeight() + 28
- else
- buttonToReanchor = GameMenuButtonWhatsNew
- buttonHeight = Module.GameMenuButton:GetHeight() + 34
- end
+ local function reanchorButtons(offset)
+ local anchorButton = GameMenuButtonWhatsNew:IsShown() and GameMenuButtonWhatsNew or GameMenuButtonHelp
+ local additionalOffset = 28
- self:SetHeight(self:GetHeight() + buttonHeight)
+ if isCharacterNewlyBoosted or not canViewSplashScreen then
+ anchorButton = GameMenuButtonStore:IsShown() and GameMenuButtonStore or GameMenuButtonHelp
+ additionalOffset = 28
+ end
- _G.GameMenuButtonLogout:SetPoint("TOP", Module.GameMenuButton, "BOTTOM", 0, -14)
- _G.GameMenuButtonStore:SetPoint("TOP", _G.GameMenuButtonHelp, "BOTTOM", 0, -6)
+ buttonToReanchor = anchorButton
+ buttonHeight = additionalOffset + offset
+ end
- if _G.GameMenuButtonWhatsNew then
- _G.GameMenuButtonWhatsNew:SetPoint("TOP", _G.GameMenuButtonStore, "BOTTOM", 0, -6)
+ local function setButtonPosition(button, relativeTo, yOffset)
+ if button and button:IsShown() then
+ button:SetPoint("TOP", relativeTo, "BOTTOM", 0, yOffset)
+ end
end
- _G.GameMenuButtonEditMode:SetPoint("TOP", buttonToReanchor, "BOTTOM", 0, -24)
- _G.GameMenuButtonSettings:SetPoint("TOP", _G.GameMenuButtonEditMode, "BOTTOM", 0, -6)
- _G.GameMenuButtonMacros:SetPoint("TOP", _G.GameMenuButtonSettings, "BOTTOM", 0, -6)
- _G.GameMenuButtonAddons:SetPoint("TOP", _G.GameMenuButtonMacros, "BOTTOM", 0, -6)
- _G.GameMenuButtonQuit:SetPoint("TOP", _G.GameMenuButtonLogout, "BOTTOM", 0, -6)
+ reanchorButtons(Module.GameMenuButton:GetHeight())
+
+ self:SetHeight(self:GetHeight() + buttonHeight)
+
+ setButtonPosition(GameMenuButtonLogout, Module.GameMenuButton, -14)
+ setButtonPosition(GameMenuButtonStore, GameMenuButtonHelp, -6)
+ setButtonPosition(GameMenuButtonWhatsNew, buttonToReanchor, -6)
+ setButtonPosition(GameMenuButtonEditMode, buttonToReanchor, -24)
+ setButtonPosition(GameMenuButtonSettings, GameMenuButtonEditMode, -6)
+ setButtonPosition(GameMenuButtonMacros, GameMenuButtonSettings, -6)
+ setButtonPosition(GameMenuButtonAddons, GameMenuButtonMacros, -6)
+ setButtonPosition(GameMenuButtonQuit, GameMenuButtonLogout, -6)
end
local function Button_OnClick()
@@ -308,13 +367,13 @@ local function Button_OnClick()
end
function Module:CreateGUIGameMenuButton()
- local bu = CreateFrame("Button", "KKUI_GameMenuButton", _G.GameMenuFrame, "GameMenuButtonTemplate")
- bu:SetText(K.Title)
- bu:SetPoint("TOP", _G.GameMenuButtonAddons, "BOTTOM", 0, -12)
- bu:SetScript("OnClick", Button_OnClick)
- bu:SkinButton(true)
+ local gameMenuButton = CreateFrame("Button", "KKUI_GameMenuButton", _G.GameMenuFrame, "GameMenuButtonTemplate")
+ gameMenuButton:SetText(K.Title)
+ gameMenuButton:SetPoint("TOP", _G.GameMenuButtonAddons, "BOTTOM", 0, -12)
+ gameMenuButton:SetScript("OnClick", Button_OnClick)
+ gameMenuButton:SkinButton(true)
- Module.GameMenuButton = bu
+ Module.GameMenuButton = gameMenuButton
_G.GameMenuFrame:HookScript("OnShow", MainMenu_OnShow)
end
@@ -670,16 +729,6 @@ do
K:RegisterEvent("RESURRECT_REQUEST", soundOnResurrect)
end
-function Module:CreateBlockStrangerInvites()
- K:RegisterEvent("PARTY_INVITE_REQUEST", function(a, b, c, d, e, f, g, guid)
- if C["Automation"].AutoBlockStrangerInvites and not (C_BattleNet_GetGameAccountInfoByGUID(guid) or C_FriendList_IsFriend(guid) or IsGuildMember(guid)) then
- _G.DeclineGroup()
- _G.StaticPopup_Hide("PARTY_INVITE")
- K.Print("Blocked invite request from a stranger!", a, b, c, d, e, f, g, guid)
- end
- end)
-end
-
-- Make it so we can move this
function Module:PostBNToastMove(_, anchor)
if anchor ~= BNToastFrame.mover then
@@ -739,30 +788,7 @@ function Module:UpdateMaxCameraZoom()
SetCVar("cameraDistanceMaxZoomFactor", C["Misc"].MaxCameraZoom)
end
-function Module:HandleKkthnxUITitle()
- -- Square KkthnxUI logo texture
- local function replaceIconString(self, text)
- if not text then
- text = self:GetText()
- end
- if not text or text == "" then
- return
- end
-
- if strfind(text, "KkthnxUI") or strfind(text, "BaudErrorFrame") then
- local newText, count = gsub(text, "|T([^:]-):[%d+:]+|t", "|T" .. "Interface\\AddOns\\KkthnxUI\\Media\\Textures\\LogoSmall" .. ":20:20|t")
- if count > 0 then
- self:SetFormattedText("%s", newText)
- end
- end
- end
-
- hooksecurefunc("AddonList_InitButton", function(entry)
- if not entry.logoHooked then
- replaceIconString(entry.Title)
- hooksecurefunc(entry.Title, "SetText", replaceIconString)
-
- entry.logoHooked = true
- end
- end)
+-- Fix missing localization file
+if not GuildControlUIRankSettingsFrameRosterLabel then
+ GuildControlUIRankSettingsFrameRosterLabel = CreateFrame("Frame")
end
diff --git a/KkthnxUI/Modules/Miscellaneous/Elements/AFKCam.lua b/KkthnxUI/Modules/Miscellaneous/Elements/AFKCam.lua
index 149e2120..4233d013 100644
--- a/KkthnxUI/Modules/Miscellaneous/Elements/AFKCam.lua
+++ b/KkthnxUI/Modules/Miscellaneous/Elements/AFKCam.lua
@@ -489,6 +489,11 @@ function Module:CreateAFKCam()
AFKMode.bottom.logo:SetPoint("CENTER", AFKMode.bottom, "CENTER", 0, 60)
AFKMode.bottom.logo:SetTexture(C["Media"].Textures.LogoTexture)
+ -- REMOVE ME AFTER CHRISTMAS
+ AFKMode.bottom.XMAS = AFKMode:CreateTexture(nil, "ARTWORK", nil, 7)
+ AFKMode.bottom.XMAS:SetPoint("CENTER", AFKMode.bottom, "TOP", -36, 32)
+ AFKMode.bottom.XMAS:SetAtlas("perks-theme-winterveil-tp-bottombig", true)
+
AFKMode.top.time = AFKMode.top:CreateFontString(nil, "OVERLAY")
AFKMode.top.time:SetFontObject(K.UIFont)
AFKMode.top.time:SetFont(select(1, AFKMode.top.time:GetFont()), 16, select(3, AFKMode.top.time:GetFont()))
diff --git a/KkthnxUI/Modules/Miscellaneous/Elements/ExpRep.lua b/KkthnxUI/Modules/Miscellaneous/Elements/ExpRep.lua
index 61e868e1..21d0fe6b 100644
--- a/KkthnxUI/Modules/Miscellaneous/Elements/ExpRep.lua
+++ b/KkthnxUI/Modules/Miscellaneous/Elements/ExpRep.lua
@@ -1,52 +1,52 @@
local K, C, L = KkthnxUI[1], KkthnxUI[2], KkthnxUI[3]
local Module = K:GetModule("Miscellaneous")
--- Caching global functions
-local math_min = math.min
-local math_floor = math.floor
+-- Caching global functions and variables
+local math_min, math_floor = math.min, math.floor
local string_format = string.format
-local ipairs = ipairs
+local select, pairs = select, pairs
--- Caching global variables
+-- Caching frequently used functions and variables
+local GetXPExhaustion = GetXPExhaustion
+local IsInGroup, IsShiftKeyDown, IsWatchingHonorAsXP = IsInGroup, IsShiftKeyDown, IsWatchingHonorAsXP
+local UnitHonor, UnitHonorLevel, UnitHonorMax = UnitHonor, UnitHonorLevel, UnitHonorMax
+local UnitXP, UnitXPMax = UnitXP, UnitXPMax
local C_AzeriteItem_FindActiveAzeriteItem = C_AzeriteItem.FindActiveAzeriteItem
local C_AzeriteItem_GetAzeriteItemXPInfo = C_AzeriteItem.GetAzeriteItemXPInfo
local C_AzeriteItem_GetPowerLevel = C_AzeriteItem.GetPowerLevel
-local C_AzeriteItem_IsAzeriteItemAtMaxLevel = C_AzeriteItem.IsAzeriteItemAtMaxLevel
+local C_GossipInfo_GetFriendshipReputation = C_GossipInfo.GetFriendshipReputation
local C_MajorFactions_GetMajorFactionData = C_MajorFactions.GetMajorFactionData
local C_MajorFactions_HasMaximumRenown = C_MajorFactions.HasMaximumRenown
-local C_QuestLog = C_QuestLog
local C_Reputation_GetFactionParagonInfo = C_Reputation.GetFactionParagonInfo
-local C_Reputation_IsFactionParagon = C_Reputation.IsFactionParagon
-local C_Reputation_IsMajorFaction = C_Reputation.IsMajorFaction
-local GameTooltip = GameTooltip
-local C_GossipInfo_GetFriendshipReputation = C_GossipInfo.GetFriendshipReputation
-local GetWatchedFactionInfo = GetWatchedFactionInfo
-local GetXPExhaustion = GetXPExhaustion
-local IsPlayerAtEffectiveMaxLevel = IsPlayerAtEffectiveMaxLevel
-local IsWatchingHonorAsXP = IsWatchingHonorAsXP
-local UnitHonor = UnitHonor
-local UnitHonorLevel = UnitHonorLevel
-local UnitHonorMax = UnitHonorMax
-local UnitXP = UnitXP
-local UnitXPMax = UnitXPMax
-
--- Your existing local variables
-local CurrentXP, XPToLevel, RestedXP, PercentRested
-local PercentXP, RemainXP, RemainTotal, RemainBars
-local QuestRep = 0
+local C_Reputation_IsFactionParagon, C_Reputation_IsMajorFaction = C_Reputation.IsFactionParagon, C_Reputation.IsMajorFaction
+local GameTooltip, GetWatchedFactionInfo = GameTooltip, GetWatchedFactionInfo
-local function IsAzeriteAvailable()
- local itemLocation = C_AzeriteItem_FindActiveAzeriteItem()
- return itemLocation and itemLocation:IsEquipmentSlot() and not C_AzeriteItem_IsAzeriteItemAtMaxLevel()
+-- Experience
+local CurrentXP, XPToLevel, PercentRested, PercentXP, RemainXP, RemainTotal, RemainBars
+local RestedXP = 0
+
+local function XPIsUserDisabled()
+ return IsXPUserDisabled()
+end
+
+local function XPIsTrialMax()
+ return (IsRestrictedAccount() or IsTrialAccount() or IsVeteranTrialAccount()) and (K.Level == 20)
+end
+
+local function XPIsLevelMax()
+ return IsLevelAtEffectiveMaxLevel(K.Level) or XPIsUserDisabled() or XPIsTrialMax()
end
-local function GetValues(curValue, minValue, maxValue)
+local sendExperienceText = "Send experience to chat|r"
+
+-- Reputation
+local function RepGetValues(curValue, minValue, maxValue)
local maximum = maxValue - minValue
local current, diff = curValue - minValue, maximum
- if diff == 0 then -- prevent a division by zero
+ if diff == 0 then
diff = 1
- end
+ end -- prevent a division by zero
if current == maximum then
return 1, 1, 100, true
@@ -55,192 +55,211 @@ local function GetValues(curValue, minValue, maxValue)
end
end
-local function ReputationBar_QuestRep(factionID)
- QuestRep = 0
-
- for i = 1, C_QuestLog.GetNumQuestLogEntries() do
- local info = C_QuestLog.GetInfo(i)
- if info then
- local qxp = C_QuestLog.GetQuestLogMajorFactionReputationRewards(info.questID)
- if qxp then
- for _, data in ipairs(qxp) do
- if factionID == data.factionID then
- QuestRep = QuestRep + data.rewardAmount
- end
- end
- end
- end
- end
+local sendReputationText = "Send reputation to chat|r"
+
+-- Honor
+local CurrentHonor, MaxHonor, CurrentLevel, PercentHonor, RemainingHonor
+
+-- Azerite
+local azeriteItem, currentLevel, curXP, maxXP
+
+local function IsAzeriteAvailable()
+ local item = C_AzeriteItem_FindActiveAzeriteItem()
+ local equipped = item and item:IsEquipmentSlot()
+
+ return equipped
end
-function Module:ExpBar_Update(event, unit)
- if not IsPlayerAtEffectiveMaxLevel() then
- CurrentXP, XPToLevel, RestedXP = UnitXP("player"), UnitXPMax("player"), GetXPExhaustion() or 0
+-- Bar string
+local barDisplayString = ""
+local altKeyText = K.InfoColor .. ALT_KEY_TEXT .. " "
+
+local function OnExpBarEvent(self, event, unit)
+ if not XPIsLevelMax() then
+ CurrentXP, XPToLevel, RestedXP = UnitXP("player"), UnitXPMax("player"), (GetXPExhaustion() or 0)
+
+ -- Ensure XPToLevel is not 0 to avoid division by zero
if XPToLevel <= 0 then
XPToLevel = 1
end
+ -- Calculate remaining XP and percentage
local remainXP = XPToLevel - CurrentXP
local remainPercent = remainXP / XPToLevel
RemainTotal, RemainBars = remainPercent * 100, remainPercent * 20
PercentXP, RemainXP = (CurrentXP / XPToLevel) * 100, K.ShortValue(remainXP)
+ -- Set status bar colors
self:SetStatusBarColor(0, 0.4, 1, 0.8)
self.restBar:SetStatusBarColor(1, 0, 1, 0.4)
- local displayString = ""
-
+ -- Set up main XP bar
self:SetMinMaxValues(0, XPToLevel)
self:SetValue(CurrentXP)
- self:Show()
-
- displayString = string_format("%s - %.2f%%", K.ShortValue(CurrentXP), PercentXP)
+ barDisplayString = string_format("%s - %.2f%%", K.ShortValue(CurrentXP), PercentXP)
- local isRested = RestedXP and RestedXP > 0
+ -- Check if rested XP exists
+ local isRested = RestedXP > 0
if isRested then
+ -- Set up rested XP bar
self.restBar:SetMinMaxValues(0, XPToLevel)
self.restBar:SetValue(math_min(CurrentXP + RestedXP, XPToLevel))
+ -- Calculate percentage of rested XP
PercentRested = (RestedXP / XPToLevel) * 100
- displayString = string_format("%s R:%s [%.2f%%]", displayString, K.ShortValue(RestedXP), PercentRested)
+
+ -- Update XP display string with rested XP information
+ barDisplayString = string_format("%s R:%s [%.2f%%]", barDisplayString, K.ShortValue(RestedXP), PercentRested)
end
- self.restBar:SetShown(isRested)
- if IsLevelAtEffectiveMaxLevel(K.Level) or IsXPUserDisabled() or (IsTrialAccount() or IsVeteranTrialAccount()) and (K.Level == 20) then
- self:SetMinMaxValues(0, 1)
- self:SetValue(1)
- self:Show()
+ -- Show experience
+ self:Show()
- displayString = IsXPUserDisabled() and "Disabled" or "Max Level"
- end
+ -- Show or hide rested XP bar based on rested state
+ self.restBar:SetShown(isRested)
- self.text:SetText(displayString)
- self.text:Show()
+ -- Update text display with XP information
+ self.text:SetText(barDisplayString)
elseif GetWatchedFactionInfo() then
- local label, rewardPending
+ local standing, rewardPending, _
local name, reaction, minValue, maxValue, curValue, factionID = GetWatchedFactionInfo()
- local info = factionID and C_GossipInfo_GetFriendshipReputation(factionID)
- if info and info.friendshipFactionID then
- local isMajorFaction = factionID and C_Reputation_IsMajorFaction(factionID)
-
- if info and info.friendshipFactionID > 0 then
- label, minValue, maxValue, curValue = info.reaction, info.reactionThreshold or 0, info.nextThreshold or 1, info.standing or 1
- elseif isMajorFaction then
- local majorFactionData = C_MajorFactions_GetMajorFactionData(factionID)
- local renownColor = { r = 0, g = 0.74, b = 0.95 }
- local renownHex = K.RGBToHex(renownColor.r, renownColor.g, renownColor.b) -- 10 (Renown)
-
- reaction, minValue, maxValue = 10, 0, majorFactionData.renownLevelThreshold
- curValue = C_MajorFactions_HasMaximumRenown(factionID) and majorFactionData.renownLevelThreshold or majorFactionData.renownReputationEarned or 0
- label = format("%s%s|r %s", renownHex, RENOWN_LEVEL_LABEL, majorFactionData.renownLevel)
- ReputationBar_QuestRep(factionID)
- end
+ local info = factionID and C_GossipInfo_GetFriendshipReputation(factionID)
+ if info and info.friendshipFactionID and info.friendshipFactionID > 0 then
+ standing, minValue, maxValue, curValue = info.reaction, info.reactionThreshold or 0, info.nextThreshold or math.huge, info.standing or 1
end
- if not label and C_Reputation_IsFactionParagon(factionID) then
+ if not standing and factionID and C_Reputation_IsFactionParagon(factionID) then
local current, threshold
current, threshold, _, rewardPending = C_Reputation_GetFactionParagonInfo(factionID)
if current and threshold then
- label, minValue, maxValue, curValue, reaction = L["Paragon"], 0, threshold, current % threshold, 9
+ standing, minValue, maxValue, curValue, reaction = L["Paragon"], 0, threshold, current % threshold, 9
end
end
- if not label then
- label = _G["FACTION_STANDING_LABEL" .. reaction] or UNKNOWN
+ if not standing and factionID and C_Reputation_IsMajorFaction(factionID) then
+ local majorFactionData = C_MajorFactions_GetMajorFactionData(factionID)
+ local renownColor = { r = 0, g = 0.74, b = 0.95 }
+ local renownHex = K.RGBToHex(renownColor.r, renownColor.g, renownColor.b)
+
+ reaction, minValue, maxValue = 10, 0, majorFactionData.renownLevelThreshold
+ curValue = C_MajorFactions_HasMaximumRenown(factionID) and majorFactionData.renownLevelThreshold or majorFactionData.renownReputationEarned or 0
+ standing = string_format("%s%s %s|r", renownHex, RENOWN_LEVEL_LABEL, majorFactionData.renownLevel)
+ end
+
+ if not standing then
+ standing = _G["FACTION_STANDING_LABEL" .. reaction] or UNKNOWN
end
- local color = K.Colors.faction[reaction]
- self:SetStatusBarColor(color.r or 1, color.g or 1, color.b or 1, 1)
- self:SetMinMaxValues(minValue, maxValue)
+ local customColors = true
+ local customReaction = reaction == 9 or reaction == 10 -- 9 is paragon, 10 is renown
+ local color = (customColors or customReaction) and K.Colors.faction[reaction] or _G.FACTION_BAR_COLORS[reaction]
+ local alpha = (customColors and 1)
+ local total = maxValue == math.huge and 1 or maxValue -- we need to correct the min/max of friendship factions to display the bar at 100%
+
+ self:SetStatusBarColor(color.r or 1, color.g or 1, color.b or 1, alpha or 1)
+ self:SetMinMaxValues((maxValue == math.huge or minValue == maxValue) and 0 or minValue, total) -- we force min to 0 because the min will match max when a rep is maxed and cause the bar to be 0%
self:SetValue(curValue)
self.reward:ClearAllPoints()
self.reward:SetPoint("CENTER", self, "LEFT")
self.reward:SetShown(rewardPending)
- local current, _, percent, capped = GetValues(curValue, minValue, maxValue)
+ local current, _, percent, capped = RepGetValues(curValue, minValue, total) -- Check these please.
if capped then -- show only name and standing on exalted
- self.text:SetText(string_format("%s: [%s]", name, label))
+ barDisplayString = string_format("%s: [%s]", name, standing)
else
- self.text:SetText(string_format("%s: %s - %d%% [%s]", name, K.ShortValue(current), percent, label))
+ barDisplayString = string_format("%s: %s - %d%% [%s]", name, K.ShortValue(current), percent, standing)
end
+
self:Show()
- self.text:Show()
+ self.text:SetText(barDisplayString)
elseif IsWatchingHonorAsXP() then
if event == "PLAYER_FLAGS_CHANGED" and unit ~= "player" then
return
end
- local CurrentHonor, MaxHonor, CurrentLevel = UnitHonor("player"), UnitHonorMax("player"), UnitHonorLevel("player")
+ CurrentHonor, MaxHonor, CurrentLevel = UnitHonor("player"), UnitHonorMax("player"), UnitHonorLevel("player")
-- Guard against division by zero, which appears to be an issue when zoning in/out of dungeons
if MaxHonor == 0 then
MaxHonor = 1
end
- local PercentHonor = (CurrentHonor / MaxHonor) * 100
+ PercentHonor, RemainingHonor = (CurrentHonor / MaxHonor) * 100, MaxHonor - CurrentHonor
+
+ local colorHonor = { r = 0.94, g = 0.45, b = 0.25 }
self:SetMinMaxValues(0, MaxHonor)
self:SetValue(CurrentHonor)
- self:SetStatusBarColor(0.94, 0.45, 0.25)
+ self:SetStatusBarColor(colorHonor.r, colorHonor.g, colorHonor.b)
+
+ barDisplayString = string_format("%s - %d%% - [%s]", K.ShortValue(CurrentHonor), PercentHonor, CurrentLevel)
+
self:Show()
- self.text:SetText(string_format("%s - %d%% - [%s]", K.ShortValue(CurrentHonor), PercentHonor, CurrentLevel))
- self.text:Show()
+ self.text:SetText(barDisplayString)
elseif IsAzeriteAvailable() then
if event == "UNIT_INVENTORY_CHANGED" and unit ~= "player" then
return
end
+
local item = C_AzeriteItem_FindActiveAzeriteItem()
local cur, max = C_AzeriteItem_GetAzeriteItemXPInfo(item)
local currentLevel = C_AzeriteItem_GetPowerLevel(item)
- self:SetStatusBarColor(0.901, 0.8, 0.601, 1)
+ local color = { 0.901, 0.8, 0.601, 1 }
+
+ self:SetStatusBarColor(color.r, color.g, color.b, color.a)
self:SetMinMaxValues(0, max)
self:SetValue(cur)
+
self:Show()
self.text:SetFormattedText("%s - %s%% [%s]", K.ShortValue(cur), math_floor(cur / max * 100), currentLevel)
- self.text:Show()
else
self:Hide()
- self.text:Hide()
+ self.text:SetText("")
end
end
-function Module:ExpBar_UpdateTooltip()
+local function OnExpBarEnter(self)
if GameTooltip:IsForbidden() then
return
end
+
GameTooltip:ClearLines()
- GameTooltip:SetOwner(self, "ANCHOR_LEFT")
+ GameTooltip:SetOwner(self, "ANCHOR_CURSOR")
- if not IsPlayerAtEffectiveMaxLevel() then
- CurrentXP, XPToLevel, RestedXP = UnitXP("player"), UnitXPMax("player"), GetXPExhaustion()
- if XPToLevel <= 0 then
- XPToLevel = 1
- end
+ -- Experience Tooltip
+ if not XPIsLevelMax() then
+ GameTooltip:AddDoubleLine("|cff0070ff" .. COMBAT_XP_GAIN .. "|r", format("%s %d", LEVEL, K.Level))
- local remainXP = XPToLevel - CurrentXP
- local remainPercent = remainXP / XPToLevel
- RemainTotal, RemainBars = remainPercent * 100, remainPercent * 20
- PercentXP, RemainXP = (CurrentXP / XPToLevel) * 100, K.ShortValue(remainXP)
+ if CurrentXP then
+ GameTooltip:AddLine(" ")
+ GameTooltip:AddDoubleLine(L["XP"], string_format(" %s / %s (%.2f%%)", K.ShortValue(CurrentXP), K.ShortValue(XPToLevel), PercentXP), 1, 1, 1)
+ end
- GameTooltip:AddLine("Experience", 0, 0.4, 1)
- GameTooltip:AddDoubleLine(LEVEL, K.Level, 1, 1, 1)
- GameTooltip:AddDoubleLine("XP:", string_format(" %d / %d (%.2f%%)", CurrentXP, XPToLevel, PercentXP), 1, 1, 1)
- GameTooltip:AddDoubleLine("Remaining:", string_format(" %s (%.2f%% - %d " .. L["Bars"] .. ")", RemainXP, RemainTotal, RemainBars), 1, 1, 1)
+ if RemainXP then
+ GameTooltip:AddDoubleLine(L["Remaining"], string_format(" %s (%.2f%% - %.2f " .. L["Bars"] .. ")", RemainXP, RemainTotal, RemainBars), 1, 1, 1)
+ end
- if RestedXP and RestedXP > 0 then
- GameTooltip:AddDoubleLine("Rested:", string_format("%d (%.2f%%)", RestedXP, PercentRested), 1, 1, 1)
+ if RestedXP > 0 then
+ GameTooltip:AddDoubleLine(L["Rested"], string_format("+%s (%.2f%%)", K.ShortValue(RestedXP), PercentRested), 1, 1, 1)
end
+
+ GameTooltip:AddLine(" ")
+ GameTooltip:AddDoubleLine(altKeyText .. KEY_PLUS .. K.RightButton, sendExperienceText)
end
if GetWatchedFactionInfo() then
+ if not XPIsLevelMax() then
+ GameTooltip:AddLine(" ")
+ end
+
local name, reaction, minValue, maxValue, curValue, factionID = GetWatchedFactionInfo()
- local standing = _G["FACTION_STANDING_LABEL" .. reaction] or UNKNOWN
- local isParagon = C_Reputation_IsFactionParagon(factionID)
+ local isParagon = factionID and C_Reputation_IsFactionParagon(factionID)
+ local standing
- if factionID and isParagon then
+ if isParagon then
local current, threshold = C_Reputation_GetFactionParagonInfo(factionID)
if current and threshold then
standing, minValue, maxValue, curValue = L["Paragon"], 0, threshold, current % threshold
@@ -248,99 +267,149 @@ function Module:ExpBar_UpdateTooltip()
end
if name then
- if not IsPlayerAtEffectiveMaxLevel() then
- GameTooltip:AddLine(" ")
- end
GameTooltip:AddLine(name, K.RGBToHex(0, 0.74, 0.95))
+ GameTooltip:AddLine(" ")
- local friendID, friendTextLevel, _
- if factionID then
- friendID, _, _, _, _, _, friendTextLevel = C_GossipInfo_GetFriendshipReputation(factionID)
- if friendID and friendID.friendshipFactionID > 0 then
- standing = friendID.reaction
- end
+ local info = factionID and C_GossipInfo.GetFriendshipReputation(factionID)
+ if info and info.friendshipFactionID and info.friendshipFactionID > 0 then
+ standing, minValue, maxValue, curValue = info.reaction, info.reactionThreshold or 0, info.nextThreshold or math.huge, info.standing or 1
+ end
+
+ if not standing then
+ standing = _G["FACTION_STANDING_LABEL" .. reaction] or UNKNOWN
end
local isMajorFaction = factionID and C_Reputation_IsMajorFaction(factionID)
if not isMajorFaction then
- GameTooltip:AddDoubleLine(STANDING .. ":", (friendID and friendTextLevel) or standing, 1, 1, 1)
+ GameTooltip:AddDoubleLine(STANDING .. ":", standing, 1, 1, 1)
end
- if isMajorFaction then
+ if not isParagon and isMajorFaction then
local majorFactionData = C_MajorFactions_GetMajorFactionData(factionID)
- curValue = C_MajorFactions_HasMaximumRenown(factionID) and majorFactionData.renownLevelThreshold or majorFactionData.renownReputationEarned or 0
+ curValue = (C_MajorFactions_HasMaximumRenown(factionID) and majorFactionData.renownLevelThreshold) or majorFactionData.renownReputationEarned or 0
maxValue = majorFactionData.renownLevelThreshold
- GameTooltip:AddDoubleLine(RENOWN_LEVEL_LABEL .. majorFactionData.renownLevel, format("%d / %d (%d%%)", GetValues(curValue, 0, maxValue)), BLUE_FONT_COLOR.r, BLUE_FONT_COLOR.g, BLUE_FONT_COLOR.b)
+ GameTooltip:AddDoubleLine(RENOWN_LEVEL_LABEL .. majorFactionData.renownLevel, string_format("%d / %d (%d%%)", RepGetValues(curValue, 0, maxValue)), BLUE_FONT_COLOR.r, BLUE_FONT_COLOR.g, BLUE_FONT_COLOR.b, 1, 1, 1)
+ elseif (isParagon or (reaction ~= _G.MAX_REPUTATION_REACTION)) and maxValue ~= math.huge then
+ GameTooltip:AddDoubleLine(REPUTATION .. ":", string_format("%d / %d (%d%%)", RepGetValues(curValue, minValue, maxValue)), 1, 1, 1)
+ end
- local current, _, percent = GetValues(QuestRep, 0, maxValue)
- GameTooltip:AddDoubleLine("Reputation from Quests", format("%d (%d%%)", current, percent), 1, 1, 1)
- elseif isParagon or (reaction ~= _G.MAX_REPUTATION_REACTION) then
- local current, maximum, percent = GetValues(curValue, minValue, maxValue)
- GameTooltip:AddDoubleLine(REPUTATION .. ":", format("%d / %d (%d%%)", current, maximum, percent), 1, 1, 1)
+ -- Check for specific faction
+ if factionID == 2465 then -- Translate "荒猎团" if necessary
+ local repInfo = C_GossipInfo_GetFriendshipReputation(2463) -- Translate "玛拉斯缪斯" if necessary
+ local rep, name, reaction, threshold, nextThreshold = repInfo.standing, repInfo.name, repInfo.reaction, repInfo.reactionThreshold, repInfo.nextThreshold
+ if nextThreshold and rep > 0 then
+ local current = rep - threshold
+ local currentMax = nextThreshold - threshold
+ GameTooltip:AddLine(" ") -- Translate if necessary
+ GameTooltip:AddLine(name, 0, 0.6, 1) -- Translate "name" if necessary
+ GameTooltip:AddDoubleLine(reaction, current .. " / " .. currentMax .. " (" .. floor(current / currentMax * 100) .. "%)", 0.6, 0.8, 1, 1, 1, 1) -- Translate "reaction" if necessary
+ end
end
end
+
+ GameTooltip:AddLine(" ")
+ GameTooltip:AddDoubleLine(altKeyText .. KEY_PLUS .. K.RightButton, sendReputationText)
end
if IsWatchingHonorAsXP() then
- local CurrentHonor, MaxHonor, CurrentLevel = UnitHonor("player"), UnitHonorMax("player"), UnitHonorLevel("player")
- local PercentHonor, RemainingHonor = (CurrentHonor / MaxHonor) * 100, MaxHonor - CurrentHonor
+ GameTooltip:AddLine(HONOR)
+
+ GameTooltip:AddDoubleLine("Current Level:", CurrentLevel, 1, 1, 1)
GameTooltip:AddLine(" ")
- _G.GameTooltip:AddLine(HONOR, 0.94, 0.45, 0.25)
- _G.GameTooltip:AddDoubleLine("Level:", CurrentLevel, 1, 1, 1)
- _G.GameTooltip:AddDoubleLine("XP:", string_format(" %d / %d (%d%%)", CurrentHonor, MaxHonor, PercentHonor), 1, 1, 1)
- _G.GameTooltip:AddDoubleLine("Remaining:", string_format(" %d (%d%% - %d " .. L["Bars"] .. ")", RemainingHonor, RemainingHonor / MaxHonor * 100, 20 * RemainingHonor / MaxHonor), 1, 1, 1)
+
+ GameTooltip:AddDoubleLine(L["Honor XP"], string_format(" %d / %d (%d%%)", CurrentHonor, MaxHonor, PercentHonor), 1, 1, 1)
+ GameTooltip:AddDoubleLine(L["Honor Remaining"], string_format(" %d (%d%% - %d " .. L["Bars"] .. ")", RemainingHonor, RemainingHonor / MaxHonor * 100, 20 * RemainingHonor / MaxHonor), 1, 1, 1)
end
if IsAzeriteAvailable() then
- local azeriteItem, currentLevel, curXP, maxXP
- local function dataLoadedCancelFunc()
- _G.GameTooltip:AddLine(" ")
- _G.GameTooltip:AddLine(ARTIFACT_POWER, 0.90, 0.80, 0.50)
- _G.GameTooltip:AddDoubleLine("Level:", currentLevel, 1, 1, 1)
- _G.GameTooltip:AddDoubleLine("AP:", string_format(" %d / %d (%d%%)", curXP, maxXP, curXP / maxXP * 100), 1, 1, 1)
- _G.GameTooltip:AddDoubleLine("Remaining:", string_format(" %d (%d%% - %d " .. L["Bars"] .. ")", maxXP - curXP, (maxXP - curXP) / maxXP * 100, 10 * (maxXP - curXP) / maxXP), 1, 1, 1)
- end
-
local item = C_AzeriteItem_FindActiveAzeriteItem()
if item then
curXP, maxXP = C_AzeriteItem_GetAzeriteItemXPInfo(item)
currentLevel = C_AzeriteItem_GetPowerLevel(item)
azeriteItem = Item:CreateFromItemLocation(item)
- azeriteItem:ContinueWithCancelOnItemLoad(dataLoadedCancelFunc)
+ azeriteItem:ContinueWithCancelOnItemLoad(function()
+ GameTooltip:AddDoubleLine(ARTIFACT_POWER, azeriteItem:GetItemName() .. " (" .. currentLevel .. ")", nil, nil, nil, 0.90, 0.80, 0.50) -- Temp Locale
+ GameTooltip:AddLine(" ")
+
+ GameTooltip:AddDoubleLine("AP:", string_format(" %d / %d (%d%%)", curXP, maxXP, curXP / maxXP * 100), 1, 1, 1)
+ GameTooltip:AddDoubleLine(L["Remaining"], string_format(" %d (%d%% - %d " .. L["Bars"] .. ")", maxXP - curXP, (maxXP - curXP) / maxXP * 100, 10 * (maxXP - curXP) / maxXP), 1, 1, 1)
+ end)
end
end
GameTooltip:Show()
end
+local function OnExpBarLeave()
+ K.HideTooltip()
+end
+
+local lastMessageTime = 0
+local COOLDOWN_DURATION = 10 -- Cooldown duration in seconds
+
+local function OnExpRepMouseUp(self, button)
+ if IsAltKeyDown() and button == "RightButton" then
+ local currentTime = GetTime()
+ if currentTime - lastMessageTime >= COOLDOWN_DURATION then
+ if not IsInGroup() then
+ print("You are not in a party.")
+ return
+ end
+
+ if not XPIsLevelMax() then
+ local expPercent = string_format("%.2f%%", PercentXP)
+ local barsLeft = RemainBars
+ local expMessage = string_format("Current XP: %s, Remaining XP: %s, Percent XP: %s, Bars Left: %.2f", K.ShortValue(CurrentXP), RemainXP, expPercent, barsLeft)
+ if RestedXP > 0 then
+ expMessage = expMessage .. string_format(", Rested XP: %s", K.ShortValue(RestedXP))
+ end
+ SendChatMessage(expMessage, "PARTY")
+ elseif XPIsLevelMax() and GetWatchedFactionInfo() then
+ local name, reaction, _, _, curValue = GetWatchedFactionInfo()
+ local standing = _G["FACTION_STANDING_LABEL" .. reaction] or UNKNOWN
+ SendChatMessage(string_format("%s Reputation: %s - Standing: %s", name, K.ShortValue(curValue), standing), "PARTY")
+ end
+ lastMessageTime = currentTime
+ else
+ print("Please wait before sending another message.")
+ end
+ end
+end
+
local ExpRep_EventList = {
- "PLAYER_XP_UPDATE",
+ -- ALL
+ -- "PLAYER_ENTERING_WORLD",
"PLAYER_LEVEL_UP",
+ -- Experience Events
"UPDATE_EXHAUSTION",
- "PLAYER_ENTERING_WORLD",
- "UPDATE_FACTION",
- "ARTIFACT_XP_UPDATE",
- "PLAYER_EQUIPMENT_CHANGED",
+ "PLAYER_XP_UPDATE",
"ENABLE_XP_GAIN",
"DISABLE_XP_GAIN",
+ -- Reputation
+ "UPDATE_FACTION",
+ "COMBAT_TEXT_UPDATE",
+ "QUEST_FINISHED",
+ "MAJOR_FACTION_RENOWN_LEVEL_CHANGED",
+ "MAJOR_FACTION_UNLOCKED",
+ -- Azerite
"AZERITE_ITEM_EXPERIENCE_CHANGED",
+ "PLAYER_EQUIPMENT_CHANGED",
+ --Honor
"HONOR_XP_UPDATE",
- "QUEST_FINISHED",
- "COMBAT_TEXT_UPDATE",
+ "PLAYER_FLAGS_CHANGED",
}
-function Module:SetupExpRepScript(bar)
+local function SetupExpRepScript(bar)
for _, event in pairs(ExpRep_EventList) do
bar:RegisterEvent(event)
end
- bar:SetScript("OnEvent", Module.ExpBar_Update)
- bar:SetScript("OnEnter", Module.ExpBar_UpdateTooltip)
- bar:SetScript("OnLeave", K.HideTooltip)
+ OnExpBarEvent(bar)
- hooksecurefunc(StatusTrackingBarManager, "UpdateBarsShown", function()
- Module.ExpBar_Update(bar)
- end)
+ bar:SetScript("OnEvent", OnExpBarEvent)
+ bar:SetScript("OnEnter", OnExpBarEnter)
+ bar:SetScript("OnLeave", OnExpBarLeave)
+ bar:SetScript("OnMouseUp", OnExpRepMouseUp)
end
function Module:CreateExpbar()
@@ -388,7 +457,7 @@ function Module:CreateExpbar()
text:SetAlpha(0.8) -- Fade this a bit?
bar.text = text
- Module:SetupExpRepScript(bar)
+ SetupExpRepScript(bar)
if not bar.mover then
bar.mover = K.Mover(bar, "bar", "bar", { "TOP", Minimap, "BOTTOM", 0, -6 })
@@ -397,31 +466,3 @@ function Module:CreateExpbar()
end
end
Module:RegisterMisc("ExpRep", Module.CreateExpbar)
-
-function Module:CreateParagonReputation()
- if not C["Misc"].ParagonEnable then
- return
- end
-
- hooksecurefunc("ReputationFrame_InitReputationRow", function(factionRow)
- local factionID = factionRow.factionID
- local factionContainer = factionRow.Container
- local factionBar = factionContainer.ReputationBar
- local factionStanding = factionBar.FactionStanding
-
- if factionContainer.Paragon:IsShown() then
- local currentValue, threshold = C_Reputation_GetFactionParagonInfo(factionID)
- if currentValue then
- local barValue = mod(currentValue, threshold)
- local factionStandingtext = L["Paragon"] .. floor(currentValue / threshold)
-
- factionBar:SetMinMaxValues(0, threshold)
- factionBar:SetValue(barValue)
- factionStanding:SetText(factionStandingtext)
- factionRow.standingText = factionStandingtext
- factionRow.rolloverText = format(REPUTATION_PROGRESS_FORMAT, BreakUpLargeNumbers(barValue), BreakUpLargeNumbers(threshold))
- end
- end
- end)
-end
-Module:RegisterMisc("ParagonRep", Module.CreateParagonReputation)
diff --git a/KkthnxUI/Modules/Miscellaneous/Elements/MDGuildBest.lua b/KkthnxUI/Modules/Miscellaneous/Elements/MDGuildBest.lua
index dab459dd..87137819 100644
--- a/KkthnxUI/Modules/Miscellaneous/Elements/MDGuildBest.lua
+++ b/KkthnxUI/Modules/Miscellaneous/Elements/MDGuildBest.lua
@@ -1,26 +1,18 @@
local K, C, L = KkthnxUI[1], KkthnxUI[2], KkthnxUI[3]
local Module = K:GetModule("Miscellaneous")
-local pairs = pairs
-local string_format = string.format
-local string_split = string.split
-local table_sort = table.sort
-local table_wipe = table.wipe
-local tonumber = tonumber
-
+local format, strsplit, tonumber, pairs, wipe = format, strsplit, tonumber, pairs, wipe
local Ambiguate = Ambiguate
-local CHALLENGE_MODE_GUILD_BEST_LINE = CHALLENGE_MODE_GUILD_BEST_LINE
-local CHALLENGE_MODE_GUILD_BEST_LINE_YOU = CHALLENGE_MODE_GUILD_BEST_LINE_YOU
-local CHALLENGE_MODE_POWER_LEVEL = CHALLENGE_MODE_POWER_LEVEL
-local C_ChallengeMode_GetGuildLeaders = C_ChallengeMode.GetGuildLeaders
+local C_MythicPlus_GetRunHistory = C_MythicPlus.GetRunHistory
local C_ChallengeMode_GetMapUIInfo = C_ChallengeMode.GetMapUIInfo
-local C_MythicPlus_GetOwnedKeystoneChallengeMapID = C_MythicPlus.GetOwnedKeystoneChallengeMapID
+local C_ChallengeMode_GetGuildLeaders = C_ChallengeMode.GetGuildLeaders
local C_MythicPlus_GetOwnedKeystoneLevel = C_MythicPlus.GetOwnedKeystoneLevel
-local C_MythicPlus_GetRunHistory = C_MythicPlus.GetRunHistory
-local GetItemInfo = GetItemInfo
+local C_MythicPlus_GetOwnedKeystoneChallengeMapID = C_MythicPlus.GetOwnedKeystoneChallengeMapID
+local CHALLENGE_MODE_POWER_LEVEL = CHALLENGE_MODE_POWER_LEVEL
+local CHALLENGE_MODE_GUILD_BEST_LINE = CHALLENGE_MODE_GUILD_BEST_LINE
+local CHALLENGE_MODE_GUILD_BEST_LINE_YOU = CHALLENGE_MODE_GUILD_BEST_LINE_YOU
local CHALLENGE_MODE_THIS_WEEK = CHALLENGE_MODE_THIS_WEEK
local WEEKLY_REWARDS_MYTHIC_TOP_RUNS = WEEKLY_REWARDS_MYTHIC_TOP_RUNS
-local hooksecurefunc = hooksecurefunc
local hasAngryKeystones
local frame
@@ -33,22 +25,19 @@ function Module:GuildBest_UpdateTooltip()
end
GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
-
local name = C_ChallengeMode_GetMapUIInfo(leaderInfo.mapChallengeModeID)
GameTooltip:SetText(name, 1, 1, 1)
GameTooltip:AddLine(format(CHALLENGE_MODE_POWER_LEVEL, leaderInfo.keystoneLevel))
-
for i = 1, #leaderInfo.members do
local classColorStr = K.ClassColors[leaderInfo.members[i].classFileName].colorStr
GameTooltip:AddLine(format(CHALLENGE_MODE_GUILD_BEST_LINE, classColorStr, leaderInfo.members[i].name))
end
-
GameTooltip:Show()
end
function Module:GuildBest_Create()
frame = CreateFrame("Frame", nil, ChallengesFrame, "BackdropTemplate")
- frame:SetPoint("BOTTOMRIGHT", -10, 75)
+ frame:SetPoint("BOTTOMRIGHT", -8, 75)
frame:SetSize(170, 105)
frame:CreateBorder()
K.CreateFontString(frame, 16, GUILD, "", "system", "TOPLEFT", 16, -6)
@@ -59,19 +48,15 @@ function Module:GuildBest_Create()
entry:SetPoint("LEFT", 10, 0)
entry:SetPoint("RIGHT", -10, 0)
entry:SetHeight(18)
-
- entry.CharacterName = K.CreateFontString(entry, 13, "", "", false, "LEFT", 6, 0)
+ entry.CharacterName = K.CreateFontString(entry, 14, "", "", false, "LEFT", 6, 0)
entry.CharacterName:SetPoint("RIGHT", -30, 0)
entry.CharacterName:SetJustifyH("LEFT")
-
- entry.Level = K.CreateFontString(entry, 13, "", "", "system")
+ entry.Level = K.CreateFontString(entry, 14, "", "system")
entry.Level:SetJustifyH("LEFT")
entry.Level:ClearAllPoints()
-
entry.Level:SetPoint("LEFT", entry, "RIGHT", -22, 0)
entry:SetScript("OnEnter", self.GuildBest_UpdateTooltip)
entry:SetScript("OnLeave", K.HideTooltip)
-
if i == 1 then
entry:SetPoint("TOP", frame, 0, -26)
else
@@ -84,6 +69,31 @@ function Module:GuildBest_Create()
if not hasAngryKeystones then
ChallengesFrame.WeeklyInfo.Child.Description:SetPoint("CENTER", 0, 20)
end
+
+ if SlashCmdList.KEYSTONE then -- Details key window
+ local button = CreateFrame("Button", nil, frame)
+ button:SetSize(20, 20)
+ button:SetPoint("TOPRIGHT", -12, -5)
+ button:SetScript("OnClick", function()
+ if DetailsKeystoneInfoFrame and DetailsKeystoneInfoFrame:IsShown() then
+ DetailsKeystoneInfoFrame:Hide()
+ else
+ SlashCmdList.KEYSTONE()
+ end
+ end)
+ local tex = button:CreateTexture()
+ tex:SetAllPoints()
+ tex:SetTexture("Interface\\Buttons\\UI-GuildButton-PublicNote-Up")
+ tex:SetVertexColor(0, 1, 0)
+
+ local hl = button:CreateTexture(nil, "HIGHLIGHT")
+ hl:SetAllPoints()
+ hl:SetTexture("Interface\\Buttons\\UI-GuildButton-PublicNote-Up")
+ end
+
+ if RaiderIO_GuildWeeklyFrame then
+ K.HideInterfaceOption(RaiderIO_GuildWeeklyFrame)
+ end
end
function Module:GuildBest_SetUp(leaderInfo)
@@ -94,7 +104,7 @@ function Module:GuildBest_SetUp(leaderInfo)
end
local classColorStr = K.ClassColors[leaderInfo.classFileName].colorStr
- self.CharacterName:SetText(string_format(str, classColorStr, leaderInfo.name))
+ self.CharacterName:SetText(format(str, classColorStr, leaderInfo.name))
self.Level:SetText(leaderInfo.keystoneLevel)
end
@@ -103,7 +113,6 @@ function Module:GuildBest_Update()
if not frame then
Module:GuildBest_Create()
end
-
if self.leadersAvailable then
local leaders = C_ChallengeMode_GetGuildLeaders()
if leaders and #leaders > 0 then
@@ -136,12 +145,6 @@ function Module:GuildBest_Update()
keystoneText:SetPoint("TOP", self.WeeklyInfo.Child.DungeonScoreInfo.Score, "BOTTOM", 0, -3)
end
- local affix = self.WeeklyInfo.Child.Affixes[1]
- if affix then
- affix:ClearAllPoints()
- affix:SetPoint("TOPLEFT", 20, -55)
- end
-
resize = true
end
end
@@ -169,9 +172,10 @@ function Module:KeystoneInfo_WeeklyRuns()
local numRuns = runHistory and #runHistory
if numRuns > 0 then
local isShiftKeyDown = IsShiftKeyDown()
+
GameTooltip:AddLine(" ")
- GameTooltip:AddDoubleLine(isShiftKeyDown and CHALLENGE_MODE_THIS_WEEK or string_format(WEEKLY_REWARDS_MYTHIC_TOP_RUNS, WeeklyRunsThreshold), "(" .. numRuns .. ")", 0.5, 0.7, 1)
- table_sort(runHistory, sortHistory)
+ GameTooltip:AddDoubleLine(isShiftKeyDown and CHALLENGE_MODE_THIS_WEEK or format(WEEKLY_REWARDS_MYTHIC_TOP_RUNS, WeeklyRunsThreshold), "(" .. numRuns .. ")", 0.6, 0.8, 1)
+ sort(runHistory, sortHistory)
for i = 1, isShiftKeyDown and numRuns or WeeklyRunsThreshold do
local runInfo = runHistory[i]
@@ -186,9 +190,8 @@ function Module:KeystoneInfo_WeeklyRuns()
end
GameTooltip:AddDoubleLine(name, "Lv." .. runInfo.level, 1, 1, 1, r, g, b)
end
-
if not isShiftKeyDown then
- GameTooltip:AddLine(L["Hold Shift"], 0.6, 0.8, 1)
+ GameTooltip:AddLine("Hold Shift", 0.6, 0.8, 1)
end
GameTooltip:Show()
end
@@ -198,7 +201,7 @@ function Module:KeystoneInfo_Create()
local texture = select(10, GetItemInfo(158923)) or 525134
local iconColor = K.QualityColors[Enum.ItemQuality.Epic or 4]
local button = CreateFrame("Frame", nil, ChallengesFrame.WeeklyInfo, "BackdropTemplate")
- button:SetPoint("BOTTOMLEFT", 4, 67)
+ button:SetPoint("BOTTOMLEFT", 2, 67)
button:SetSize(32, 32)
button.Icon = button:CreateTexture(nil, "ARTWORK")
@@ -212,17 +215,15 @@ function Module:KeystoneInfo_Create()
button:SetScript("OnEnter", function(self)
GameTooltip:ClearLines()
GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
- GameTooltip:AddLine(L["Account Keystones"])
-
- for fullName, info in pairs(KkthnxUIDB.KeystoneInfo) do
+ GameTooltip:AddLine("Account Keystone")
+ for fullName, info in pairs(KkthnxUIDB["KeystoneInfo"]) do
local name = Ambiguate(fullName, "none")
- local mapID, level, class, faction = string_split(":", info)
+ local mapID, level, class, faction = strsplit(":", info)
local color = K.RGBToHex(K.ColorClass(class))
local factionColor = faction == "Horde" and "|cffff5040" or "|cff00adf0"
local dungeon = C_ChallengeMode_GetMapUIInfo(tonumber(mapID))
- GameTooltip:AddDoubleLine(string_format(color .. "%s:|r", name), string_format("%s%s(%s)|r", factionColor, dungeon, level))
+ GameTooltip:AddDoubleLine(format(color .. "%s:|r", name), format("%s%s(%s)|r", factionColor, dungeon, level))
end
-
GameTooltip:AddLine("")
GameTooltip:AddDoubleLine(" ", K.ScrollButton .. L["Reset Data"] .. " ", 1, 1, 1, 0.5, 0.7, 1)
GameTooltip:Show()
@@ -231,8 +232,8 @@ function Module:KeystoneInfo_Create()
button:SetScript("OnLeave", K.HideTooltip)
button:SetScript("OnMouseUp", function(_, btn)
if btn == "MiddleButton" then
- table_wipe(KkthnxUIDB.KeystoneInfo)
- Module:KeystoneInfo_Update() -- Update own keystone info after reset
+ wipe(KkthnxUIDB["KeystoneInfo"])
+ Module:KeystoneInfo_Update() -- update own keystone info after reset
end
end)
end
@@ -247,9 +248,9 @@ end
function Module:KeystoneInfo_Update()
local mapID, keystoneLevel = Module:KeystoneInfo_UpdateBag()
if mapID then
- KkthnxUIDB.KeystoneInfo[K.Name .. "-" .. K.Realm] = mapID .. ":" .. keystoneLevel .. ":" .. K.Class .. ":" .. K.Faction
+ KkthnxUIDB["KeystoneInfo"][K.Name .. "-" .. K.Realm] = mapID .. ":" .. keystoneLevel .. ":" .. K.Class .. ":" .. K.Faction
else
- KkthnxUIDB.KeystoneInfo[K.Name .. "-" .. K.Realm] = nil
+ KkthnxUIDB["KeystoneInfo"][K.Name .. "-" .. K.Realm] = nil
end
end
@@ -258,11 +259,11 @@ function Module:CreateGuildBest()
return
end
- hasAngryKeystones = K.CheckAddOnState("AngryKeystones")
+ hasAngryKeystones = C_AddOns.IsAddOnLoaded("AngryKeystones")
K:RegisterEvent("ADDON_LOADED", Module.GuildBest_OnLoad)
Module:KeystoneInfo_Update()
K:RegisterEvent("BAG_UPDATE", Module.KeystoneInfo_Update)
end
-Module:RegisterMisc("MDGuildBest", Module.CreateGuildBest) -- DFUPDATE
+Module:RegisterMisc("MDGuildBest", Module.CreateGuildBest)
diff --git a/KkthnxUI/Modules/Miscellaneous/Elements/MissingStats.lua b/KkthnxUI/Modules/Miscellaneous/Elements/MissingStats.lua
index 82d60456..2c10f665 100644
--- a/KkthnxUI/Modules/Miscellaneous/Elements/MissingStats.lua
+++ b/KkthnxUI/Modules/Miscellaneous/Elements/MissingStats.lua
@@ -19,10 +19,12 @@ function Module:CreateMissingStats()
local statPanel = CreateFrame("Frame", nil, CharacterFrameInsetRight)
statPanel:SetSize(200, 350)
statPanel:SetPoint("TOP", 0, -5)
+
local scrollFrame = CreateFrame("ScrollFrame", nil, statPanel, "UIPanelScrollFrameTemplate")
scrollFrame:SetAllPoints()
scrollFrame.ScrollBar:Hide()
scrollFrame.ScrollBar.Show = K.Noop
+
local stat = CreateFrame("Frame", nil, scrollFrame)
stat:SetSize(200, 1)
scrollFrame:SetScrollChild(stat)
diff --git a/KkthnxUI/Modules/Miscellaneous/Elements/MuteSounds.lua b/KkthnxUI/Modules/Miscellaneous/Elements/MuteSounds.lua
index 3fe5c2b3..8c852ec6 100644
--- a/KkthnxUI/Modules/Miscellaneous/Elements/MuteSounds.lua
+++ b/KkthnxUI/Modules/Miscellaneous/Elements/MuteSounds.lua
@@ -88,6 +88,9 @@ local muteSounds = {
[569861] = true, -- sound/vehicles/motorcyclevehicle/motorcyclevehicleloadthrown.ogg
[569862] = true, -- sound/vehicles/motorcyclevehicle/motorcyclevehiclejumpstart2.ogg
[569863] = true, -- sound/vehicles/motorcyclevehicle/motorcyclevehiclejumpend1.ogg
+
+ -- Sylvanas' Music Box I hate this darn thing so much!
+ [53221] = true, -- sound/music/gluescreenmusic/bccredits_lament_of_the_highborne.mp3
}
function Module:CreateMuteSounds()
diff --git a/KkthnxUI/Modules/Miscellaneous/Elements/ParagonRep.lua b/KkthnxUI/Modules/Miscellaneous/Elements/ParagonRep.lua
new file mode 100644
index 00000000..fcf78ec9
--- /dev/null
+++ b/KkthnxUI/Modules/Miscellaneous/Elements/ParagonRep.lua
@@ -0,0 +1,1011 @@
+local K, C = KkthnxUI[1], KkthnxUI[2]
+local Module = K:GetModule("Miscellaneous")
+
+local _G = _G
+local floor = floor
+local format = format
+local max = max
+local mod = mod
+local select = select
+local strfind = strfind
+local tremove = tremove
+local unpack = unpack
+
+local BreakUpLargeNumbers = BreakUpLargeNumbers
+local CreateFrame = CreateFrame
+local GameTooltip_AddHighlightLine = GameTooltip_AddHighlightLine
+local GameTooltip_AddQuestRewardsToTooltip = GameTooltip_AddQuestRewardsToTooltip
+local GameTooltip_SetDefaultAnchor = GameTooltip_SetDefaultAnchor
+local GetFactionInfoByID = GetFactionInfoByID
+local GetQuestLogCompletionText = GetQuestLogCompletionText
+local GetSelectedFaction = GetSelectedFaction
+local Item = Item
+local PlaySound = PlaySound
+local PlayerHasToy = PlayerHasToy
+local UIFrameFadeIn = UIFrameFadeIn
+local UIFrameFadeOut = UIFrameFadeOut
+
+local C_MountJournal_GetMountInfoByID = C_MountJournal.GetMountInfoByID
+local C_QuestLog_GetLogIndexForQuestID = C_QuestLog.GetLogIndexForQuestID
+local C_QuestLog_IsQuestFlaggedCompleted = C_QuestLog.IsQuestFlaggedCompleted
+local C_Reputation_GetFactionParagonInfo = C_Reputation.GetFactionParagonInfo
+local C_Reputation_IsFactionParagon = C_Reputation.IsFactionParagon
+local C_TransmogCollection_PlayerHasTransmogByItemInfo = C_TransmogCollection.PlayerHasTransmogByItemInfo
+
+local FONT_COLOR_CODE_CLOSE = FONT_COLOR_CODE_CLOSE
+local HIGHLIGHT_FONT_COLOR_CODE = HIGHLIGHT_FONT_COLOR_CODE
+local REPUTATION_PROGRESS_FORMAT = REPUTATION_PROGRESS_FORMAT
+
+local ACTIVE_TOAST = false
+local WAITING_TOAST = {}
+
+-- TEMP OPTIONS TO TEST
+local ParaRep_Settings = {
+ enable = true,
+ color = { r = 0, g = 0.5, b = 0.9 },
+ text = "PARAGON",
+ toast = {
+ enable = true,
+ sound = true,
+ fade_time = 5,
+ },
+}
+
+-- from Paragon Reputation
+local paragonData = {
+ -- Legion
+ [48976] = {
+ -- Argussian Reach
+ factionID = 2170,
+ cache = 152922,
+ },
+ [46777] = {
+ -- Armies of Legionfall
+ factionID = 2045,
+ cache = 152108,
+ rewards = {
+ {
+ -- Orphaned Felbat
+ type = "PET",
+ itemID = 147841,
+ },
+ },
+ },
+ [48977] = {
+ -- Army of the Light
+ factionID = 2165,
+ cache = 152923,
+ rewards = {
+ {
+ -- Avenging Felcrushed
+ type = "MOUNT",
+ itemID = 153044,
+ mountID = 985,
+ },
+ {
+ -- Blessed Felcrushed
+ type = "MOUNT",
+ itemID = 153043,
+ mountID = 984,
+ },
+ {
+ -- Glorious Felcrushed
+ type = "MOUNT",
+ itemID = 153042,
+ mountID = 983,
+ },
+ {
+ -- Holy Lightsphere
+ type = "TOY",
+ itemID = 153182,
+ },
+ },
+ },
+ [46745] = {
+ -- Court of Farondis
+ factionID = 1900,
+ cache = 152102,
+ rewards = {
+ {
+ -- Cloudwing Hippogryph
+ type = "MOUNT",
+ itemID = 147806,
+ mountID = 943,
+ },
+ },
+ },
+ [46747] = {
+ -- Dreamweavers
+ factionID = 1883,
+ cache = 152103,
+ rewards = {
+ {
+ -- Wild Dreamrunner
+ type = "MOUNT",
+ itemID = 147804,
+ mountID = 942,
+ },
+ },
+ },
+ [46743] = {
+ -- Highmountain Tribes
+ factionID = 1828,
+ cache = 152104,
+ rewards = {
+ {
+ -- Highmountain Elderhorn
+ type = "MOUNT",
+ itemID = 147807,
+ mountID = 941,
+ },
+ },
+ },
+ [46748] = {
+ -- The Nightfallen
+ factionID = 1859,
+ cache = 152105,
+ rewards = {
+ {
+ -- Leywoven Flying Carpet
+ type = "MOUNT",
+ itemID = 143764,
+ mountID = 905,
+ },
+ },
+ },
+ [46749] = {
+ -- The Wardens
+ factionID = 1894,
+ cache = 152107,
+ rewards = {
+ {
+ -- Sira's Extra Cloak
+ type = "TOY",
+ itemID = 147843,
+ },
+ },
+ },
+ [46746] = {
+ -- Valarjar
+ factionID = 1948,
+ cache = 152106,
+ rewards = {
+ {
+ -- Valarjar Stormwing
+ type = "MOUNT",
+ itemID = 147805,
+ mountID = 944,
+ },
+ },
+ },
+ -- Battle for Azeroth
+ -- Neutral
+ [54453] = {
+ -- Champions of Azeroth
+ factionID = 2164,
+ cache = 166298,
+ rewards = {
+ {
+ -- Azerite Firework Launcher
+ type = "TOY",
+ itemID = 166877,
+ },
+ },
+ },
+ [58096] = {
+ -- Rajani
+ factionID = 2415,
+ cache = 174483,
+ rewards = {
+ {
+ -- Jade Defender
+ type = "PET",
+ itemID = 174479,
+ },
+ },
+ },
+ [55348] = {
+ -- Rustbolt Resistance
+ factionID = 2391,
+ cache = 170061,
+ rewards = {
+ {
+ -- Blueprint: Microbot XD
+ type = "OTHER",
+ itemID = 169171,
+ questID = 55079,
+ },
+ {
+ -- Blueprint: Holographic Digitalization Relay
+ type = "OTHER",
+ itemID = 168906,
+ questID = 56086,
+ },
+ {
+ -- Blueprint: Rustbolt Resistance Insignia
+ type = "OTHER",
+ itemID = 168494,
+ questID = 55073,
+ },
+ },
+ },
+ [54451] = {
+ -- Tortollan Seekers
+ factionID = 2163,
+ cache = 166245,
+ rewards = {
+ {
+ -- Bowl of Glowing Pufferfish
+ type = "TOY",
+ itemID = 166704,
+ },
+ },
+ },
+ [58097] = {
+ -- Uldum Accord
+ factionID = 2417,
+ cache = 174484,
+ rewards = {
+ {
+ -- Cursed Dune Watcher
+ type = "PET",
+ itemID = 174481,
+ },
+ },
+ },
+ -- Horde
+ [54460] = {
+ -- Talanji's Expedition
+ factionID = 2156,
+ cache = 166282,
+ rewards = {
+ {
+ -- For da Blood God!
+ type = "TOY",
+ itemID = 166308,
+ },
+ {
+ -- Pair of Tiny Bat Wings
+ type = "PET",
+ itemID = 166716,
+ },
+ },
+ },
+ [54455] = {
+ -- The Honorbound
+ factionID = 2157,
+ cache = 166299,
+ rewards = {
+ {
+ -- Rallying War Banner
+ type = "TOY",
+ itemID = 166879,
+ },
+ },
+ },
+ [53982] = {
+ -- The Unshackled
+ factionID = 2373,
+ cache = 169940,
+ rewards = {
+ {
+ -- Royal Snapdragon
+ type = "MOUNT",
+ itemID = 169198,
+ mountID = 1237,
+ },
+ {
+ -- Flopping Fish
+ type = "TOY",
+ itemID = 170203,
+ },
+ {
+ -- Memento of the Deeps
+ type = "TOY",
+ itemID = 170469,
+ },
+ },
+ },
+ [54461] = {
+ -- Voldunai
+ factionID = 2158,
+ cache = 166290,
+ rewards = {
+ {
+ -- Goldtusk Inn Breakfast Buffet
+ type = "TOY",
+ itemID = 166703,
+ },
+ {
+ -- Meerah's Jukebox
+ type = "TOY",
+ itemID = 166880,
+ },
+ },
+ },
+ [54462] = {
+ -- Zandalari Empire
+ factionID = 2103,
+ cache = 166292,
+ rewards = {
+ {
+ -- Warbeast Kraal Dinner Bell
+ type = "TOY",
+ itemID = 166701,
+ },
+ },
+ },
+ -- Alliance
+ [54456] = {
+ -- Order of Embers
+ factionID = 2161,
+ cache = 166297,
+ rewards = {
+ {
+ -- Bewitching Tea Set
+ type = "TOY",
+ itemID = 166808,
+ },
+ {
+ -- Cobalt Raven Hatchling
+ type = "PET",
+ itemID = 166718,
+ },
+ },
+ },
+ [54458] = {
+ -- Proudmoore Admiralty
+ factionID = 2160,
+ cache = 166295,
+ rewards = {
+ {
+ -- Proudmoore Music Box
+ type = "TOY",
+ itemID = 166702,
+ },
+ {
+ -- Albatross Feather
+ type = "PET",
+ itemID = 166714,
+ },
+ },
+ },
+ [54457] = {
+ -- Storm's Wake
+ factionID = 2162,
+ cache = 166294,
+ rewards = {
+ {
+ -- Violet Abyssal Eel
+ type = "PET",
+ itemID = 166719,
+ },
+ },
+ },
+ [54454] = {
+ -- The 7th Legion
+ factionID = 2159,
+ cache = 166300,
+ rewards = {
+ {
+ -- Rallying War Banner
+ type = "TOY",
+ itemID = 166879,
+ },
+ },
+ },
+ [55976] = {
+ -- Waveblade Ankoan
+ factionID = 2400,
+ cache = 169939,
+ rewards = {
+ {
+ -- Royal Snapdragon
+ type = "MOUNT",
+ itemID = 169198,
+ mountID = 1237,
+ },
+ {
+ -- Flopping Fish
+ type = "TOY",
+ itemID = 170203,
+ },
+ {
+ -- Memento of the Deeps
+ type = "TOY",
+ itemID = 170469,
+ },
+ },
+ },
+ -- Shadowlands
+ [61100] = {
+ -- Court of Harvesters
+ factionID = 2413,
+ cache = 180648,
+ rewards = {
+ {
+ -- Stonewing Dredwing Pup
+ type = "PET",
+ itemID = 180601,
+ },
+ },
+ },
+ [64012] = {
+ -- Death's Advance
+ factionID = 2470,
+ cache = 186650,
+ rewards = {
+ {
+ -- Beryl Shardhide
+ type = "MOUNT",
+ itemID = 186644,
+ mountID = 1455,
+ },
+ {
+ -- Fierce Razorwing
+ type = "MOUNT",
+ itemID = 186649,
+ mountID = 1508,
+ },
+ {
+ -- Mosscoated Hopper
+ type = "PET",
+ itemID = 186541,
+ },
+ },
+ },
+ [64266] = {
+ -- The Archivist's Codex
+ factionID = 2472,
+ cache = 187028,
+ rewards = {
+ {
+ -- Tamed Mauler
+ type = "MOUNT",
+ itemID = 186641,
+ mountID = 1454,
+ },
+ {
+ -- Gnashtooth
+ type = "PET",
+ itemID = 186538,
+ },
+ },
+ },
+ [61097] = {
+ -- The Ascended
+ factionID = 2407,
+ cache = 180647,
+ rewards = {
+ {
+ -- Malfunctioning Goliath Gauntlet
+ type = "TOY",
+ itemID = 184396,
+ },
+ {
+ -- Mark of Purity
+ type = "TOY",
+ itemID = 184435,
+ },
+ {
+ -- Larion Cub
+ type = "PET",
+ itemID = 184399,
+ },
+ },
+ },
+ [64867] = {
+ -- The Enlightened
+ factionID = 2478,
+ cache = 187780,
+ rewards = {
+ {
+ -- Sphere of Enlightened Cogitation
+ type = "TOY",
+ itemID = 190177,
+ },
+ {
+ -- Schematic: Russet Bufonoid
+ type = "OTHER",
+ itemID = 189471,
+ questID = 65394,
+ },
+ {
+ -- Enlightened Portal Research
+ type = "OTHER",
+ itemID = 190234,
+ questID = 65617,
+ },
+ {
+ -- Ray Soul
+ type = "OTHER",
+ covenant = "|A:sanctumupgrades-nightfae-32x32:14:14:0:-1|a",
+ itemID = 189973,
+ questID = 65506,
+ },
+ {
+ -- Distinguished Blade of Cartel Al
+ type = "COSMETIC",
+ itemID = 190935,
+ },
+ {
+ -- Edge of the Enlightened
+ type = "COSMETIC",
+ itemID = 190937,
+ },
+ {
+ -- Standard of the Wandering Brokers
+ type = "COSMETIC",
+ itemID = 190934,
+ },
+ {
+ -- Walking Staff of the Enlightened Journey
+ type = "COSMETIC",
+ itemID = 190939,
+ },
+ {
+ -- Cape of the Regal Wanderer
+ type = "COSMETIC",
+ itemID = 190931,
+ },
+ {
+ -- Dark Shawl of the Enlightened
+ type = "COSMETIC",
+ itemID = 190930,
+ },
+ {
+ -- Ebony Protocloak
+ type = "COSMETIC",
+ itemID = 190929,
+ },
+ {
+ -- Majestic Oracle's Drape
+ type = "COSMETIC",
+ itemID = 190933,
+ },
+ {
+ -- Protohide Drape
+ type = "COSMETIC",
+ itemID = 190932,
+ },
+ {
+ -- Sandtails Drape
+ type = "COSMETIC",
+ itemID = 190928,
+ },
+ },
+ },
+ [61095] = {
+ -- The Undying Army
+ factionID = 2410,
+ cache = 180646,
+ rewards = {
+ {
+ -- Reins of the Colossal Slaughterclaw
+ type = "MOUNT",
+ itemID = 182081,
+ mountID = 1350,
+ },
+ {
+ -- Infested Arachnid Casing
+ type = "TOY",
+ itemID = 184495,
+ },
+ {
+ -- Micromancer's Mystical Cowl
+ type = "PET",
+ itemID = 181269,
+ },
+ },
+ },
+ [61098] = {
+ -- The Wild Hunt
+ factionID = 2465,
+ cache = 180649,
+ rewards = {
+ {
+ -- Amber Ardenmoth
+ type = "MOUNT",
+ itemID = 183800,
+ mountID = 1428,
+ },
+ {
+ -- Hungry Burrower
+ type = "PET",
+ itemID = 180635,
+ },
+ {
+ -- Mammoth Soul
+ type = "OTHER",
+ covenant = "|A:sanctumupgrades-nightfae-32x32:14:14:0:-1|a",
+ itemID = 185054,
+ questID = 63610,
+ },
+ {
+ -- Porcupine Soul
+ type = "OTHER",
+ covenant = "|A:sanctumupgrades-nightfae-32x32:14:14:0:-1|a",
+ itemID = 187870,
+ questID = 64989,
+ },
+ },
+ },
+ [64267] = {
+ -- Ve'nari
+ factionID = 2432,
+ cache = 187029,
+ rewards = {
+ {
+ -- Soulbound Gloomcharger's Reins
+ type = "MOUNT",
+ itemID = 186657,
+ mountID = 1501,
+ },
+ {
+ -- Rook
+ type = "PET",
+ itemID = 186552,
+ },
+ },
+ },
+ -- Dragonflight
+ [66156] = {
+ factionID = 2507,
+ cache = 199472,
+ },
+ [66511] = {
+ -- Iskaara Tuskarr
+ factionID = 2511,
+ cache = 199473,
+ },
+ [65606] = {
+ -- Maruuk Centaur
+ factionID = 2503,
+ cache = 199474,
+ },
+ [71023] = {
+ -- Valdrakken Accord
+ factionID = 2510,
+ cache = 199475,
+ },
+}
+
+local itemTypeLocales = {
+ ["MOUNT"] = "Mount",
+ ["PET"] = "Pet",
+ ["TOY"] = "Toy",
+ ["COSMETIC"] = "Cosmetic",
+ ["OTHER"] = "Other",
+}
+
+local ParaScanTooltip = CreateFrame("GameTooltip", "Paragon_ScanTooltip", UIParent, "GameTooltipTemplate")
+
+function Module.SetupParagonTooltip(tt)
+ if not ParaRep_Settings or not ParaRep_Settings.enable then
+ return
+ end
+
+ local _, _, rewardQuestID, hasRewardPending = C_Reputation_GetFactionParagonInfo(tt.factionID)
+ if hasRewardPending then
+ -- local factionName = GetFactionInfoByID(tt.factionID)
+ local questIndex = C_QuestLog_GetLogIndexForQuestID(rewardQuestID)
+ local description = GetQuestLogCompletionText(questIndex) or ""
+
+ _G.GameTooltip:ClearLines()
+ _G.GameTooltip:AddLine("Paragon", 1, 1, 1, true) -- Add Color Here
+ GameTooltip_AddHighlightLine(_G.GameTooltip, description)
+ GameTooltip_AddQuestRewardsToTooltip(_G.GameTooltip, rewardQuestID)
+ _G.GameTooltip:Show()
+ else
+ _G.GameTooltip:Hide()
+ end
+end
+
+do
+ local function IsPetOwned(link)
+ ParaScanTooltip:SetOwner(UIParent, "ANCHOR_NONE")
+ ParaScanTooltip:SetHyperlink(link)
+ for index = 3, 5 do
+ local text = _G[ParaScanTooltip:GetName() .. "TextLeft" .. index] and _G[ParaScanTooltip:GetName() .. "TextLeft" .. index]:GetText()
+ if text and strfind(text, "(%d)/(%d)") then
+ return true
+ end
+ end
+ return false
+ end
+
+ local function AddRewardItem(tt, rewards, index)
+ local data = rewards[index]
+
+ local item = Item:CreateFromItemID(data.itemID)
+ item:ContinueOnItemLoad(function()
+ local link = item:GetItemLink()
+ local icon = item:GetItemIcon()
+ local name = item:GetItemName()
+
+ local collected
+ if data.type == "MOUNT" then
+ collected = select(11, C_MountJournal_GetMountInfoByID(data.mountID))
+ elseif data.type == "PET" and link then
+ collected = IsPetOwned(link)
+ elseif data.type == "TOY" then
+ collected = PlayerHasToy(data.itemID)
+ elseif data.type == "COSMETIC" then
+ collected = C_TransmogCollection_PlayerHasTransmogByItemInfo(data.itemID)
+ elseif data.type == "OTHER" then
+ collected = C_QuestLog_IsQuestFlaggedCompleted(data.questID)
+ end
+
+ local qualityColor = item:GetItemQualityColor()
+ tt:AddLine(format("|A:common-icon-%s:14:14|a |T%d:0|t %s %s", collected and "checkmark" or "redx", icon, name, data.covenant or "|cffffd000(|r|cffffffff" .. itemTypeLocales[data.type] .. "|r|cffffd000)|r"), qualityColor.r, qualityColor.g, qualityColor.b)
+ if index < #rewards then
+ AddRewardItem(tt, rewards, index + 1)
+ else
+ tt:Show()
+ end
+ end)
+ end
+
+ function Module:Tooltip(bar, event)
+ if not ParaRep_Settings or not ParaRep_Settings.enable then
+ return
+ end
+
+ if not bar.questID or not paragonData[bar.questID] then
+ return
+ end
+
+ if event == "OnEnter" then
+ local cache = Item:CreateFromItemID(paragonData[bar.questID].cache)
+ cache:ContinueOnItemLoad(function()
+ local name = cache:GetItemName()
+ -- local link = cache:GetItemLink()
+ local icon = cache:GetItemIcon()
+ local qualityColor = cache:GetItemQualityColor()
+
+ _G.GameTooltip:SetOwner(bar, "ANCHOR_NONE")
+ _G.GameTooltip:SetPoint("TOPLEFT", bar, "TOPRIGHT", 10, 0)
+ _G.GameTooltip:ClearLines()
+ _G.GameTooltip:AddLine(bar.name)
+ _G.GameTooltip:AddLine(format("|T%d:0|t ", icon) .. name .. bar.count, qualityColor.r, qualityColor.g, qualityColor.b)
+ if not paragonData[bar.questID].rewards then
+ _G.GameTooltip:AddLine("None", 1, 0, 0)
+ else
+ _G.GameTooltip:AddLine(" ")
+ _G.GameTooltip:AddLine("Reward")
+ AddRewardItem(_G.GameTooltip, paragonData[bar.questID].rewards, 1)
+ end
+ end)
+ elseif event == "OnLeave" then
+ GameTooltip_SetDefaultAnchor(_G.GameTooltip, UIParent)
+ _G.GameTooltip:Hide()
+ end
+ end
+end
+
+function Module:ShowToast(name, text)
+ ACTIVE_TOAST = true
+ if ParaRep_Settings.toast.sound then
+ PlaySound(44295, "master", true)
+ end
+ Module.toast:EnableMouse(false)
+ Module.toast.title:SetText(name)
+ Module.toast.title:SetAlpha(0)
+ Module.toast.description:SetText(text)
+ Module.toast.description:SetAlpha(0)
+ UIFrameFadeIn(Module.toast, 0.5, 0, 1)
+
+ C_Timer.After(0.5, function()
+ UIFrameFadeIn(Module.toast.title, 0.5, 0, 1)
+ end)
+
+ C_Timer.After(0.75, function()
+ UIFrameFadeIn(Module.toast.description, 0.5, 0, 1)
+ end)
+
+ print(self.toast.description)
+
+ C_Timer.After(ParaRep_Settings.toast.fade_time, function()
+ UIFrameFadeOut(Module.toast, 1, 1, 0)
+ end)
+
+ C_Timer.After(ParaRep_Settings.toast.fade_time + 1.25, function()
+ Module.toast:Hide()
+ ACTIVE_TOAST = false
+ if #WAITING_TOAST > 0 then
+ Module:WaitToast()
+ end
+ end)
+end
+
+function Module:WaitToast()
+ local name, text = unpack(WAITING_TOAST[1])
+ tremove(WAITING_TOAST, 1)
+ Module:ShowToast(name, text)
+end
+
+function Module:CreateToast()
+ local toast = CreateFrame("FRAME", "ParagonReputation_Toast", UIParent, "BackdropTemplate")
+ toast:SetPoint("BOTTOM", UIParent, "BOTTOM", 0, 250)
+ toast:SetSize(302, 70)
+ toast:SetClampedToScreen(true)
+ toast:Hide()
+
+ -- [Toast] Create Background Texture
+ toast:CreateBorder()
+
+ -- [Toast] Create Title Text
+ toast.title = toast:CreateFontString(nil, "ARTWORK", "GameFontNormalLarge")
+ toast.title:SetPoint("TOPLEFT", toast, "TOPLEFT", 23, -10)
+ toast.title:SetWidth(260)
+ toast.title:SetHeight(16)
+ toast.title:SetJustifyV("TOP")
+ toast.title:SetJustifyH("LEFT")
+
+ -- [Toast] Create Description Text
+ toast.description = toast:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
+ toast.description:SetPoint("TOPLEFT", toast.title, "TOPLEFT", 1, -23)
+ toast.description:SetWidth(258)
+ toast.description:SetHeight(32)
+ toast.description:SetJustifyV("TOP")
+ toast.description:SetJustifyH("LEFT")
+
+ Module.toast = toast
+end
+
+function Module:QUEST_ACCEPTED(_, questID)
+ if ParaRep_Settings.toast.enable and paragonData[questID] then
+ local name = GetFactionInfoByID(paragonData[questID].factionID)
+ local text = GetQuestLogCompletionText(C_QuestLog_GetLogIndexForQuestID(questID))
+ if ACTIVE_TOAST then
+ WAITING_TOAST[#WAITING_TOAST + 1] = { name, text } --Toast is already active, put this info on the line.
+ else
+ self:ShowToast(name, text)
+ end
+ end
+end
+
+function Module:CreateBarOverlay(factionBar)
+ if factionBar.ParagonOverlay then
+ return
+ end
+
+ local overlay = CreateFrame("FRAME", nil, factionBar)
+ overlay:SetAllPoints(factionBar)
+ overlay:SetFrameLevel(factionBar:GetFrameLevel())
+
+ overlay.bar = overlay:CreateTexture(nil, "ARTWORK", nil, -1)
+ overlay.bar:SetTexture(K.GetTexture(C["General"].Texture))
+ overlay.bar:SetPoint("TOP", overlay)
+ overlay.bar:SetPoint("BOTTOM", overlay)
+ overlay.bar:SetPoint("LEFT", overlay)
+
+ overlay.edge = overlay:CreateTexture(nil, "ARTWORK", nil, -1)
+ overlay.edge:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark")
+ overlay.edge:SetPoint("CENTER", overlay.bar, "RIGHT")
+ overlay.edge:SetBlendMode("ADD")
+ overlay.edge:SetSize(38, 38) -- Arbitrary value, I hope there isn't an AddOn that skins the bar and the glow doesnt look right with this size.
+
+ factionBar.ParagonOverlay = overlay
+end
+
+function Module.ChangeReputationBars(factionRow)
+ if not ParaRep_Settings.enable then
+ return
+ end
+
+ factionRow.Container.Paragon:Hide()
+ if not factionRow.__isHooked then
+ factionRow:HookScript("OnEnter", function()
+ Module:Tooltip(factionRow, "OnEnter")
+ end)
+
+ factionRow:HookScript("OnLeave", function()
+ Module:Tooltip(factionRow, "OnLeave")
+ end)
+
+ factionRow.__isHooked = true
+ end
+
+ if factionRow.factionID and C_Reputation_IsFactionParagon(factionRow.factionID) then
+ local currentValue, threshold, rewardQuestID, hasRewardPending = C_Reputation_GetFactionParagonInfo(factionRow.factionID)
+ factionRow.name = factionRow.Container.Name:GetText()
+ factionRow.count = " |cffffffffx" .. floor(currentValue / threshold) - (hasRewardPending and 1 or 0) .. "|r"
+ factionRow.questID = rewardQuestID
+
+ local r, g, b = ParaRep_Settings.color.r, ParaRep_Settings.color.g, ParaRep_Settings.color.b
+ local value = mod(currentValue, threshold)
+ if hasRewardPending then
+ factionRow.Container.Paragon.factionID = factionRow.factionID
+ factionRow.Container.Paragon:SetPoint("RIGHT", factionRow)
+ factionRow.Container.Paragon.Glow:SetShown(true)
+ factionRow.Container.Paragon.Check:SetShown(true)
+ factionRow.Container.Paragon:Show()
+
+ local over = max(value, 1) / threshold
+ if not factionRow.Container.ReputationBar.ParagonOverlay then
+ Module:CreateBarOverlay(factionRow.Container.ReputationBar)
+ end
+
+ factionRow.Container.ReputationBar.ParagonOverlay:Show()
+ factionRow.Container.ReputationBar.ParagonOverlay.bar:SetWidth(factionRow.Container.ReputationBar.ParagonOverlay:GetWidth() * over)
+ factionRow.Container.ReputationBar.ParagonOverlay.bar:SetVertexColor(r + 0.15, g + 0.15, b + 0.15)
+ factionRow.Container.ReputationBar.ParagonOverlay.edge:SetVertexColor(r + 0.2, g + 0.2, b + 0.2, (over > 0.05 and 0.75) or 0)
+
+ value = value + threshold
+ else
+ if factionRow.Container.ReputationBar.ParagonOverlay then
+ factionRow.Container.ReputationBar.ParagonOverlay:Hide()
+ end
+ end
+
+ factionRow.Container.ReputationBar:SetMinMaxValues(0, threshold)
+ factionRow.Container.ReputationBar:SetValue(value)
+ factionRow.Container.ReputationBar:SetStatusBarColor(r, g, b)
+ factionRow.rolloverText = HIGHLIGHT_FONT_COLOR_CODE .. " " .. format(REPUTATION_PROGRESS_FORMAT, BreakUpLargeNumbers(value), BreakUpLargeNumbers(threshold)) .. FONT_COLOR_CODE_CLOSE
+
+ local count = floor(currentValue / threshold)
+ if hasRewardPending then
+ count = count - 1
+ end
+
+ if ParaRep_Settings.text == "PARAGON" then
+ factionRow.Container.ReputationBar.FactionStanding:SetText("Paragon")
+ factionRow.standingText = "Paragon"
+ elseif ParaRep_Settings.text == "CURRENT" then
+ factionRow.Container.ReputationBar.FactionStanding:SetText(BreakUpLargeNumbers(value))
+ factionRow.standingText = BreakUpLargeNumbers(value)
+ elseif ParaRep_Settings.text == "PARAGONPLUS" then
+ if count > 0 then
+ factionRow.Container.ReputationBar.FactionStanding:SetText("Paragon" .. " x " .. count)
+ factionRow.standingText = ("Paragon" .. " x " .. count)
+ else
+ factionRow.Container.ReputationBar.FactionStanding:SetText("Paragon" .. " + ")
+ factionRow.standingText = ("Paragon" .. " + ")
+ end
+ elseif ParaRep_Settings.text == "VALUE" then
+ factionRow.Container.ReputationBar.FactionStanding:SetText(" " .. BreakUpLargeNumbers(value) .. " / " .. BreakUpLargeNumbers(threshold))
+ factionRow.standingText = (" " .. BreakUpLargeNumbers(value) .. " / " .. BreakUpLargeNumbers(threshold))
+ factionRow.rolloverText = nil
+ elseif ParaRep_Settings.text == "DEFICIT" then
+ if hasRewardPending then
+ value = value - threshold
+ factionRow.Container.ReputationBar.FactionStanding:SetText("+" .. BreakUpLargeNumbers(value))
+ factionRow.standingText = "+" .. BreakUpLargeNumbers(value)
+ else
+ value = threshold - value
+ factionRow.Container.ReputationBar.FactionStanding:SetText(BreakUpLargeNumbers(value))
+ factionRow.standingText = BreakUpLargeNumbers(value)
+ end
+ factionRow.rolloverText = nil
+ end
+
+ if factionRow:GetOrderIndex() == GetSelectedFaction() and _G.ReputationDetailFrame:IsShown() then
+ if count > 0 then
+ _G.ReputationDetailFactionName:SetText(factionRow.name .. " |cffffffffx" .. count .. "|r")
+ end
+ end
+ else
+ factionRow.name = nil
+ factionRow.count = nil
+ factionRow.questID = nil
+ if factionRow.Container.ReputationBar.ParagonOverlay then
+ factionRow.Container.ReputationBar.ParagonOverlay:Hide()
+ end
+ end
+end
+
+function Module:CreateParagonRep()
+ if not ParaRep_Settings.enable then
+ return
+ end
+
+ K:RegisterEvent("QUEST_ACCEPTED", Module.QUEST_ACCEPTED)
+ hooksecurefunc("ReputationParagonFrame_SetupParagonTooltip", Module.SetupParagonTooltip)
+ hooksecurefunc("ReputationFrame_InitReputationRow", Module.ChangeReputationBars)
+ Module:CreateToast()
+
+ K.Mover(Module.toast, "ParagonRepToastMover", "Paragon Reputation Toast", { "BOTTOM", UIParent, "BOTTOM", 0, 250 })
+end
+
+Module:RegisterMisc("ParagonRep", Module.CreateParagonRep)
diff --git a/KkthnxUI/Modules/Miscellaneous/Elements/QuestTool.lua b/KkthnxUI/Modules/Miscellaneous/Elements/QuestTool.lua
index 5342916c..b9205983 100644
--- a/KkthnxUI/Modules/Miscellaneous/Elements/QuestTool.lua
+++ b/KkthnxUI/Modules/Miscellaneous/Elements/QuestTool.lua
@@ -57,9 +57,9 @@ function Module:QuestTool_SetGlow(msg)
local _, spellID = GetActionInfo(button.action)
local name = spellID and GetSpellInfo(spellID)
if fixedStrings[name] and isActionMatch(msg, fixedStrings[name]) or isActionMatch(msg, name) then
- K.LibCustomGlow.ButtonGlow_Start(button)
+ K.ShowOverlayGlow(button)
else
- K.LibCustomGlow.ButtonGlow_Stop(button)
+ K.HideOverlayGlow(button)
end
end
Module.isGlowing = true
@@ -72,7 +72,7 @@ function Module:QuestTool_ClearGlow()
if Module.isGlowing then
Module.isGlowing = nil
for i = 1, 3 do
- K.LibCustomGlow.ButtonGlow_Stop(_G["ActionButton" .. i])
+ K.HideOverlayGlow(_G["ActionButton" .. i])
end
end
end
diff --git a/KkthnxUI/Modules/Miscellaneous/Elements/QuickJoin.lua b/KkthnxUI/Modules/Miscellaneous/Elements/QuickJoin.lua
index f15796d3..ef0db43b 100644
--- a/KkthnxUI/Modules/Miscellaneous/Elements/QuickJoin.lua
+++ b/KkthnxUI/Modules/Miscellaneous/Elements/QuickJoin.lua
@@ -55,11 +55,8 @@ local roleOrder = {
["HEALER"] = 2,
["DAMAGER"] = 3,
}
-local roleTexes = {
- "Interface\\AddOns\\KkthnxUI\\Media\\Chat\\Roles\\Tank",
- "Interface\\AddOns\\KkthnxUI\\Media\\Chat\\Roles\\Healer",
- "Interface\\AddOns\\KkthnxUI\\Media\\Chat\\Roles\\Damage",
-}
+
+local indexToRole = { "TANK", "HEALER", "DAMAGER" }
local function sortRoleOrder(a, b)
if a and b then
@@ -161,7 +158,8 @@ function Module:ReplaceGroupRoles(numPlayers, _, disabled)
if roleInfo then
local icon = self.Icons[iconIndex]
icon:SetAtlas(LFG_LIST_GROUP_DATA_ATLASES[roleInfo[2]])
- icon.role:SetTexture(roleTexes[roleInfo[1]])
+ icon.role:SetSize(14, 14)
+ K.ReskinSmallRole(icon.role, indexToRole[roleInfo[1]])
icon.leader:SetShown(roleInfo[3])
iconIndex = iconIndex - 1
end
@@ -180,23 +178,9 @@ function Module:AddAutoAcceptButton()
K.CreateFontString(bu, 13, _G.LFG_LIST_AUTO_ACCEPT, "", "system", "LEFT", 24, 0)
local lastTime = 0
- -- local function clickInviteButton(button)
- -- if button.applicantID and button.InviteButton:IsEnabled() then
- -- button.InviteButton:Click()
- -- end
- -- end
-
local function clickInviteButton(button)
if button.applicantID and button.InviteButton:IsEnabled() then
- local inviteButton = button.InviteButton
-
- if inviteButton:IsProtected() then
- -- Use the secure method to click the button
- SecureActionButton_OnClick(inviteButton)
- else
- -- Fallback for non-secure buttons
- inviteButton:Click()
- end
+ button.InviteButton:Click()
end
end
@@ -291,100 +275,6 @@ function Module:ReplaceFindGroupButton()
end)
end
-function Module:AddDungeonsFilter()
- local mapData = {
- [0] = { aID = 1247, mapID = 463 }, -- 永恒黎明:迦拉克隆的陨落
- [1] = { aID = 1248, mapID = 464 }, -- 永恒黎明:姆诺兹多的崛起
- [2] = { aID = 530, mapID = 248 }, -- 维克雷斯庄园
- [3] = { aID = 502, mapID = 244 }, -- 阿塔达萨
- [4] = { aID = 460, mapID = 198 }, -- 黑心林地
- [5] = { aID = 463, mapID = 199 }, -- 黑鸦堡垒
- [6] = { aID = 184, mapID = 168 }, -- 永茂林地
- [7] = { aID = 1274, mapID = 456 }, -- 潮汐王座
- }
-
- local function GetDungeonNameByID(mapID)
- local name = C_ChallengeMode_GetMapUIInfo(mapID)
- name = gsub(name, ".-" .. HEADER_COLON, "") -- abbr Tazavesh
- return name
- end
-
- local allOn
- local filterIDs = {}
-
- local function toggleAll()
- allOn = not allOn
- for i = 0, 7 do
- mapData[i].isOn = allOn
- filterIDs[mapData[i].aID] = allOn
- end
- UIDropDownMenu_Refresh(B.EasyMenu)
- LFGListSearchPanel_DoSearch(searchPanel)
- end
-
- local menuList = {
- [1] = { text = SPECIFIC_DUNGEONS, isTitle = true, notCheckable = true },
- [2] = { text = SWITCH, notCheckable = true, keepShownOnClick = true, func = toggleAll },
- }
-
- local function onClick(self, index, aID)
- allOn = true
- mapData[index].isOn = not mapData[index].isOn
- filterIDs[aID] = mapData[index].isOn
- LFGListSearchPanel_DoSearch(searchPanel)
- end
-
- local function onCheck(self)
- return mapData[self.arg1].isOn
- end
-
- for i = 0, 7 do
- local value = mapData[i]
- menuList[i + 3] = {
- text = GetDungeonNameByID(value.mapID),
- arg1 = i,
- arg2 = value.aID,
- func = onClick,
- checked = onCheck,
- keepShownOnClick = true,
- }
- filterIDs[value.aID] = false
- end
-
- searchPanel.RefreshButton:HookScript("OnMouseDown", function(self, btn)
- if btn ~= "RightButton" then
- return
- end
- EasyMenu(menuList, K.EasyMenu, self, 25, 50, "MENU")
- end)
-
- searchPanel.RefreshButton:HookScript("OnEnter", function()
- GameTooltip:AddLine(K.RightButton .. _G.SPECIFIC_DUNGEONS)
- GameTooltip:Show()
- end)
-
- hooksecurefunc("LFGListUtil_SortSearchResults", function(results)
- if categorySelection.selectedCategory ~= 2 then
- return
- end
- if not allOn then
- return
- end
-
- for i = #results, 1, -1 do
- local resultID = results[i]
- local searchResultInfo = C_LFGList_GetSearchResultInfo(resultID)
- local aID = searchResultInfo and searchResultInfo.activityID
- if aID and not filterIDs[aID] then
- tremove(results, i)
- end
- end
- searchPanel.totalResults = #results
-
- return true
- end)
-end
-
local function clickSortButton(self)
self.__owner.Sorting.Expression:SetText(self.sortStr)
self.__parent.RefreshButton:Click()
@@ -497,8 +387,8 @@ function Module:QuickJoin()
Module:AddAutoAcceptButton()
Module:ReplaceFindGroupButton()
- Module:AddDungeonsFilter()
Module:AddPGFSortingExpression()
Module:FixListingTaint()
end
+
Module:RegisterMisc("QuickJoin", Module.QuickJoin)
diff --git a/KkthnxUI/Modules/Miscellaneous/Elements/RaidTool.lua b/KkthnxUI/Modules/Miscellaneous/Elements/RaidTool.lua
index 76280785..78e890a5 100644
--- a/KkthnxUI/Modules/Miscellaneous/Elements/RaidTool.lua
+++ b/KkthnxUI/Modules/Miscellaneous/Elements/RaidTool.lua
@@ -99,21 +99,15 @@ function Module:GetRaidMaxGroup()
end
function Module:RaidTool_RoleCount(parent)
- local roleTexCoord = {
- { 0.5, 0.75, 0, 1 },
- { 0.75, 1, 0, 1 },
- { 0.25, 0.5, 0, 1 },
- }
-
+ local roleIndex = { "TANK", "HEALER", "DAMAGER" }
local frame = CreateFrame("Frame", nil, parent)
frame:SetAllPoints()
local role = {}
for i = 1, 3 do
role[i] = frame:CreateTexture(nil, "OVERLAY")
role[i]:SetPoint("LEFT", 36 * i - 27, 0)
- role[i]:SetSize(12, 12)
- role[i]:SetTexture("Interface\\LFGFrame\\LFGROLE")
- role[i]:SetTexCoord(unpack(roleTexCoord[i]))
+ role[i]:SetSize(14, 14)
+ K.ReskinSmallRole(role[i], roleIndex[i])
role[i].text = K.CreateFontString(frame, 13, "0", "")
role[i].text:ClearAllPoints()
role[i].text:SetPoint("CENTER", role[i], "RIGHT", 12, 0)
@@ -576,6 +570,10 @@ function Module:RaidTool_CreateMenu(parent)
end
function Module:RaidTool_EasyMarker()
+ if not C["Misc"].EasyMarking then
+ return
+ end
+
local menuList = {}
local function GetMenuTitle(color, text)
diff --git a/KkthnxUI/Modules/Miscellaneous/Elements/SlotItemLevel.lua b/KkthnxUI/Modules/Miscellaneous/Elements/SlotItemLevel.lua
index b011082a..6d86d339 100644
--- a/KkthnxUI/Modules/Miscellaneous/Elements/SlotItemLevel.lua
+++ b/KkthnxUI/Modules/Miscellaneous/Elements/SlotItemLevel.lua
@@ -99,7 +99,6 @@ function Module:CreateItemString(frame, strType)
slotFrame.enchantText = K.CreateFontString(slotFrame, 11)
slotFrame.enchantText:ClearAllPoints()
slotFrame.enchantText:SetPoint(relF, slotFrame, x, y)
- slotFrame.enchantText:SetTextColor(0, 1, 0)
slotFrame.enchantText:SetJustifyH(strsub(relF, 7))
slotFrame.enchantText:SetWidth(120)
slotFrame.enchantText:EnableMouse(true)
@@ -175,28 +174,38 @@ function Module:ItemLevel_UpdateTraits(button, id, link)
end
end
-local function CanEnchantSlot(unit, slot)
- -- all classes have something that increases power or survivability on chest/cloak/weapons/rings/wrist/boots/legs
- if slot == 5 or slot == 11 or slot == 12 or slot == 15 or slot == 16 or slot == 8 or slot == 9 or slot == 7 or slot == 6 then
+-- Define slots where enchantments are typically applied
+local enchantableSlots = {
+ [5] = true, -- Chest
+ [11] = true, -- Cloak
+ [12] = true, -- Weapon
+ [15] = true, -- Rings
+ [16] = true, -- Trinkets
+ [8] = true, -- Gloves
+ [9] = true, -- Wrist
+ [7] = true, -- Legs
+ [6] = true, -- Feet
+}
+
+function Module:CanEnchantSlot(unit, slot)
+ -- Check if the slot is in the list of enchantable slots
+ if enchantableSlots[slot] then
return true
end
- -- Offhand filtering smile :)
+ -- Special case for off-hand slot
if slot == 17 then
local offHandItemLink = GetInventoryItemLink(unit, slot)
if offHandItemLink then
local itemEquipLoc = select(4, GetItemInfoInstant(offHandItemLink))
+ -- Off-hand items that are not holdable or shields can typically be enchanted
return itemEquipLoc ~= "INVTYPE_HOLDABLE" and itemEquipLoc ~= "INVTYPE_SHIELD"
end
- return false
end
return false
end
--- Add a new configuration option in your addon settings
-local showNoEnchant = true -- Default to true, meaning the "No Enchant" feature is enabled
-
function Module:ItemLevel_UpdateInfo(slotFrame, info, quality)
local infoType = type(info)
local level
@@ -217,16 +226,9 @@ function Module:ItemLevel_UpdateInfo(slotFrame, info, quality)
if enchant then
slotFrame.enchantText:SetText(enchant)
slotFrame.enchantText:SetTextColor(0, 1, 0) -- Set text color to green for normal enchant
- elseif showNoEnchant then -- Check if the "No Enchant" feature is enabled
- -- Check if the slot can be enchanted
- if CanEnchantSlot("player", slotFrame:GetID()) then
- slotFrame.enchantText:SetText("No Enchant")
- slotFrame.enchantText:SetTextColor(1, 0, 0) -- Set text color to red for missing enchant
- else
- slotFrame.enchantText:SetText("")
- end
- else
- slotFrame.enchantText:SetText("") -- Clear the enchant text if the feature is disabled
+ elseif Module:CanEnchantSlot("player", slotFrame:GetID()) then
+ slotFrame.enchantText:SetText(NO .. " " .. ENSCRIBE)
+ slotFrame.enchantText:SetTextColor(1, 0, 0) -- Set text color to red for missing enchant
end
local gemStep, essenceStep = 1, 1
@@ -317,10 +319,90 @@ function Module:ItemLevel_UpdatePlayer()
Module:ItemLevel_SetupLevel(CharacterFrame, "Character", "player")
end
+local function CalculateAverageItemLevel(unit, fontstring)
+ if not fontstring then
+ return
+ end
+
+ fontstring:Hide()
+ -- Create a table to store item objects
+ local items = {}
+
+ -- Initialize variables for equipment locations
+ local mainhandEquipLoc, offhandEquipLoc
+
+ -- Iterate through equipped slots
+ for slot = INVSLOT_FIRST_EQUIPPED, INVSLOT_LAST_EQUIPPED do
+ -- Exclude shirt and tabard slots
+ if slot ~= INVSLOT_BODY and slot ~= INVSLOT_TABARD then
+ -- Retrieve item ID and item link for the slot
+ local itemID = GetInventoryItemID(unit, slot)
+ local itemLink = GetInventoryItemLink(unit, slot)
+
+ -- Check if item ID or item link is valid
+ if itemLink or itemID then
+ -- Create an item object based on item link or ID
+ local item = itemLink and Item:CreateFromItemLink(itemLink) or Item:CreateFromItemID(itemID)
+
+ -- Add item to the table
+ table.insert(items, item)
+
+ -- Update mainhand and offhand equipment locations
+ local equipLoc = select(4, GetItemInfoInstant(itemLink or itemID))
+ if slot == INVSLOT_MAINHAND then
+ mainhandEquipLoc = equipLoc
+ elseif slot == INVSLOT_OFFHAND then
+ offhandEquipLoc = equipLoc
+ end
+ end
+ end
+ end
+
+ -- Determine the number of equipment slots
+ local numSlots = mainhandEquipLoc and offhandEquipLoc and 16 or 15
+
+ -- Adjust number of slots for Fury Warriors
+ if select(2, UnitClass(unit)) == "WARRIOR" then
+ local isFuryWarrior
+ if unit == "player" then
+ isFuryWarrior = IsSpellKnown(46917) -- Titan's Grip
+ else
+ isFuryWarrior = _G.GetInspectSpecialization and GetInspectSpecialization(unit) == 72 -- Fury specialization ID
+ end
+
+ -- Adjust number of slots if the unit is a Fury Warrior
+ if isFuryWarrior then
+ numSlots = 16
+ end
+ end
+
+ -- Calculate total item level
+ local totalLevel = 0
+ for _, item in ipairs(items) do
+ -- Check if the item has a valid item level
+ local itemLevel = item:GetCurrentItemLevel()
+ if itemLevel then
+ -- Increment total item level
+ totalLevel = totalLevel + itemLevel
+ end
+ end
+
+ fontstring:SetFormattedText(ITEM_LEVEL, totalLevel / numSlots)
+ fontstring:Show()
+end
+
+-- Update the inspect frame with item level and average item level
function Module:ItemLevel_UpdateInspect(...)
local guid = ...
if InspectFrame and InspectFrame.unit and UnitGUID(InspectFrame.unit) == guid then
Module:ItemLevel_SetupLevel(InspectFrame, "Inspect", InspectFrame.unit)
+
+ -- Display the average item level text on the inspect frame
+ if not InspectFrame.AvgItemLevelText then
+ InspectFrame.AvgItemLevelText = K.CreateFontString(InspectModelFrame, 12, "", "OUTLINE", false, "BOTTOM", 0, 46)
+ end
+ CalculateAverageItemLevel(InspectFrame.unit or "target", InspectFrame.AvgItemLevelText)
+ InspectModelFrameControlFrame:HookScript("OnShow", InspectModelFrameControlFrame.Hide)
end
end
@@ -442,9 +524,13 @@ function Module.ItemLevel_UpdateTradeTarget(index)
end
local itemCache = {}
-local CHAT = K:GetModule("Chat")
+local chatModule = K:GetModule("Chat")
function Module.ItemLevel_ReplaceItemLink(link, name)
+ if not chatModule then
+ return
+ end
+
if not link then
return
end
@@ -453,7 +539,7 @@ function Module.ItemLevel_ReplaceItemLink(link, name)
if not modLink then
local itemLevel = K.GetItemLevel(link)
if itemLevel then
- modLink = gsub(link, "|h%[(.-)%]|h", "|h(" .. itemLevel .. CHAT.IsItemHasGem(link) .. ")" .. name .. "|h")
+ modLink = gsub(link, "|h%[(.-)%]|h", "|h(" .. itemLevel .. chatModule.IsItemHasGem(link) .. ")" .. name .. "|h")
itemCache[link] = modLink
end
end
@@ -488,6 +574,69 @@ function Module:ItemLevel_UpdateLoot()
end
end
+local NUM_SLOTS_PER_GUILDBANK_GROUP = 14
+local PET_CAGE = 82800
+
+function Module.ItemLevel_GuildBankShow(event, addon)
+ if addon == "Blizzard_GuildBankUI" then
+ hooksecurefunc(_G.GuildBankFrame, "Update", function(self)
+ if self.mode == "bank" then
+ local tab = GetCurrentGuildBankTab()
+ local button, index, column
+ for i = 1, #self.Columns * NUM_SLOTS_PER_GUILDBANK_GROUP do
+ index = mod(i, NUM_SLOTS_PER_GUILDBANK_GROUP)
+ if index == 0 then
+ index = NUM_SLOTS_PER_GUILDBANK_GROUP
+ end
+ column = ceil((i - 0.5) / NUM_SLOTS_PER_GUILDBANK_GROUP)
+ button = self.Columns[column].Buttons[index]
+
+ if button and button:IsShown() then
+ local link = GetGuildBankItemLink(tab, i)
+ if link then
+ if not button.iLvl then
+ button.iLvl = K.CreateFontString(button, 12, "", "OUTLINE", false, "BOTTOMLEFT", 2, 2)
+ end
+
+ local level, quality
+ local itemID = tonumber(strmatch(link, "Hitem:(%d+):"))
+
+ if itemID == PET_CAGE then
+ local data = C_TooltipInfo.GetGuildBankItem(tab, i)
+ if data then
+ local speciesID, petLevel, breedQuality = data.battlePetSpeciesID, data.battlePetLevel, data.battlePetBreedQuality
+ if speciesID and speciesID > 0 then
+ level, quality = petLevel, breedQuality
+ end
+ end
+ else
+ level = K.GetItemLevel(link)
+ quality = select(3, GetItemInfo(link))
+ end
+
+ if level and quality then
+ local color = K.QualityColors[quality]
+ button.iLvl:SetText(level)
+ button.iLvl:SetTextColor(color.r, color.g, color.b)
+
+ if button.KKUI_Border and itemID == PET_CAGE then
+ button.KKUI_Border:SetVertexColor(color.r, color.g, color.b)
+ end
+ else
+ button.iLvl:SetText("")
+ end
+ elseif button.iLvl then
+ button.iLvl:SetText("") -- Clear the FontString if the slot is empty
+ end
+ end
+ end
+ end
+ end)
+
+ K:UnregisterEvent(event, Module.ItemLevel_GuildBankShow)
+ end
+end
+
function Module:CreateSlotItemLevel()
if not C["Misc"].ItemLevel then
return
@@ -524,6 +673,9 @@ function Module:CreateSlotItemLevel()
-- iLvl on LootFrame
hooksecurefunc(LootFrame.ScrollBox, "Update", Module.ItemLevel_UpdateLoot)
+
+ -- iLvl on GuildBankFrame
+ K:RegisterEvent("ADDON_LOADED", Module.ItemLevel_GuildBankShow)
end
Module:RegisterMisc("GearInfo", Module.CreateSlotItemLevel)
diff --git a/KkthnxUI/Modules/Miscellaneous/Elements/TradeTabs.lua b/KkthnxUI/Modules/Miscellaneous/Elements/TradeTabs.lua
index 3530e845..a2f5766a 100644
--- a/KkthnxUI/Modules/Miscellaneous/Elements/TradeTabs.lua
+++ b/KkthnxUI/Modules/Miscellaneous/Elements/TradeTabs.lua
@@ -1,50 +1,33 @@
local K, C = KkthnxUI[1], KkthnxUI[2]
local Module = K:GetModule("Miscellaneous")
--- Basic Lua functions
-local pairs = pairs
-local tinsert = tinsert
-local select = select
-
--- Spell related functions
-local GetSpellCooldown = GetSpellCooldown
-local GetSpellInfo = GetSpellInfo
-local IsPassiveSpell = IsPassiveSpell
-local IsCurrentSpell = IsCurrentSpell
-local IsPlayerSpell = IsPlayerSpell
-local GetSpellBookItemInfo = GetSpellBookItemInfo
-
--- Item related functions
-local GetItemCooldown = GetItemCooldown
-local GetItemCount = GetItemCount
-local GetItemInfo = GetItemInfo
-local UseItemByName = UseItemByName
-local PlayerHasToy = PlayerHasToy
-
--- Toy Box functions
-local C_ToyBox_IsToyUsable = C_ToyBox.IsToyUsable
-local C_ToyBox_GetToyInfo = C_ToyBox.GetToyInfo
-
--- Trade Skill UI functions
-local C_TradeSkillUI_GetOnlyShowSkillUpRecipes = C_TradeSkillUI.GetOnlyShowSkillUpRecipes
-local C_TradeSkillUI_SetOnlyShowSkillUpRecipes = C_TradeSkillUI.SetOnlyShowSkillUpRecipes
-local C_TradeSkillUI_GetOnlyShowMakeableRecipes = C_TradeSkillUI.GetOnlyShowMakeableRecipes
-local C_TradeSkillUI_SetOnlyShowMakeableRecipes = C_TradeSkillUI.SetOnlyShowMakeableRecipes
+-- General Lua functions
+local pairs, tinsert, select = pairs, tinsert, select
+
+-- WoW API functions related to spells and items
+local GetSpellCooldown, GetSpellInfo, GetItemCooldown, GetItemCount, GetItemInfo = GetSpellCooldown, GetSpellInfo, GetItemCooldown, GetItemCount, GetItemInfo
+local IsPassiveSpell, IsCurrentSpell, IsPlayerSpell = IsPassiveSpell, IsCurrentSpell, IsPlayerSpell
+
+-- WoW API functions related to professions and trade skills
+local GetProfessions, GetProfessionInfo, GetSpellBookItemInfo = GetProfessions, GetProfessionInfo, GetSpellBookItemInfo
+local PlayerHasToy, C_ToyBox_IsToyUsable, C_ToyBox_GetToyInfo = PlayerHasToy, C_ToyBox.IsToyUsable, C_ToyBox.GetToyInfo
+local C_TradeSkillUI_GetOnlyShowSkillUpRecipes, C_TradeSkillUI_SetOnlyShowSkillUpRecipes = C_TradeSkillUI.GetOnlyShowSkillUpRecipes, C_TradeSkillUI.SetOnlyShowSkillUpRecipes
+local C_TradeSkillUI_GetOnlyShowMakeableRecipes, C_TradeSkillUI_SetOnlyShowMakeableRecipes = C_TradeSkillUI.GetOnlyShowMakeableRecipes, C_TradeSkillUI.SetOnlyShowMakeableRecipes
local BOOKTYPE_PROFESSION = BOOKTYPE_PROFESSION
local RUNEFORGING_ID = 53428
local PICK_LOCK = 1804
local CHEF_HAT = 134020
local THERMAL_ANVIL = 87216
-local ENCHANTING_VELLUM = 38682
local tabList = {}
local onlyPrimary = {
[171] = true, -- Alchemy
- [202] = true, -- Engineering
[182] = true, -- Herbalism
- [393] = true, -- Skinning
+ [186] = true, -- Mining
+ [202] = true, -- Engineering
[356] = true, -- Fishing
+ [393] = true, -- Skinning
}
function Module:UpdateProfessions()
@@ -107,6 +90,7 @@ function Module:TradeTabs_Update()
else
start, duration = GetSpellCooldown(spellID)
end
+
if start and duration and duration > 1.5 then
tab.CD:SetCooldown(start, duration)
end
@@ -123,9 +107,10 @@ function Module:TradeTabs_Create(spellID, toyID, itemID)
else
name, _, texture = GetSpellInfo(spellID)
end
- if not name then
+
+ if not name then -- precaution
return
- end -- precaution
+ end
local tab = CreateFrame("CheckButton", nil, ProfessionsFrame, "SpellBookSkillLineTabTemplate, SecureActionButtonTemplate")
tab.tooltip = name
@@ -151,7 +136,7 @@ function Module:TradeTabs_Create(spellID, toyID, itemID)
tab.cover:SetAllPoints()
tab.cover:EnableMouse(true)
- tab:SetPoint("TOPLEFT", ProfessionsFrame, "TOPRIGHT", 3, -index * 42)
+ tab:SetPoint("TOPLEFT", ProfessionsFrame, "TOPRIGHT", 2, -index * 50)
tinsert(tabList, tab)
index = index + 1
end
@@ -166,7 +151,7 @@ function Module:TradeTabs_FilterIcons()
local value = self.__value
if value[3]() then
value[4](false)
- self.KKUI_Border:SetVertexColor(1, 1, 1)
+ K.SetBorderColor(self.KKUI_Border)
else
value[4](true)
self.KKUI_Border:SetVertexColor(1, 0.8, 0)
@@ -175,9 +160,9 @@ function Module:TradeTabs_FilterIcons()
local buttons = {}
for index, value in pairs(buttonList) do
- local bu = CreateFrame("Button", nil, ProfessionsFrame.CraftingPage, "BackdropTemplate")
+ local bu = CreateFrame("Button", nil, ProfessionsFrame.CraftingPage.RecipeList, "BackdropTemplate")
bu:SetSize(22, 22)
- bu:SetPoint("BOTTOMRIGHT", ProfessionsFrame.CraftingPage.RecipeList.FilterButton, "TOPRIGHT", -(index - 1) * 27, 10)
+ bu:SetPoint("BOTTOMRIGHT", ProfessionsFrame.CraftingPage.RecipeList.FilterButton, "TOPRIGHT", -(index - 1) * 28, 10)
bu:CreateBorder()
bu.Icon = bu:CreateTexture(nil, "ARTWORK")
local atlas = string.match(value[1], "Atlas:(.+)$")
@@ -186,7 +171,8 @@ function Module:TradeTabs_FilterIcons()
else
bu.Icon:SetTexture(value[1])
end
- bu.Icon:SetAllPoints()
+ bu.Icon:SetPoint("TOPLEFT", bu, "TOPLEFT", 2, -2)
+ bu.Icon:SetPoint("BOTTOMRIGHT", bu, "BOTTOMRIGHT", -2, 2)
bu.Icon:SetTexCoord(K.TexCoords[1], K.TexCoords[2], K.TexCoords[3], K.TexCoords[4])
K.AddTooltip(bu, "ANCHOR_TOP", value[2])
bu.__value = value
@@ -200,7 +186,7 @@ function Module:TradeTabs_FilterIcons()
if value[3]() then
buttons[index].KKUI_Border:SetVertexColor(1, 0.8, 0)
else
- buttons[index].KKUI_Border:SetVertexColor(1, 1, 1)
+ K.SetBorderColor(buttons[index].KKUI_Border)
end
end
end
@@ -219,41 +205,15 @@ function Module:TradeTabs_OnLoad()
K:RegisterEvent("CURRENT_SPELL_CAST_CHANGED", Module.TradeTabs_Update)
Module:TradeTabs_FilterIcons()
- Module:TradeTabs_QuickEnchanting()
K:UnregisterEvent("PLAYER_REGEN_ENABLED", Module.TradeTabs_OnLoad)
end
-local isEnchanting
-local tooltipString = "|cffffffff%s(%d)"
-function Module:TradeTabs_QuickEnchanting()
- if ProfessionsFrame.CraftingPage.ValidateControls then
- hooksecurefunc(ProfessionsFrame.CraftingPage, "ValidateControls", function(self)
- isEnchanting = nil
- local currentRecipeInfo = self.SchematicForm:GetRecipeInfo()
- if currentRecipeInfo and currentRecipeInfo.alternateVerb then
- local professionInfo = ProfessionsFrame:GetProfessionInfo()
- if professionInfo and professionInfo.parentProfessionID == 333 then
- isEnchanting = true
- self.CreateButton.tooltipText = format(tooltipString, "Right click to use Vellum", GetItemCount(ENCHANTING_VELLUM))
- end
- end
- end)
- end
-
- local createButton = ProfessionsFrame.CraftingPage.CreateButton
- createButton:RegisterForClicks("AnyUp")
- createButton:HookScript("OnClick", function(_, btn)
- if btn == "RightButton" and isEnchanting then
- UseItemByName(ENCHANTING_VELLUM)
- end
- end)
-end
-
local function LoadTradeTabs()
if init then
return
end
+
if InCombatLockdown() then
K:RegisterEvent("PLAYER_REGEN_ENABLED", Module.TradeTabs_OnLoad)
else
@@ -261,7 +221,7 @@ local function LoadTradeTabs()
end
end
-function Module:TradeTabs()
+function Module:CreateTradeTabs()
if not C["Misc"].TradeTabs then
return
end
@@ -276,4 +236,5 @@ function Module:TradeTabs()
end)
end
end
-Module:RegisterMisc("TradeTabs", Module.TradeTabs)
+
+Module:RegisterMisc("TradeTabs", Module.CreateTradeTabs)
diff --git a/KkthnxUI/Modules/Miscellaneous/Elements/yClassColors.lua b/KkthnxUI/Modules/Miscellaneous/Elements/yClassColors.lua
index f9b82e2f..bc6a056b 100644
--- a/KkthnxUI/Modules/Miscellaneous/Elements/yClassColors.lua
+++ b/KkthnxUI/Modules/Miscellaneous/Elements/yClassColors.lua
@@ -111,34 +111,51 @@ local function updateFriendButton(button, playerArea)
end
end
+--- Updates the friends list with the current player's area.
+-- @param none
+-- @return none
local function UpdateFriendsList()
local playerArea = GetRealZoneText()
- for i = 1, FriendsListFrame.ScrollBox.ScrollTarget:GetNumChildren() do
- local button = select(i, FriendsListFrame.ScrollBox.ScrollTarget:GetChildren())
- if button:IsShown() then
- updateFriendButton(button, playerArea)
+ if playerArea then
+ local numChildren = FriendsListFrame.ScrollBox.ScrollTarget:GetNumChildren()
+ if numChildren then
+ for friendIndex = 1, numChildren do
+ local button = select(friendIndex, FriendsListFrame.ScrollBox.ScrollTarget:GetChildren())
+ if button and button:IsShown() then
+ updateFriendButton(button, playerArea)
+ end
+ end
+ else
+ print("Error: Unable to get the number of children.")
end
+ else
+ print("Error: Unable to get the real zone text.")
end
end
hooksecurefunc(FriendsListFrame.ScrollBox, "Update", UpdateFriendsList)
-- WhoFrame Update
local columnTable = {}
-
+--- Updates the WhoFrame with the current player's zone, guild, and race.
hooksecurefunc(WhoFrame.ScrollBox, "Update", function(self)
local playerZone, playerGuild, playerRace = GetRealZoneText(), GetGuildInfo("player"), UnitRace("player")
- for i = 1, self.ScrollTarget:GetNumChildren() do
- local button = select(i, self.ScrollTarget:GetChildren())
- local info = C_FriendList_GetWhoInfo(button.index)
- if info then
- local guild, level, race, zone, class = info.fullGuildName, info.level, info.raceStr, info.area, info.filename
- wipe(columnTable)
- tinsert(columnTable, applyZoneColor(zone, zone, playerZone))
- tinsert(columnTable, applyZoneColor(guild, guild, playerGuild))
- tinsert(columnTable, applyZoneColor(race, race, playerRace))
- button.Name:SetTextColor(classColor(class, true))
- button.Level:SetText(diffColor(level) .. level)
- button.Variable:SetText(columnTable[UIDropDownMenu_GetSelectedID(WhoFrameDropDown)])
+ local numChildren = self.ScrollTarget:GetNumChildren()
+ if numChildren then
+ for whoIndex = 1, numChildren do
+ local button = select(whoIndex, self.ScrollTarget:GetChildren())
+ local info = C_FriendList_GetWhoInfo(button.index)
+ if info then
+ local guild, level, race, zone, class = info.fullGuildName, info.level, info.raceStr, info.area, info.filename
+ wipe(columnTable)
+ tinsert(columnTable, applyZoneColor(zone, zone, playerZone))
+ tinsert(columnTable, applyZoneColor(guild, guild, playerGuild))
+ tinsert(columnTable, applyZoneColor(race, race, playerRace))
+ button.Name:SetTextColor(classColor(class, true))
+ button.Level:SetText(diffColor(level) .. level)
+ button.Variable:SetText(columnTable[UIDropDownMenu_GetSelectedID(WhoFrameDropDown)])
+ end
end
+ else
+ print("Error: Unable to get the number of children.")
end
end)
diff --git a/KkthnxUI/Modules/Skins/Addons/Nekometer.lua b/KkthnxUI/Modules/Skins/Addons/Nekometer.lua
new file mode 100644
index 00000000..522c5e4e
--- /dev/null
+++ b/KkthnxUI/Modules/Skins/Addons/Nekometer.lua
@@ -0,0 +1,32 @@
+local K = KkthnxUI[1]
+local Module = K:GetModule("Skins")
+
+-- Localize global functions for better performance
+local IsAddOnLoaded = C_AddOns.IsAddOnLoaded
+local CreateFrame = CreateFrame
+
+local function ReskinNekometer()
+ if not IsAddOnLoaded("nekometer") or not NekometerMainFrame then
+ return
+ end
+
+ NekometerMainFrame:SetBackdrop(nil)
+
+ if not _G["NekometerOverlayFrame"] then
+ local NekometerOverlayFrame = CreateFrame("Frame", "NekometerOverlayFrame", NekometerMainFrame)
+ NekometerOverlayFrame:SetAllPoints(NekometerMainFrame)
+
+ if not NekometerOverlayFrame.KKUI_Border then
+ NekometerOverlayFrame:CreateBorder()
+ NekometerOverlayFrame.KKUI_Border = true
+ end
+ end
+
+ local point, relativeTo, relativePoint, xOfs, yOfs = NekometerMainFrame:GetPoint()
+ if not (point == "BOTTOMRIGHT" and relativeTo == UIParent and relativePoint == "BOTTOMRIGHT" and xOfs == -500 and yOfs == 4) then
+ NekometerMainFrame:ClearAllPoints()
+ NekometerMainFrame:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -500, 4)
+ end
+end
+
+Module:RegisterSkin("nekometer", ReskinNekometer)
diff --git a/KkthnxUI/Modules/Skins/Blizzard/AchievementUI.lua b/KkthnxUI/Modules/Skins/Blizzard/AchievementUI.lua
index 33a1a1fb..94b99b25 100644
--- a/KkthnxUI/Modules/Skins/Blizzard/AchievementUI.lua
+++ b/KkthnxUI/Modules/Skins/Blizzard/AchievementUI.lua
@@ -15,11 +15,19 @@ local function SetupAchievementSummaryCategory(category)
_G[category:GetName() .. "ButtonHighlight"]:SetAlpha(0)
end
-C.themes["Blizzard_AchievementUI"] = function()
- local statusBar = AchievementFrameSummaryCategoriesStatusBar
- if statusBar and statusBar:GetName() then
- SetupStatusBar(statusBar)
- local name = statusBar:GetName()
+local function StyleAchievementFrameSummaryCategories()
+ for i = 1, 12 do
+ local category = _G["AchievementFrameSummaryCategoriesCategory" .. i]
+ if category then
+ SetupAchievementSummaryCategory(category)
+ end
+ end
+end
+
+local function StyleAchievementSummaryStatusBar(statusBar)
+ SetupStatusBar(statusBar)
+ local name = statusBar:GetName()
+ if name then
local title = _G[name .. "Title"]
local text = _G[name .. "Text"]
if title and text then
@@ -27,9 +35,17 @@ C.themes["Blizzard_AchievementUI"] = function()
text:SetPoint("RIGHT", statusBar, "RIGHT", -5, 0)
end
end
+end
- for i = 1, 12 do
- local category = _G["AchievementFrameSummaryCategoriesCategory" .. i]
- SetupAchievementSummaryCategory(category)
+C.themes["Blizzard_AchievementUI"] = function()
+ if not C["Skins"].BlizzardFrames then
+ return
end
+
+ local statusBar = AchievementFrameSummaryCategoriesStatusBar
+ if statusBar then
+ StyleAchievementSummaryStatusBar(statusBar)
+ end
+
+ StyleAchievementFrameSummaryCategories()
end
diff --git a/KkthnxUI/Modules/Skins/Blizzard/ArchaeologyUI.lua b/KkthnxUI/Modules/Skins/Blizzard/ArchaeologyUI.lua
index 3fe20816..c658262e 100644
--- a/KkthnxUI/Modules/Skins/Blizzard/ArchaeologyUI.lua
+++ b/KkthnxUI/Modules/Skins/Blizzard/ArchaeologyUI.lua
@@ -1,8 +1,6 @@
local K, C = KkthnxUI[1], KkthnxUI[2]
-C.themes["Blizzard_ArchaeologyUI"] = function()
- local archaeologyBar = ArcheologyDigsiteProgressBar
-
+local function SetupArchaeologyBar(archaeologyBar)
-- Remove any existing textures from the bar
archaeologyBar:StripTextures()
@@ -14,9 +12,8 @@ C.themes["Blizzard_ArchaeologyUI"] = function()
fillBar:CreateBorder()
-- Add a spark texture to the fill bar
- local sparkTexture = C["Media"].Textures.Spark16Texture
local spark = fillBar:CreateTexture(nil, "OVERLAY")
- spark:SetTexture(sparkTexture)
+ spark:SetTexture(C["Media"].Textures.Spark16Texture)
spark:SetHeight(archaeologyBar:GetHeight())
spark:SetBlendMode("ADD")
spark:SetPoint("CENTER", fillBar:GetStatusBarTexture(), "RIGHT", 0, 0)
@@ -29,3 +26,14 @@ C.themes["Blizzard_ArchaeologyUI"] = function()
barTitle:SetFontObject(K.UIFont)
end
end
+
+C.themes["Blizzard_ArchaeologyUI"] = function()
+ if not C["Skins"].BlizzardFrames then
+ return
+ end
+
+ local archaeologyBar = ArcheologyDigsiteProgressBar
+ if archaeologyBar then
+ SetupArchaeologyBar(archaeologyBar)
+ end
+end
diff --git a/KkthnxUI/Modules/Skins/Blizzard/Collections.lua b/KkthnxUI/Modules/Skins/Blizzard/Collections.lua
index a9719f60..be4f8c22 100644
--- a/KkthnxUI/Modules/Skins/Blizzard/Collections.lua
+++ b/KkthnxUI/Modules/Skins/Blizzard/Collections.lua
@@ -1,10 +1,6 @@
local K, C = KkthnxUI[1], KkthnxUI[2]
-C.themes["Blizzard_Collections"] = function()
- if K.CheckAddOnState("BetterWardrobe") then
- return
- end
-
+local function AdjustWardrobeFrame()
local WardrobeFrame = _G["WardrobeFrame"]
local WardrobeTransmogFrame = _G["WardrobeTransmogFrame"]
@@ -41,9 +37,23 @@ C.themes["Blizzard_Collections"] = function()
-- Hide the control frame
WardrobeTransmogFrame.ModelScene.ControlFrame:SetAlpha(0)
WardrobeTransmogFrame.ModelScene.ControlFrame:SetScale(0.00001)
+end
- -- Optionally remove the tutorial button
+local function HideTutorialButton()
if C["General"].NoTutorialButtons then
_G.PetJournalTutorialButton:Kill()
end
end
+
+C.themes["Blizzard_Collections"] = function()
+ if not C["Skins"].BlizzardFrames then
+ return
+ end
+
+ if K.CheckAddOnState("BetterWardrobe") then
+ return
+ end
+
+ AdjustWardrobeFrame()
+ HideTutorialButton()
+end
diff --git a/KkthnxUI/Modules/Skins/Blizzard/DeathRecap.lua b/KkthnxUI/Modules/Skins/Blizzard/DeathRecap.lua
index 4c6aaba0..306c2c7d 100644
--- a/KkthnxUI/Modules/Skins/Blizzard/DeathRecap.lua
+++ b/KkthnxUI/Modules/Skins/Blizzard/DeathRecap.lua
@@ -2,22 +2,42 @@ local K, C = KkthnxUI[1], KkthnxUI[2]
local select = select
-C.themes["Blizzard_DeathRecap"] = function()
+local function SkinDeathRecapFrame()
local DeathRecapFrame = DeathRecapFrame
+ -- Disable the border draw layer and hide unwanted elements
DeathRecapFrame:DisableDrawLayer("BORDER")
DeathRecapFrame.Background:Hide()
DeathRecapFrame.BackgroundInnerGlow:Hide()
DeathRecapFrame.Divider:Hide()
+ -- Create a new border for the frame
DeathRecapFrame:CreateBorder()
- select(8, DeathRecapFrame:GetChildren()):SkinButton() -- bottom close button has no parentKey
+
+ -- Skin the bottom close button (without a parent key)
+ local closeButton = select(8, DeathRecapFrame:GetChildren())
+ if closeButton then
+ closeButton:SkinButton()
+ end
+
+ -- Skin the close button at the top right corner
DeathRecapFrame.CloseXButton:SkinCloseButton()
+end
+local function SkinRecapEvents()
for i = 1, NUM_DEATH_RECAP_EVENTS do
local recap = DeathRecapFrame["Recap" .. i].SpellInfo
recap.IconBorder:Hide()
- recap.Icon:SetTexCoord(K.TexCoords[1], K.TexCoords[2], K.TexCoords[3], K.TexCoords[4])
+ recap.Icon:SetTexCoord(unpack(K.TexCoords))
recap:CreateBorder()
end
end
+
+C.themes["Blizzard_DeathRecap"] = function()
+ if not C["Skins"].BlizzardFrames then
+ return
+ end
+
+ SkinDeathRecapFrame()
+ SkinRecapEvents()
+end
diff --git a/KkthnxUI/Modules/Skins/Blizzard/FrameXML/AddonList.lua b/KkthnxUI/Modules/Skins/Blizzard/FrameXML/AddonList.lua
deleted file mode 100644
index 88e0ead4..00000000
--- a/KkthnxUI/Modules/Skins/Blizzard/FrameXML/AddonList.lua
+++ /dev/null
@@ -1,41 +0,0 @@
-local K, C = KkthnxUI[1], KkthnxUI[2]
-
-tinsert(C.defaultThemes, function()
- if not C["Skins"].BlizzardFrames then
- return
- end
-
- local cr, cg, cb = K.r, K.g, K.b
-
- AddonList:StripTextures()
- AddonList:CreateBorder()
- AddonListEnableAllButton:SkinButton()
- AddonListDisableAllButton:SkinButton()
- AddonListCancelButton:SkinButton()
- AddonListOkayButton:SkinButton()
- AddonListForceLoad:SkinCheckBox()
- -- B.ReskinDropDown(AddonCharacterDropDown)
- -- B.ReskinTrimScroll(AddonList.ScrollBar)
-
- AddonListForceLoad:SetSize(16, 16)
- AddonCharacterDropDown:SetWidth(170)
-
- local function forceSaturation(self, _, force)
- if force then
- return
- end
- self:SetVertexColor(cr, cg, cb)
- self:SetDesaturated(true, true)
- end
-
- hooksecurefunc("AddonList_InitButton", function(entry)
- if not entry.styled then
- entry.Enabled:SkinCheckBox(true)
- entry.Enabled:SetSize(16, 16)
- entry.LoadAddonButton:SkinButton()
- hooksecurefunc(entry.Enabled:GetCheckedTexture(), "SetDesaturated", forceSaturation)
-
- entry.styled = true
- end
- end)
-end)
diff --git a/KkthnxUI/Modules/Skins/Blizzard/FrameXML/CharacterFrame.lua b/KkthnxUI/Modules/Skins/Blizzard/FrameXML/CharacterFrame.lua
index 88863f34..6c889759 100644
--- a/KkthnxUI/Modules/Skins/Blizzard/FrameXML/CharacterFrame.lua
+++ b/KkthnxUI/Modules/Skins/Blizzard/FrameXML/CharacterFrame.lua
@@ -243,15 +243,25 @@ tinsert(C.defaultThemes, function()
CharacterStatsPane.ClassBackground:SetParent(CharacterFrameInsetRight)
CharacterStatsPane.ClassBackground:SetPoint("CENTER")
- local function styleSidebarTab(tab)
+ local function TabTextureCoords(tex, x1)
+ if x1 ~= 0.16001 then
+ tex:SetTexCoord(0.16001, 0.86, 0.16, 0.86)
+ end
+ end
+
+ local function StyleSidebarTab(tab)
if not tab.bg then
+ -- Create background frame
tab.bg = CreateFrame("Frame", nil, tab)
- tab.bg:SetFrameLevel(tab:GetFrameLevel())
tab.bg:SetAllPoints(tab)
+ tab.bg:SetFrameLevel(tab:GetFrameLevel())
tab.bg:CreateBorder(nil, nil, nil, nil, nil, { 255 / 255, 223 / 255, 0 / 255 })
+ -- Set up textures
tab.Icon:SetAllPoints(tab.bg)
tab.Hider:SetAllPoints(tab.bg)
+
+ -- Set up highlighting
tab.Highlight:SetPoint("TOPLEFT", tab.bg, "TOPLEFT", 1, -1)
tab.Highlight:SetPoint("BOTTOMRIGHT", tab.bg, "BOTTOMRIGHT", -1, 1)
tab.Highlight:SetColorTexture(1, 1, 1, 0.25)
@@ -259,27 +269,45 @@ tinsert(C.defaultThemes, function()
tab.TabBg:SetAlpha(0)
end
+ -- Apply texture coordinates to the first region
local region = select(1, tab:GetRegions())
if region and not tab.regionStyled then
region:SetTexCoord(0.16, 0.86, 0.16, 0.86)
- region.SetTexCoord = nil
tab.regionStyled = true
end
end
- -- PaperDoll sidebar tab hook
- for i = 1, #PAPERDOLL_SIDEBARS do
- styleSidebarTab(_G["PaperDollSidebarTab" .. i])
+ local function StyleSidebarTabs()
+ local index = 1
+ local tab = _G["PaperDollSidebarTab" .. index]
+ while tab do
+ StyleSidebarTab(tab)
+
+ -- Hook SetTexCoord function for the first tab
+ if index == 1 then
+ for _, region in ipairs({ tab:GetRegions() }) do
+ hooksecurefunc(region, "SetTexCoord", TabTextureCoords)
+ end
+ end
+
+ index = index + 1
+ tab = _G["PaperDollSidebarTab" .. index]
+ end
end
- -- Hide paperdoll equipment manager scrollbar background
- hooksecurefunc(PaperDollFrame.TitleManagerPane.ScrollBox, "Update", function(self)
- for i = 1, self.ScrollTarget:GetNumChildren() do
- local child = select(i, self.ScrollTarget:GetChildren())
+ hooksecurefunc("PaperDollFrame_UpdateSidebarTabs", StyleSidebarTabs)
+
+ local function HideScrollbarBackground(scrollBox)
+ for i = 1, scrollBox.ScrollTarget:GetNumChildren() do
+ local child = select(i, scrollBox.ScrollTarget:GetChildren())
if not child.styled then
child:DisableDrawLayer("BACKGROUND")
child.styled = true
end
end
+ end
+
+ hooksecurefunc(PaperDollFrame.TitleManagerPane.ScrollBox, "Update", function(self)
+ HideScrollbarBackground(self)
end)
end)
diff --git a/KkthnxUI/Modules/Skins/Blizzard/FrameXML/ChatFrame.lua b/KkthnxUI/Modules/Skins/Blizzard/FrameXML/ChatFrame.lua
index fba401ce..6dbfd137 100644
--- a/KkthnxUI/Modules/Skins/Blizzard/FrameXML/ChatFrame.lua
+++ b/KkthnxUI/Modules/Skins/Blizzard/FrameXML/ChatFrame.lua
@@ -2,6 +2,11 @@ local K, C = KkthnxUI[1], KkthnxUI[2]
local table_insert = table.insert
local hooksecurefunc = hooksecurefunc
+local FRIEND_TEXTURE = "UI-ChatIcon-App"
+local QUEUE_TEXTURE = "groupfinder-eye-frame"
+local HOME_TEXTURE = "Interface\\Buttons\\UI-HomeButton"
+
+-- Skinning Functions
local function SkinChatButton(button, size)
button:SkinButton()
button:SetSize(size, size)
@@ -16,9 +21,6 @@ local function SkinCloseButton(button, size)
end
local function SkinQuickJoinToastButton(button)
- local FRIEND_TEXTURE = "UI-ChatIcon-App"
- local QUEUE_TEXTURE = "groupfinder-eye-frame"
-
button:SetSize(28, 28)
button:SetHighlightTexture(0)
button.FriendsButton:SetAtlas(FRIEND_TEXTURE)
@@ -28,11 +30,13 @@ local function SkinQuickJoinToastButton(button)
button.FriendCount:SetPoint("BOTTOM", 1, 2)
end
+-- Theme Application
table_insert(C.defaultThemes, function()
- local FRIEND_TEXTURE = "UI-ChatIcon-App"
- local QUEUE_TEXTURE = "groupfinder-eye-frame"
- local HOME_TEXTURE = "Interface\\Buttons\\UI-HomeButton"
+ if not C["Skins"].BlizzardFrames then
+ return
+ end
+ -- BNToastFrame
BNToastFrame:SetClampedToScreen(true)
BNToastFrame:SetBackdrop(nil)
BNToastFrame:CreateBorder()
@@ -40,13 +44,21 @@ table_insert(C.defaultThemes, function()
BNToastFrame.TooltipFrame:CreateBorder()
SkinCloseButton(BNToastFrame.CloseButton, 18)
+ -- QuickJoinToastButton
SkinQuickJoinToastButton(QuickJoinToastButton)
+ QuickJoinToastButton:HookScript("OnMouseDown", function(self)
+ self.FriendsButton:SetAtlas(FRIEND_TEXTURE)
+ end)
+ QuickJoinToastButton:HookScript("OnMouseUp", function(self)
+ self.FriendsButton:SetAtlas(FRIEND_TEXTURE)
+ end)
+ QuickJoinToastButton.Toast:ClearAllPoints()
+ QuickJoinToastButton.Toast:SetPoint("LEFT", QuickJoinToastButton, "RIGHT")
hooksecurefunc(QuickJoinToastButton, "ToastToFriendFinished", function(self)
self.FriendsButton:SetShown(not self.displayedToast)
self.FriendCount:SetShown(not self.displayedToast)
end)
-
hooksecurefunc(QuickJoinToastButton, "UpdateQueueIcon", function(self)
if not self.displayedToast then
return
@@ -58,25 +70,15 @@ table_insert(C.defaultThemes, function()
self.FriendCount:SetShown(false)
end)
- QuickJoinToastButton:HookScript("OnMouseDown", function(self)
- self.FriendsButton:SetAtlas(FRIEND_TEXTURE)
- end)
-
- QuickJoinToastButton:HookScript("OnMouseUp", function(self)
- self.FriendsButton:SetAtlas(FRIEND_TEXTURE)
- end)
-
- QuickJoinToastButton.Toast:ClearAllPoints()
- QuickJoinToastButton.Toast:SetPoint("LEFT", QuickJoinToastButton, "RIGHT")
-
+ -- ChatFrame Buttons
SkinChatButton(ChatFrameChannelButton, 16)
SkinChatButton(ChatFrameToggleVoiceDeafenButton, 16)
SkinChatButton(ChatFrameToggleVoiceMuteButton, 16)
SkinChatButton(ChatFrameMenuButton, 16)
-
ChatFrameMenuButton:SetNormalTexture(HOME_TEXTURE)
ChatFrameMenuButton:SetPushedTexture(HOME_TEXTURE)
+ -- VoiceChatChannelActivatedNotification
VoiceChatChannelActivatedNotification:SetBackdrop(nil)
VoiceChatChannelActivatedNotification:CreateBorder()
SkinCloseButton(VoiceChatChannelActivatedNotification.CloseButton, 32)
diff --git a/KkthnxUI/Modules/Skins/Blizzard/FrameXML/LossOfControlFrame.lua b/KkthnxUI/Modules/Skins/Blizzard/FrameXML/LossOfControlFrame.lua
index 854d83f4..1d48d639 100644
--- a/KkthnxUI/Modules/Skins/Blizzard/FrameXML/LossOfControlFrame.lua
+++ b/KkthnxUI/Modules/Skins/Blizzard/FrameXML/LossOfControlFrame.lua
@@ -1,14 +1,15 @@
local K, C = KkthnxUI[1], KkthnxUI[2]
local CreateFrame = CreateFrame
local hooksecurefunc = hooksecurefunc
+local table_insert = table.insert
+-- Function to skin the LossOfControl frame
table.insert(C.defaultThemes, function()
- if not C.Skins.BlizzardFrames then
+ if not C["Skins"].BlizzardFrames then
return
end
local frame = LossOfControlFrame
-
frame:StripTextures()
local iconBorder = CreateFrame("Frame", nil, frame)
@@ -20,7 +21,6 @@ table.insert(C.defaultThemes, function()
frame.AbilityName:ClearAllPoints()
frame.AbilityName:SetPoint("BOTTOM", frame, 0, -8)
-
frame.AbilityName.scrollTime = nil
frame.AbilityName:SetFontObject(K.UIFont)
frame.AbilityName:SetFont(select(1, frame.AbilityName:GetFont()), 20, select(3, frame.AbilityName:GetFont()))
@@ -29,18 +29,18 @@ table.insert(C.defaultThemes, function()
frame.TimeLeft.SecondsText:Hide()
hooksecurefunc("LossOfControlFrame_SetUpDisplay", function(self)
- local Icon = self.Icon
- local AbilityName = self.AbilityName
- local Anim = self.Anim
+ local icon = self.Icon
+ local abilityName = self.AbilityName
+ local animation = self.Anim
- Icon:ClearAllPoints()
- Icon:SetPoint("CENTER", self)
+ icon:ClearAllPoints()
+ icon:SetPoint("CENTER", self)
- AbilityName:ClearAllPoints()
- AbilityName:SetPoint("BOTTOM", self, 0, -8)
+ abilityName:ClearAllPoints()
+ abilityName:SetPoint("BOTTOM", self, 0, -8)
- if Anim and Anim:IsPlaying() then
- Anim:Stop()
+ if animation and animation:IsPlaying() then
+ animation:Stop()
end
end)
diff --git a/KkthnxUI/Modules/Skins/Blizzard/FrameXML/ObjectiveTracker.lua b/KkthnxUI/Modules/Skins/Blizzard/FrameXML/ObjectiveTracker.lua
index 1849e62d..2f1c8ff8 100644
--- a/KkthnxUI/Modules/Skins/Blizzard/FrameXML/ObjectiveTracker.lua
+++ b/KkthnxUI/Modules/Skins/Blizzard/FrameXML/ObjectiveTracker.lua
@@ -1,6 +1,10 @@
local K, C = KkthnxUI[1], KkthnxUI[2]
+local tinsert = table.insert
+local hooksecurefunc = hooksecurefunc
+local CreateFrame = CreateFrame
-local function reskinHeader(header)
+-- Reskin header function
+local function ReskinObjectiveHeader(header)
if not header then
return
end
@@ -19,24 +23,27 @@ local function reskinHeader(header)
bg:SetVertexColor(K.r, K.g, K.b, 0.8)
bg:SetPoint("BOTTOMLEFT", 0, -4)
bg:SetSize(250, 30)
- header.bg = bg -- accessable for other addons
+ header.bg = bg -- Accessible for other addons
end
-local function showHotkey(self)
+-- Show hotkey function
+local function ShowHotkey(self)
local item = self:GetParent()
if item.rangeOverlay then
item.rangeOverlay:Show()
end
end
-local function hideHotkey(self)
+-- Hide hotkey function
+local function HideHotkey(self)
local item = self:GetParent()
if item.rangeOverlay then
item.rangeOverlay:Hide()
end
end
-local function colorHotkey(self, r, g, b)
+-- Color hotkey function
+local function ColorHotkey(self, r, g, b)
local item = self:GetParent()
if item.rangeOverlay then
if r == 0.6 and g == 0.6 and b == 0.6 then
@@ -47,11 +54,12 @@ local function colorHotkey(self, r, g, b)
end
end
-local function reskinRangeOverlay(item)
+-- Reskin range overlay function
+local function ReskinRangeOverlay(item)
item:CreateBorder()
item:SetNormalTexture(0)
item.KKUI_Border:SetVertexColor(1, 0.82, 0.2)
- item.icon:SetTexCoord(K.TexCoords[1], K.TexCoords[2], K.TexCoords[3], K.TexCoords[4])
+ item.icon:SetTexCoord(unpack(K.TexCoords))
item.icon:SetAllPoints()
local rangeOverlay = item:CreateTexture(nil, "OVERLAY")
@@ -60,17 +68,18 @@ local function reskinRangeOverlay(item)
rangeOverlay:SetBlendMode("MOD")
item.rangeOverlay = rangeOverlay
- hooksecurefunc(item.HotKey, "Show", showHotkey)
- hooksecurefunc(item.HotKey, "Hide", hideHotkey)
- hooksecurefunc(item.HotKey, "SetVertexColor", colorHotkey)
- colorHotkey(item.HotKey, item.HotKey:GetTextColor())
+ hooksecurefunc(item.HotKey, "Show", ShowHotkey)
+ hooksecurefunc(item.HotKey, "Hide", HideHotkey)
+ hooksecurefunc(item.HotKey, "SetVertexColor", ColorHotkey)
+ ColorHotkey(item.HotKey, item.HotKey:GetTextColor())
item.HotKey:SetAlpha(0)
end
-local function reskinItemButton(block)
+-- Reskin item button function
+local function ReskinItemButton(block)
if InCombatLockdown() then
return
- end -- will break quest item button
+ end
local item = block and block.itemButton
if not item then
@@ -78,12 +87,13 @@ local function reskinItemButton(block)
end
if not item.skinned then
- reskinRangeOverlay(item)
+ ReskinRangeOverlay(item)
item.skinned = true
end
end
-local function reskinProgressBars(_, _, line)
+-- Reskin progress bars function
+local function ReskinProgressBars(_, _, line)
local progressBar = line and line.ProgressBar
local bar = progressBar and progressBar.Bar
if not bar then
@@ -135,7 +145,7 @@ local function reskinProgressBars(_, _, line)
if icon then
icon:SetSize(26, 26)
icon:SetMask("")
- icon:SetTexCoord(K.TexCoords[1], K.TexCoords[2], K.TexCoords[3], K.TexCoords[4])
+ icon:SetTexCoord(unpack(K.TexCoords))
if not progressBar.KKUI_Backdrop then
progressBar:CreateBackdrop()
progressBar.KKUI_Backdrop:SetFrameLevel(6)
@@ -144,7 +154,6 @@ local function reskinProgressBars(_, _, line)
end
end
- -- Attach the function directly to progressBar as a method
progressBar.PlayFlareAnim = K.Noop
progressBar.isSkinned = true
@@ -153,7 +162,8 @@ local function reskinProgressBars(_, _, line)
end
end
-local function reskinTimerBars(_, _, line)
+-- Reskin timer bars function
+local function ReskinTimerBars(_, _, line)
local timerBar = line and line.TimerBar
local bar = timerBar and timerBar.Bar
@@ -167,122 +177,109 @@ local function reskinTimerBars(_, _, line)
end
end
--- Repositions the Find Group button and/or the item button for a given block.
-local function repositionFindGroupButton(block, button)
- -- Check if we are currently in combat lockdown, which could break the quest item button.
+-- Reposition find group button function
+local function RepositionFindGroupButton(block, button)
if InCombatLockdown() then
- return -- Return early if we are in combat lockdown.
+ return
end
- -- Check if a button was passed in and has a valid point.
if not button or not button.GetPoint then
- return -- Return early if no valid button was passed in.
+ return
end
- -- Get the current point of the button.
local point, relativeTo, relativePoint, xOffset, yOffset = button:GetPoint()
- -- Reposition the item button if it is to the left of the group finder button.
if block.groupFinderButton and relativeTo == block.groupFinderButton and block.itemButton and button == block.itemButton then
- xOffset = xOffset - 1 -- Move the item button one pixel to the left of the group finder button.
+ xOffset = xOffset - 1
button:SetPoint(point, relativeTo, relativePoint, xOffset, yOffset)
end
- -- Reposition the group finder button if it is a child of the block frame.
if relativeTo == block and block.groupFinderButton and button == block.groupFinderButton then
- yOffset = yOffset - 1 -- Move the group finder button one pixel down.
+ yOffset = yOffset - 1
button:SetPoint(point, relativeTo, relativePoint, xOffset, yOffset)
end
end
--- Reskins the Find Group button for a given block.
-local function reskinFindGroupButton(block)
- -- Check if the block has a Find Group button.
+-- Reskin find group button function
+local function ReskinFindGroupButton(block)
local findGroupButton = block.hasGroupFinderButton and block.groupFinderButton
if not findGroupButton then
- return -- No Find Group button found, so return early.
+ return
end
- -- Apply a custom skin to the Find Group button.
findGroupButton:SkinButton()
-
- -- Set the size of the Find Group button to 22x22 pixels.
findGroupButton:SetSize(22, 22)
- -- Set the texture and texture coordinates for the Find Group button icon.
local findGroupButtonIcon = findGroupButton.icon or findGroupButton.Icon
if findGroupButtonIcon then
findGroupButtonIcon:SetAtlas("groupfinder-eye-frame")
findGroupButtonIcon:SetAllPoints()
local texCoords = K.TexCoords
- findGroupButtonIcon:SetTexCoord(texCoords[1], texCoords[2], texCoords[3], texCoords[4])
+ findGroupButtonIcon:SetTexCoord(unpack(texCoords))
end
end
-local function changedTrackerState()
- local minimizeButton = ObjectiveTrackerFrame.HeaderMenu.MinimizeButton
- minimizeButton:SetNormalTexture(0)
- minimizeButton:SetPushedTexture(0)
- minimizeButton:SetSize(16, 16)
- if _G.ObjectiveTrackerFrame.collapsed then
- minimizeButton.tex:SetTexture(C["Media"].Textures.ArrowTexture)
- minimizeButton.tex:SetRotation(rad(180))
- else
- minimizeButton.tex:SetTexture(C["Media"].Textures.ArrowTexture)
- minimizeButton.tex:SetRotation(rad(0))
- end
-end
-
-local function updateMinimizeButton(button, collapsed)
+-- Update minimize button function
+local function UpdateMinimizeButton(button, collapsed)
button:SetNormalTexture(0)
button:SetPushedTexture(0)
button:SetSize(16, 16)
if collapsed then
button.tex:SetTexture(C["Media"].Textures.ArrowTexture)
- button.tex:SetRotation(rad(180))
+ button.tex:SetRotation(math.rad(180))
else
button.tex:SetTexture(C["Media"].Textures.ArrowTexture)
- button.tex:SetRotation(rad(0))
+ button.tex:SetRotation(math.rad(0))
end
end
+-- Change tracker state function
+local function ChangeTrackerState()
+ local minimizeButton = ObjectiveTrackerFrame.HeaderMenu.MinimizeButton
+ UpdateMinimizeButton(minimizeButton, _G.ObjectiveTrackerFrame.collapsed)
+end
+
+-- Register skinning functions
tinsert(C.defaultThemes, function()
+ if not C["Skins"].BlizzardFrames then
+ return
+ end
+
if C_AddOns.IsAddOnLoaded("!KalielsTracker") then
return
end
- local minimize = ObjectiveTrackerFrame.HeaderMenu.MinimizeButton
- minimize:SetNormalTexture(0)
- minimize:SetPushedTexture(0)
- minimize:SetSize(16, 16)
- minimize:StripTextures()
- minimize:SetHighlightTexture([[Interface\Buttons\UI-PlusButton-Hilight]], "ADD")
- minimize.tex = minimize:CreateTexture(nil, "OVERLAY")
- minimize.tex:SetTexture(C["Media"].Textures.ArrowTexture)
- minimize.tex:SetDesaturated(true)
- minimize.tex:SetAllPoints()
-
- hooksecurefunc("ObjectiveTracker_Expand", changedTrackerState)
- hooksecurefunc("ObjectiveTracker_Collapse", changedTrackerState)
- hooksecurefunc("QuestObjectiveSetupBlockButton_Item", reskinItemButton)
- hooksecurefunc(_G.BONUS_OBJECTIVE_TRACKER_MODULE, "AddObjective", reskinItemButton)
- hooksecurefunc("QuestObjectiveSetupBlockButton_AddRightButton", repositionFindGroupButton) --[Move]: The eye & quest item to the left of the eye
- hooksecurefunc("QuestObjectiveSetupBlockButton_FindGroup", reskinFindGroupButton) --[Skin]: The eye
- hooksecurefunc(_G.BONUS_OBJECTIVE_TRACKER_MODULE, "AddProgressBar", reskinProgressBars) --[Skin]: Bonus Objective Progress Bar
- hooksecurefunc(_G.WORLD_QUEST_TRACKER_MODULE, "AddProgressBar", reskinProgressBars) --[Skin]: World Quest Progress Bar
- hooksecurefunc(_G.DEFAULT_OBJECTIVE_TRACKER_MODULE, "AddProgressBar", reskinProgressBars) --[Skin]: Quest Progress Bar
- hooksecurefunc(_G.SCENARIO_TRACKER_MODULE, "AddProgressBar", reskinProgressBars) --[Skin]: Scenario Progress Bar
- hooksecurefunc(_G.CAMPAIGN_QUEST_TRACKER_MODULE, "AddProgressBar", reskinProgressBars) --[Skin]: Campaign Progress Bar
- hooksecurefunc(_G.QUEST_TRACKER_MODULE, "AddProgressBar", reskinProgressBars) --[Skin]: Quest Progress Bar
- hooksecurefunc(_G.UI_WIDGET_TRACKER_MODULE, "AddProgressBar", reskinProgressBars) --[Skin]: New DF Quest Progress Bar
- hooksecurefunc(_G.QUEST_TRACKER_MODULE, "AddTimerBar", reskinTimerBars) --[Skin]: Quest Timer Bar
- hooksecurefunc(_G.SCENARIO_TRACKER_MODULE, "AddTimerBar", reskinTimerBars) --[Skin]: Scenario Timer Bar
- hooksecurefunc(_G.ACHIEVEMENT_TRACKER_MODULE, "AddTimerBar", reskinTimerBars) --[Skin]: Achievement Timer Bar
+ local minimizeButton = ObjectiveTrackerFrame.HeaderMenu.MinimizeButton
+ minimizeButton:SetNormalTexture(0)
+ minimizeButton:SetPushedTexture(0)
+ minimizeButton:SetSize(16, 16)
+ minimizeButton:StripTextures()
+ minimizeButton:SetHighlightTexture([[Interface\Buttons\UI-PlusButton-Hilight]], "ADD")
+ minimizeButton.tex = minimizeButton:CreateTexture(nil, "OVERLAY")
+ minimizeButton.tex:SetTexture(C["Media"].Textures.ArrowTexture)
+ minimizeButton.tex:SetDesaturated(true)
+ minimizeButton.tex:SetAllPoints()
+
+ hooksecurefunc("ObjectiveTracker_Expand", ChangeTrackerState)
+ hooksecurefunc("ObjectiveTracker_Collapse", ChangeTrackerState)
+ hooksecurefunc("QuestObjectiveSetupBlockButton_Item", ReskinItemButton)
+ hooksecurefunc(_G.BONUS_OBJECTIVE_TRACKER_MODULE, "AddObjective", ReskinItemButton)
+ hooksecurefunc("QuestObjectiveSetupBlockButton_AddRightButton", RepositionFindGroupButton)
+ hooksecurefunc("QuestObjectiveSetupBlockButton_FindGroup", ReskinFindGroupButton)
+ hooksecurefunc(_G.BONUS_OBJECTIVE_TRACKER_MODULE, "AddProgressBar", ReskinProgressBars)
+ hooksecurefunc(_G.WORLD_QUEST_TRACKER_MODULE, "AddProgressBar", ReskinProgressBars)
+ hooksecurefunc(_G.DEFAULT_OBJECTIVE_TRACKER_MODULE, "AddProgressBar", ReskinProgressBars)
+ hooksecurefunc(_G.SCENARIO_TRACKER_MODULE, "AddProgressBar", ReskinProgressBars)
+ hooksecurefunc(_G.CAMPAIGN_QUEST_TRACKER_MODULE, "AddProgressBar", ReskinProgressBars)
+ hooksecurefunc(_G.QUEST_TRACKER_MODULE, "AddProgressBar", ReskinProgressBars)
+ hooksecurefunc(_G.UI_WIDGET_TRACKER_MODULE, "AddProgressBar", ReskinProgressBars)
+ hooksecurefunc(_G.QUEST_TRACKER_MODULE, "AddTimerBar", ReskinTimerBars)
+ hooksecurefunc(_G.SCENARIO_TRACKER_MODULE, "AddTimerBar", ReskinTimerBars)
+ hooksecurefunc(_G.ACHIEVEMENT_TRACKER_MODULE, "AddTimerBar", ReskinTimerBars)
-- Reskin Headers
local headers = {
_G.BONUS_OBJECTIVE_TRACKER_MODULE.Header,
- -- _G.MONTHLY_ACTIVITIES_TRACKER_MODULE,
_G.ObjectiveTrackerBlocksFrame.AchievementHeader,
_G.ObjectiveTrackerBlocksFrame.CampaignQuestHeader,
_G.ObjectiveTrackerBlocksFrame.ProfessionHeader,
@@ -292,7 +289,7 @@ tinsert(C.defaultThemes, function()
_G.WORLD_QUEST_TRACKER_MODULE.Header,
}
for _, header in pairs(headers) do
- reskinHeader(header)
+ ReskinObjectiveHeader(header)
local button = header.MinimizeButton
if button then
@@ -301,10 +298,10 @@ tinsert(C.defaultThemes, function()
button:SetSize(16, 16)
button.tex = button:CreateTexture(nil, "OVERLAY")
button.tex:SetTexture(C["Media"].Textures.ArrowTexture)
- button.tex:SetRotation(rad(0))
+ button.tex:SetRotation(math.rad(0))
button.tex:SetAllPoints()
- hooksecurefunc(button, "SetCollapsed", updateMinimizeButton)
+ hooksecurefunc(button, "SetCollapsed", UpdateMinimizeButton)
end
end
end)
diff --git a/KkthnxUI/Modules/Skins/Blizzard/FrameXML/SpellBookFrame.lua b/KkthnxUI/Modules/Skins/Blizzard/FrameXML/SpellBookFrame.lua
index 2d52a71d..23e29a49 100644
--- a/KkthnxUI/Modules/Skins/Blizzard/FrameXML/SpellBookFrame.lua
+++ b/KkthnxUI/Modules/Skins/Blizzard/FrameXML/SpellBookFrame.lua
@@ -1,4 +1,5 @@
-local K, C = unpack(select(2, ...))
+local K, C = KkthnxUI[1], KkthnxUI[2]
+
local pairs = pairs
local table_insert = table.insert
local GetProfessionInfo = GetProfessionInfo
@@ -9,14 +10,17 @@ local function HandleSkillButton(button)
if not button or InCombatLockdown() then
return
end
+
button:SetCheckedTexture(0)
button:SetPushedTexture(0)
if button.IconTexture then
button.IconTexture:SetTexCoord(unpack(K.TexCoords))
- button.IconTexture:SetAllPoints(button)
- if not button.KKUI_Backdrop then
- button:CreateBackdrop(2, -2, -2, 2)
+ button.IconTexture:SetPoint("TOPLEFT", button, "TOPLEFT", 3, -3)
+ button.IconTexture:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -3, 3)
+ if not button.KKUI_Border then
+ button:CreateBorder(nil, nil, nil, nil, -7, nil, nil, nil, nil, 3)
+ button.KKUI_Border = true
end
end
@@ -26,88 +30,112 @@ local function HandleSkillButton(button)
end
end
-table_insert(C.defaultThemes, function()
- if not C["Skins"].BlizzardFrames then
+local function ReskinSpellButton(spellButton)
+ if not spellButton then
return
end
- local professionTexture = K.GetTexture(C["General"].Texture)
+ local iconTexture = _G[spellButton:GetName() .. "IconTexture"]
+ local slotFrame = _G[spellButton:GetName() .. "SlotFrame"]
+ local bu = spellButton
+
+ slotFrame:SetAlpha(0)
+ bu.EmptySlot:SetAlpha(0)
+ bu.UnlearnedFrame:SetAlpha(0)
+ bu.SpellHighlightTexture:SetAlpha(0)
+ bu:SetCheckedTexture(0)
+ bu:SetPushedTexture(0)
+ bu:SetHighlightTexture(0)
+
+ iconTexture:SetTexCoord(unpack(K.TexCoords))
+
+ if not bu.bg then
+ bu.bg = CreateFrame("Frame", nil, bu)
+ bu.bg:SetFrameLevel(bu:GetFrameLevel())
+ bu.bg:SetAllPoints(iconTexture)
+ bu.bg:CreateBorder(nil, nil, nil, nil, nil, nil, K.MediaFolder .. "Skins\\UI-Spellbook-SpellBackground", nil, nil, nil, { 1, 1, 1 })
+ bu.bg = true
+ end
- for i = 1, SPELLS_PER_PAGE do
- local bu = _G["SpellButton" .. i]
- local ic = _G["SpellButton" .. i .. "IconTexture"]
-
- local slotFrame = _G["SpellButton" .. i .. "SlotFrame"]
- slotFrame:SetAlpha(0)
- bu.EmptySlot:SetAlpha(0)
- bu.UnlearnedFrame:SetAlpha(0)
- bu.SpellHighlightTexture:SetAlpha(0)
- bu:SetCheckedTexture(0)
- bu:SetPushedTexture(0)
- bu:SetHighlightTexture(0)
-
- ic:SetTexCoord(unpack(K.TexCoords))
-
- if not bu.bg then
- bu.bg = CreateFrame("Frame", nil, bu)
- bu.bg:SetFrameLevel(bu:GetFrameLevel())
- bu.bg:SetAllPoints(ic)
- bu.bg:CreateBorder(nil, nil, nil, nil, nil, nil, K.MediaFolder .. "Skins\\UI-Spellbook-SpellBackground", nil, nil, nil, { 1, 1, 1 })
- bu.bg = true
+ bu.NewSpellHighlightTexture = CreateFrame("Frame", nil, bu, "BackdropTemplate")
+ bu.NewSpellHighlightTexture:SetFrameLevel(bu:GetFrameLevel() + 2)
+ bu.NewSpellHighlightTexture:SetBackdrop({ edgeFile = C["Media"].Borders.GlowBorder, edgeSize = 16 })
+ bu.NewSpellHighlightTexture:SetPoint("TOPLEFT", bu, -7, 7)
+ bu.NewSpellHighlightTexture:SetPoint("BOTTOMRIGHT", bu, 7, -7)
+ bu.NewSpellHighlightTexture:SetBackdropBorderColor(1, 223 / 255, 0)
+ bu.NewSpellHighlightTexture:Hide()
+
+ hooksecurefunc(bu.SpellHighlightTexture, "SetShown", function(_, value)
+ if value and not bu.NewSpellHighlightTexture:IsShown() then
+ bu.NewSpellHighlightTexture:Show()
end
+ end)
- bu.NewSpellHighlightTexture = CreateFrame("Frame", nil, bu, "BackdropTemplate")
- bu.NewSpellHighlightTexture:SetBackdrop({ edgeFile = C["Media"].Borders.GlowBorder, edgeSize = 16 })
- bu.NewSpellHighlightTexture:SetPoint("TOPLEFT", bu, -6, 6)
- bu.NewSpellHighlightTexture:SetPoint("BOTTOMRIGHT", bu, 6, -6)
- bu.NewSpellHighlightTexture:SetBackdropBorderColor(255 / 255, 223 / 255, 0 / 255)
- bu.NewSpellHighlightTexture:Hide()
+ hooksecurefunc(bu.SpellHighlightTexture, "Hide", function()
+ if bu.NewSpellHighlightTexture:IsShown() then
+ bu.NewSpellHighlightTexture:Hide()
+ end
+ end)
+end
- hooksecurefunc(bu.SpellHighlightTexture, "SetShown", function(_, value)
- if value == true and not bu.NewSpellHighlightTexture:IsShown() then
- bu.NewSpellHighlightTexture:Show()
- end
- end)
+local function ReskinProfessionButton(professionButton)
+ local statusBar = professionButton.statusBar
+ statusBar:StripTextures()
+ statusBar:SetHeight(16)
+ statusBar:SetStatusBarTexture(K.GetTexture(C["General"].Texture))
+ statusBar:GetStatusBarTexture():SetGradient("VERTICAL", CreateColor(0, 0.6, 0, 1), CreateColor(0, 0.8, 0, 1))
+ statusBar.rankText:SetPoint("CENTER")
+ statusBar:CreateBorder()
+
+ if professionButton.SpellButton1 then
+ HandleSkillButton(professionButton.SpellButton1)
+ end
+ if professionButton.SpellButton2 then
+ HandleSkillButton(professionButton.SpellButton2)
+ end
+end
- hooksecurefunc(bu.SpellHighlightTexture, "Hide", function()
- if bu.NewSpellHighlightTexture:IsShown() then
- bu.NewSpellHighlightTexture:Hide()
- end
- end)
+local function ReskinProfessionIcons(professionIndex)
+ local professionButton = _G["PrimaryProfession" .. professionIndex]
+ local iconBorder = _G["PrimaryProfession" .. professionIndex .. "IconBorder"]
+ local professionIcon = professionButton.icon
+
+ iconBorder:Hide()
+ professionButton.professionName:ClearAllPoints()
+ professionButton.professionName:SetPoint("TOPLEFT", 100, -4)
+ professionIcon:SetAlpha(1)
+ professionIcon:SetDesaturated(false)
+ professionIcon:SetTexCoord(unpack(K.TexCoords))
+
+ local bg = CreateFrame("Frame", nil, professionButton)
+ bg:SetAllPoints(professionIcon)
+ bg:SetFrameLevel(professionButton:GetFrameLevel())
+ bg:CreateBorder()
+end
+
+local function HideTutorialButtons()
+ if C["General"].NoTutorialButtons then
+ _G.SpellBookFrameTutorialButton:Hide()
end
+end
- local professions = { "PrimaryProfession1", "PrimaryProfession2", "SecondaryProfession1", "SecondaryProfession2", "SecondaryProfession3" }
- for i, button in pairs(professions) do
- local bu = _G[button]
- local sb = bu.statusBar
- sb:StripTextures()
- sb:SetHeight(16)
- sb:SetStatusBarTexture(professionTexture)
- sb:GetStatusBarTexture():SetGradient("VERTICAL", CreateColor(0, 0.6, 0, 1), CreateColor(0, 0.8, 0, 1))
- sb.rankText:SetPoint("CENTER")
- sb:CreateBorder()
- if i > 2 then
- sb:ClearAllPoints()
- sb:SetPoint("BOTTOMLEFT", 16, 3)
- end
+table_insert(C.defaultThemes, function()
+ if not C["Skins"].BlizzardFrames then
+ return
+ end
+
+ local professionTexture = K.GetTexture(C["General"].Texture)
- HandleSkillButton(bu.SpellButton1)
- HandleSkillButton(bu.SpellButton2)
+ for i = 1, SPELLS_PER_PAGE do
+ ReskinSpellButton(_G["SpellButton" .. i])
end
- for i = 1, 2 do
- local bu = _G["PrimaryProfession" .. i]
- _G["PrimaryProfession" .. i .. "IconBorder"]:Hide()
- bu.professionName:ClearAllPoints()
- bu.professionName:SetPoint("TOPLEFT", 100, -4)
- bu.icon:SetAlpha(1)
- bu.icon:SetDesaturated(false)
- bu.icon:SetTexCoord(unpack(K.TexCoords))
-
- local bg = CreateFrame("Frame", nil, bu)
- bg:SetAllPoints(bu.icon)
- bg:SetFrameLevel(bu:GetFrameLevel())
- bg:CreateBorder()
+ local professions = { "PrimaryProfession1", "PrimaryProfession2", "SecondaryProfession1", "SecondaryProfession2", "SecondaryProfession3" }
+ for i, profession in pairs(professions) do
+ ReskinProfessionButton(_G[profession])
+ if i <= 2 then
+ ReskinProfessionIcons(i)
+ end
end
hooksecurefunc("FormatProfession", function(frame, index)
@@ -123,7 +151,5 @@ table_insert(C.defaultThemes, function()
end
end)
- if C["General"].NoTutorialButtons then
- _G.SpellBookFrameTutorialButton:Kill()
- end
+ HideTutorialButtons()
end)
diff --git a/KkthnxUI/Modules/Skins/Blizzard/FrameXML/StaticPopup.lua b/KkthnxUI/Modules/Skins/Blizzard/FrameXML/StaticPopup.lua
new file mode 100644
index 00000000..078d81c0
--- /dev/null
+++ b/KkthnxUI/Modules/Skins/Blizzard/FrameXML/StaticPopup.lua
@@ -0,0 +1,144 @@
+local K, C = KkthnxUI[1], KkthnxUI[2]
+local r, g, b = K.r, K.g, K.b
+
+local function colorMinimize(f)
+ if f:IsEnabled() then
+ f.minimize:SetVertexColor(r, g, b)
+ end
+end
+
+local function clearMinimize(f)
+ f.minimize:SetVertexColor(1, 1, 1)
+end
+
+local function updateMinorButtonState(button)
+ if button:GetChecked() then
+ button.bg:SetBackdropColor(1, 0.8, 0, 0.25)
+ else
+ button.bg:SetBackdropColor(0, 0, 0, 0.25)
+ end
+end
+
+tinsert(C.defaultThemes, function()
+ if not C["Skins"].BlizzardFrames then
+ return
+ end
+
+ for i = 1, 4 do
+ local frame = _G["StaticPopup" .. i]
+ local bu = _G["StaticPopup" .. i .. "ItemFrame"]
+ local icon = _G["StaticPopup" .. i .. "ItemFrameIconTexture"]
+ local close = _G["StaticPopup" .. i .. "CloseButton"]
+
+ local gold = _G["StaticPopup" .. i .. "MoneyInputFrameGold"]
+ local silver = _G["StaticPopup" .. i .. "MoneyInputFrameSilver"]
+ local copper = _G["StaticPopup" .. i .. "MoneyInputFrameCopper"]
+
+ _G["StaticPopup" .. i .. "ItemFrameNameFrame"]:Hide()
+
+ bu:SetNormalTexture(0)
+ bu:SetHighlightTexture(0)
+ bu:SetPushedTexture(0)
+ -- bu.bg = B.ReskinIcon(icon)
+ -- B.ReskinIconBorder(bu.IconBorder)
+
+ local bg = CreateFrame("Frame", nil, bu)
+ bg:SetPoint("TOPLEFT", bu.bg, "TOPRIGHT", 2, 0)
+ bg:SetPoint("BOTTOMRIGHT", bu.bg, 115, 0)
+ bg:SetFrameLevel(gold:GetFrameLevel())
+ bg:CreateBorder()
+
+ silver:SetPoint("LEFT", gold, "RIGHT", 1, 0)
+ copper:SetPoint("LEFT", silver, "RIGHT", 1, 0)
+
+ frame.Border:Hide()
+ frame:CreateBorder()
+ for j = 1, 4 do
+ frame["button" .. j]:SkinButton()
+ end
+ frame.extraButton:SkinButton()
+ close:SkinCloseButton()
+
+ -- close.minimize = close:CreateTexture(nil, "OVERLAY")
+ -- close.minimize:SetSize(9, C.mult)
+ -- close.minimize:SetPoint("CENTER")
+ -- close.minimize:SetTexture(DB.bdTex)
+ -- close.minimize:SetVertexColor(1, 1, 1)
+ -- close:HookScript("OnEnter", colorMinimize)
+ -- close:HookScript("OnLeave", clearMinimize)
+
+ _G["StaticPopup" .. i .. "EditBox"].bg = CreateFrame("Frame", nil, _G["StaticPopup" .. i .. "EditBox"], "BackdropTemplate")
+ _G["StaticPopup" .. i .. "EditBox"].bg:SetAllPoints(_G["StaticPopup" .. i .. "EditBox"])
+ _G["StaticPopup" .. i .. "EditBox"].bg:SetFrameLevel(_G["StaticPopup" .. i .. "EditBox"]:GetFrameLevel())
+ _G["StaticPopup" .. i .. "EditBox"].bg:CreateBorder()
+
+ gold.bg = CreateFrame("Frame", nil, gold)
+ gold.bg:SetAllPoints(gold)
+ gold.bg:SetFrameLevel(gold:GetFrameLevel())
+ gold.bg:CreateBorder()
+
+ silver.bg = CreateFrame("Frame", nil, silver)
+ silver.bg:SetAllPoints(silver)
+ silver.bg:SetFrameLevel(silver:GetFrameLevel())
+ silver.bg:CreateBorder()
+
+ copper.bg = CreateFrame("Frame", nil, copper)
+ copper.bg:SetAllPoints(copper)
+ copper.bg:SetFrameLevel(copper:GetFrameLevel())
+ copper.bg:CreateBorder()
+ end
+
+ hooksecurefunc("StaticPopup_Show", function(which, _, _, data)
+ local info = StaticPopupDialogs[which]
+
+ if not info then
+ return
+ end
+
+ local dialog = nil
+ dialog = StaticPopup_FindVisible(which, data)
+
+ if not dialog then
+ local index = 1
+ if info.preferredIndex then
+ index = info.preferredIndex
+ end
+ for i = index, STATICPOPUP_NUMDIALOGS do
+ local frame = _G["StaticPopup" .. i]
+ if not frame:IsShown() then
+ dialog = frame
+ break
+ end
+ end
+
+ if not dialog and info.preferredIndex then
+ for i = 1, info.preferredIndex do
+ local frame = _G["StaticPopup" .. i]
+ if not frame:IsShown() then
+ dialog = frame
+ break
+ end
+ end
+ end
+ end
+
+ if not dialog then
+ return
+ end
+
+ if info.closeButton then
+ local closeButton = _G[dialog:GetName() .. "CloseButton"]
+
+ closeButton:SetNormalTexture(0)
+ closeButton:SetPushedTexture(0)
+
+ if info.closeButtonIsHide then
+ closeButton.__texture:Hide()
+ closeButton.minimize:Show()
+ else
+ closeButton.__texture:Show()
+ closeButton.minimize:Hide()
+ end
+ end
+ end)
+end)
diff --git a/KkthnxUI/Modules/Skins/Blizzard/FrameXML/UIDropDownMenu.lua b/KkthnxUI/Modules/Skins/Blizzard/FrameXML/UIDropDownMenu.lua
index acb25f7f..617ba116 100644
--- a/KkthnxUI/Modules/Skins/Blizzard/FrameXML/UIDropDownMenu.lua
+++ b/KkthnxUI/Modules/Skins/Blizzard/FrameXML/UIDropDownMenu.lua
@@ -1,55 +1,52 @@
local K, C = KkthnxUI[1], KkthnxUI[2]
local table_insert = table.insert
-
local hooksecurefunc = hooksecurefunc
-table_insert(C.defaultThemes, function()
- if not C["Skins"].BlizzardFrames then
- return
+local function StyleBackdrop(backdrop)
+ if backdrop and not backdrop.styled then
+ backdrop:StripTextures()
+ backdrop:CreateBorder()
+ backdrop.styled = true
end
-
- local r, g, b = K.r, K.g, K.b
- local dropdowns = { "DropDownList", "L_DropDownList", "Lib_DropDownList" }
-
- hooksecurefunc("UIDropDownMenu_CreateFrames", function()
- for _, name in next, dropdowns do
- for i = 1, _G.UIDROPDOWNMENU_MAXLEVELS do
- local backdrop = _G[name .. i .. "Backdrop"]
- if backdrop and not backdrop.styled then
- backdrop:StripTextures()
- backdrop:CreateBorder()
-
- backdrop.styled = true
- end
+end
+
+local function StyleDropdownLevel(level)
+ level = level or 1
+ local listFrame = _G["DropDownList" .. level]
+ for i = 1, _G.UIDROPDOWNMENU_MAXBUTTONS do
+ local bu = _G["DropDownList" .. level .. "Button" .. i]
+ local _, _, _, x = bu:GetPoint()
+ if bu:IsShown() and x then
+ local hl = _G["DropDownList" .. level .. "Button" .. i .. "Highlight"]
+ local arrow = _G["DropDownList" .. level .. "Button" .. i .. "ExpandArrow"]
+ if hl then
+ hl:SetColorTexture(K.r, K.g, K.b, 0.25)
+ hl:SetPoint("TOPLEFT", -x + 4, 0)
+ hl:SetPoint("BOTTOMRIGHT", listFrame:GetWidth() - bu:GetWidth() - x - 4, 0)
+ end
+ if arrow then
+ K.SetupArrow(arrow:GetNormalTexture(), "right")
+ arrow:SetSize(14, 14)
end
end
- end)
+ end
+end
- hooksecurefunc("ToggleDropDownMenu", function(level)
- if not level then
- level = 1
+local function ApplyDropdownStyling()
+ local dropdowns = { "DropDownList", "L_DropDownList", "Lib_DropDownList" }
+ for _, name in ipairs(dropdowns) do
+ for i = 1, _G.UIDROPDOWNMENU_MAXLEVELS do
+ StyleBackdrop(_G[name .. i .. "Backdrop"])
end
+ end
+end
- local listFrame = _G["DropDownList" .. level]
- for i = 1, _G.UIDROPDOWNMENU_MAXBUTTONS do
- local bu = _G["DropDownList" .. level .. "Button" .. i]
- local _, _, _, x = bu:GetPoint()
- if bu:IsShown() and x then
- local hl = _G["DropDownList" .. level .. "Button" .. i .. "Highlight"]
- local arrow = _G["DropDownList" .. level .. "Button" .. i .. "ExpandArrow"]
-
- if hl then
- hl:SetColorTexture(r, g, b, 0.25)
- hl:SetPoint("TOPLEFT", -x + 4, 0)
- hl:SetPoint("BOTTOMRIGHT", listFrame:GetWidth() - bu:GetWidth() - x - 4, 0)
- end
+table_insert(C.defaultThemes, function()
+ if not C["Skins"].BlizzardFrames then
+ return
+ end
- if arrow then
- K.SetupArrow(arrow:GetNormalTexture(), "right")
- arrow:SetSize(14, 14)
- end
- end
- end
- end)
+ hooksecurefunc("UIDropDownMenu_CreateFrames", ApplyDropdownStyling)
+ hooksecurefunc("ToggleDropDownMenu", StyleDropdownLevel)
end)
diff --git a/KkthnxUI/Modules/Skins/Blizzard/FrameXML/UIWidgets.lua b/KkthnxUI/Modules/Skins/Blizzard/FrameXML/UIWidgets.lua
index 742c9466..50714ef4 100644
--- a/KkthnxUI/Modules/Skins/Blizzard/FrameXML/UIWidgets.lua
+++ b/KkthnxUI/Modules/Skins/Blizzard/FrameXML/UIWidgets.lua
@@ -1,42 +1,10 @@
local K, C = KkthnxUI[1], KkthnxUI[2]
--- Sourced: ShestakUI
-
-local hooksecurefunc = hooksecurefunc
-
-local Type_StatusBar = Enum.UIWidgetVisualizationType.StatusBar
-local Type_CaptureBar = Enum.UIWidgetVisualizationType.CaptureBar
-local Type_SpellDisplay = Enum.UIWidgetVisualizationType.SpellDisplay
-local Type_DoubleStatusBar = Enum.UIWidgetVisualizationType.DoubleStatusBar
-
-local atlasColors = {
- ["UI-Frame-Bar-Fill-Blue"] = { 0.2, 0.6, 1 },
- ["UI-Frame-Bar-Fill-Red"] = { 0.9, 0.2, 0.2 },
- ["UI-Frame-Bar-Fill-Yellow"] = { 1, 0.6, 0 },
- ["objectivewidget-bar-fill-left"] = { 0.2, 0.6, 1 },
- ["objectivewidget-bar-fill-right"] = { 0.9, 0.2, 0.2 },
- ["EmberCourtScenario-Tracker-barfill"] = { 0.9, 0.2, 0.2 },
-}
-
-local elementsToHide = {
- "BG",
- "BGLeft",
- "BGRight",
- "BGCenter",
- "BorderLeft",
- "BorderRight",
- "BorderCenter",
- "Spark",
- "SparkGlow",
- "BorderGlow",
-}
-
-local function ReplaceWidgetBarTexture(self, atlas)
- if atlasColors[atlas] then
- self:SetStatusBarTexture(K.GetTexture(C["General"].Texture))
- self:SetStatusBarColor(unpack(atlasColors[atlas]))
- end
-end
+local Type_StatusBar = _G.Enum.UIWidgetVisualizationType.StatusBar
+local Type_CaptureBar = _G.Enum.UIWidgetVisualizationType.CaptureBar
+local Type_SpellDisplay = _G.Enum.UIWidgetVisualizationType.SpellDisplay
+local Type_DoubleStatusBar = _G.Enum.UIWidgetVisualizationType.DoubleStatusBar
+local Type_ItemDisplay = _G.Enum.UIWidgetVisualizationType.ItemDisplay
local function ResetLabelColor(text, _, _, _, _, force)
if not force then
@@ -46,29 +14,44 @@ end
local function ReskinWidgetStatusBar(bar)
if bar and not bar.styled then
- for _, elementName in ipairs(elementsToHide) do
- local element = bar[elementName]
- if element then
- element:SetAlpha(0)
- end
+ if bar.BG then
+ bar.BG:SetAlpha(0)
+ end
+ if bar.BGLeft then
+ bar.BGLeft:SetAlpha(0)
+ end
+ if bar.BGRight then
+ bar.BGRight:SetAlpha(0)
+ end
+ if bar.BGCenter then
+ bar.BGCenter:SetAlpha(0)
+ end
+ if bar.BorderLeft then
+ bar.BorderLeft:SetAlpha(0)
+ end
+ if bar.BorderRight then
+ bar.BorderRight:SetAlpha(0)
+ end
+ if bar.BorderCenter then
+ bar.BorderCenter:SetAlpha(0)
+ end
+ if bar.Spark then
+ bar.Spark:SetAlpha(0)
+ end
+ if bar.SparkGlow then
+ bar.SparkGlow:SetAlpha(0)
+ end
+ if bar.BorderGlow then
+ bar.BorderGlow:SetAlpha(0)
end
-
if bar.Label then
- bar.Label:SetDrawLayer("OVERLAY")
- bar.Label:SetPoint("CENTER", 0, -3)
- bar.Label:SetFontObject(Game12Font)
-
+ bar.Label:SetPoint("CENTER", 0, -5)
+ bar.Label:SetFontObject(K.UIFont)
ResetLabelColor(bar.Label)
hooksecurefunc(bar.Label, "SetTextColor", ResetLabelColor)
end
-
bar:CreateBorder()
- if bar.GetStatusBarTexture then
- ReplaceWidgetBarTexture(bar, bar:GetStatusBarTexture())
- hooksecurefunc(bar, "SetStatusBarTexture", ReplaceWidgetBarTexture)
- end
-
bar.styled = true
end
end
@@ -108,11 +91,10 @@ local function ReskinPVPCaptureBar(self)
end
local function ReskinSpellDisplayWidget(spell)
- if not spell or not spell.bg then
+ if not spell.bg then
spell.Border:SetAlpha(0)
spell.DebuffBorder:SetAlpha(0)
spell.Icon:SetTexCoord(K.TexCoords[1], K.TexCoords[2], K.TexCoords[3], K.TexCoords[4])
-
spell.bg = CreateFrame("Frame", nil, spell)
spell.bg:SetAllPoints(spell.Icon)
spell.bg:SetFrameLevel(spell:GetFrameLevel())
@@ -135,6 +117,19 @@ local function ReskinPowerBarWidget(self)
end
end
+local function ReskinWidgetItemDisplay(item)
+ if not item.bg then
+ item.Icon:SetTexCoord(K.TexCoords[1], K.TexCoords[2], K.TexCoords[3], K.TexCoords[4])
+
+ item.bg = CreateFrame("Frame", nil, item)
+ item.bg:SetAllPoints(item.Icon)
+ item.bg:SetFrameLevel(item:GetFrameLevel())
+ item.bg:CreateShadow(true)
+ -- Add border color here
+ end
+ item.IconMask:Hide()
+end
+
local function ReskinWidgetGroups(self)
if not self.widgetFrames then
return
@@ -149,12 +144,14 @@ local function ReskinWidgetGroups(self)
ReskinSpellDisplayWidget(widgetFrame.Spell)
elseif widgetType == Type_StatusBar then
ReskinWidgetStatusBar(widgetFrame.Bar)
+ elseif widgetType == Type_ItemDisplay then
+ ReskinWidgetItemDisplay(widgetFrame.Item)
end
end
end
end
-table.insert(C.defaultThemes, function()
+tinsert(C.defaultThemes, function()
if not C["Skins"].BlizzardFrames then
return
end
@@ -163,6 +160,10 @@ table.insert(C.defaultThemes, function()
ReskinWidgetGroups(_G.UIWidgetTopCenterContainerFrame)
hooksecurefunc(_G.UIWidgetBelowMinimapContainerFrame, "UpdateWidgetLayout", function(self)
+ if not self.widgetFrames then
+ return
+ end
+
for _, widgetFrame in pairs(self.widgetFrames) do
if widgetFrame.widgetType == Type_CaptureBar then
if not widgetFrame:IsForbidden() then
@@ -175,6 +176,9 @@ table.insert(C.defaultThemes, function()
hooksecurefunc(_G.UIWidgetPowerBarContainerFrame, "UpdateWidgetLayout", ReskinPowerBarWidget)
ReskinPowerBarWidget(_G.UIWidgetPowerBarContainerFrame)
+ hooksecurefunc(_G.ObjectiveTrackerUIWidgetContainer, "UpdateWidgetLayout", ReskinPowerBarWidget)
+ ReskinPowerBarWidget(_G.ObjectiveTrackerUIWidgetContainer)
+
hooksecurefunc(_G.TopScenarioWidgetContainerBlock.WidgetContainer, "UpdateWidgetLayout", ReskinPowerBarWidget)
hooksecurefunc(_G.BottomScenarioWidgetContainerBlock.WidgetContainer, "UpdateWidgetLayout", function(self)
@@ -201,7 +205,8 @@ table.insert(C.defaultThemes, function()
if self:IsForbidden() then
return
end
-
ReskinWidgetStatusBar(self.Bar)
end)
+
+ _G.UIWidgetCenterDisplayFrame.CloseButton:SkinCloseButton()
end)
diff --git a/KkthnxUI/Modules/Skins/Blizzard/InspectUI.lua b/KkthnxUI/Modules/Skins/Blizzard/InspectUI.lua
index d7ab732e..20109741 100644
--- a/KkthnxUI/Modules/Skins/Blizzard/InspectUI.lua
+++ b/KkthnxUI/Modules/Skins/Blizzard/InspectUI.lua
@@ -1,6 +1,10 @@
local K, C = KkthnxUI[1], KkthnxUI[2]
C.themes["Blizzard_InspectUI"] = function()
+ if not C["Skins"].BlizzardFrames then
+ return
+ end
+
local GetInventoryItemLink = GetInventoryItemLink
local HideUIPanel = HideUIPanel
local IsCosmeticItem = IsCosmeticItem
diff --git a/KkthnxUI/Modules/Skins/Blizzard/QuestNavigation.lua b/KkthnxUI/Modules/Skins/Blizzard/QuestNavigation.lua
index cda42529..9b0bcc1d 100644
--- a/KkthnxUI/Modules/Skins/Blizzard/QuestNavigation.lua
+++ b/KkthnxUI/Modules/Skins/Blizzard/QuestNavigation.lua
@@ -1,57 +1,56 @@
local C = KkthnxUI[2]
-local abs = math.abs
-local C_Navigation_GetDistance = C_Navigation.GetDistance
+-- Cache frequently used global variables locally
+local TIMER_MINUTES_DISPLAY = TIMER_MINUTES_DISPLAY
+local GetDistance, WasClampedToScreen = C_Navigation.GetDistance, C_Navigation.WasClampedToScreen
-local THROTTLE_INTERVAL = 0.5
-local lastDistance, throttle
+-- Cache math functions
+local math_abs, math_floor = math.abs, math.floor
--- Create a backup of the original function
-local originalGetTargetAlphaBaseValue = _G.SuperTrackedFrame.GetTargetAlphaBaseValue
+-- Variables to keep track of distance and update time
+local lastDistance, lastUpdate = nil, 0
--- Replace the original function with the modified version
-_G.SuperTrackedFrame.GetTargetAlphaBaseValue = function(frame)
- if C_Navigation_GetDistance() > 999 then
- return 1
- else
- return originalGetTargetAlphaBaseValue(frame)
- end
-end
-
-local function onUpdate(self, elapsed)
+local function updateArrival(self, elapsed)
if self.isClamped then
- self.arrival:Hide()
+ self.TimeText:Hide()
lastDistance = nil
return
end
- throttle = (throttle or 0) + elapsed
- if throttle >= THROTTLE_INTERVAL then
- local distance = C_Navigation_GetDistance()
- local speed = lastDistance and (lastDistance - distance) / throttle or 0
+ lastUpdate = lastUpdate + elapsed
+
+ -- Update time display only when distance changes and enough time has passed
+ local distance = GetDistance()
+ if distance ~= lastDistance and lastUpdate >= 0.3 then
+ local speed = (((lastDistance or 0) - distance) / lastUpdate) or 0
lastDistance = distance
if speed > 0 then
- local time = abs(distance / speed)
- self.arrival:SetText(TIMER_MINUTES_DISPLAY:format(time / 60, time % 60))
- self.arrival:Show()
+ local time = math_abs(distance / speed)
+ self.TimeText:SetText(TIMER_MINUTES_DISPLAY:format(math_floor(time / 60), math_floor(time % 60)))
+ self.TimeText:Show()
else
- self.arrival:Hide()
+ self.TimeText:Hide()
end
- throttle = 0
+ lastUpdate = 0
end
end
-local function createArrivalFontString(frame)
- local arrival = frame:CreateFontString("$parentArrival", "BACKGROUND", "GameFontNormal", nil, 1)
- arrival:SetPoint("TOP", frame.DistanceText, "BOTTOM", 0, -2)
- arrival:SetJustifyV("TOP")
- arrival:SetTextColor(0.8, 0.8, 0.8)
- frame.arrival = arrival
+local function updateAlpha(self)
+ if not WasClampedToScreen() and GetDistance() > 0 then
+ self:SetAlpha(0.9)
+ end
end
C.themes["Blizzard_QuestNavigation"] = function()
- createArrivalFontString(SuperTrackedFrame)
- SuperTrackedFrame:HookScript("OnUpdate", onUpdate)
+ local time = SuperTrackedFrame:CreateFontString(nil, "BACKGROUND", "GameFontNormal")
+ time:SetPoint("TOP", SuperTrackedFrame.DistanceText, "BOTTOM", 0, -2)
+ time:SetHeight(20)
+ time:SetJustifyV("TOP")
+
+ SuperTrackedFrame.TimeText = time
+ SuperTrackedFrame:HookScript("OnUpdate", updateArrival)
+
+ hooksecurefunc(SuperTrackedFrame, "UpdateAlpha", updateAlpha)
end
diff --git a/KkthnxUI/Modules/Skins/Blizzard/TradeSkillUI.lua b/KkthnxUI/Modules/Skins/Blizzard/TradeSkillUI.lua
index 52be742a..28535fc8 100644
--- a/KkthnxUI/Modules/Skins/Blizzard/TradeSkillUI.lua
+++ b/KkthnxUI/Modules/Skins/Blizzard/TradeSkillUI.lua
@@ -1,22 +1,30 @@
local K, C = KkthnxUI[1], KkthnxUI[2]
-C.themes["Blizzard_TradeSkillUI"] = function()
+local function SkinTradeSkillFrame()
local rankFrame = TradeSkillFrame.RankFrame
rankFrame:SetStatusBarTexture(K.GetTexture(C["General"].Texture))
- rankFrame.SetStatusBarColor = K.Noop
rankFrame:GetStatusBarTexture():SetGradient("VERTICAL", 0.1, 0.3, 0.9, 0.2, 0.4, 1)
+ rankFrame.SetStatusBarColor = K.Noop
rankFrame.BorderMid:Hide()
rankFrame.BorderLeft:Hide()
rankFrame.BorderRight:Hide()
rankFrame:CreateBorder()
rankFrame.RankText:SetFontObject(K.UIFont)
+end
- -- Fixes trade tabs overlapping 'OptionalReagentList'
+local function AdjustOptionalReagentListPosition()
local reagentList = TradeSkillFrame.OptionalReagentList
reagentList:ClearAllPoints()
- if C["Misc"].TradeTabs then
- reagentList:SetPoint("LEFT", TradeSkillFrame, "RIGHT", 42, 0)
- else
- reagentList:SetPoint("LEFT", TradeSkillFrame, "RIGHT", 2, 0)
+
+ local xOffset = C["Misc"].TradeTabs and 42 or 2
+ reagentList:SetPoint("LEFT", TradeSkillFrame, "RIGHT", xOffset, 0)
+end
+
+C.themes["Blizzard_TradeSkillUI"] = function()
+ if not C["Skins"].BlizzardFrames then
+ return
end
+
+ SkinTradeSkillFrame()
+ AdjustOptionalReagentListPosition()
end
diff --git a/KkthnxUI/Modules/Skins/Core.lua b/KkthnxUI/Modules/Skins/Core.lua
index bbd2fed1..3d5d18bc 100644
--- a/KkthnxUI/Modules/Skins/Core.lua
+++ b/KkthnxUI/Modules/Skins/Core.lua
@@ -79,6 +79,7 @@ function Module:OnEnable()
"LoadDefaultSkins",
"ReskinBartender4",
+ "ReskinNekometer",
-- "ReskinBigWigs",
"ReskinButtonForge",
"ReskinChocolateBar",
diff --git a/KkthnxUI/Modules/Tooltip/Core.lua b/KkthnxUI/Modules/Tooltip/Core.lua
index 6abbd156..8394ff87 100644
--- a/KkthnxUI/Modules/Tooltip/Core.lua
+++ b/KkthnxUI/Modules/Tooltip/Core.lua
@@ -75,10 +75,11 @@ end
function Module:GetLevelLine()
for i = 2, self:NumLines() do
- local tiptext = _G["GameTooltipTextLeft" .. i]
+ local tiptext = _G[self:GetName() .. "TextLeft" .. i]
if not tiptext then
break
end
+
local linetext = tiptext:GetText()
if linetext and strfind(linetext, LEVEL) then
return tiptext
@@ -97,13 +98,13 @@ end
function Module:InsertFactionFrame(faction)
if not self.factionFrame then
local f = self:CreateTexture(nil, "OVERLAY")
- f:SetPoint("TOPRIGHT", 6, -6)
+ f:SetPoint("TOPRIGHT", -10, -10)
f:SetBlendMode("ADD")
- f:SetScale(0.2)
- f:SetAlpha(0.7)
+ -- f:SetScale(0.9)
+ -- f:SetAlpha(0.7)
self.factionFrame = f
end
- self.factionFrame:SetTexture("Interface\\Timer\\" .. faction .. "-Logo")
+ self.factionFrame:SetAtlas("MountJournalIcons-" .. faction, true) -- charcreatetest-logo-horde
self.factionFrame:Show()
end
@@ -163,7 +164,7 @@ function Module:OnTooltipSetUnit()
local name, realm = UnitName(unit)
local pvpName = UnitPVPName(unit)
local relationship = UnitRealmRelationship(unit)
- if not C["Tooltip"].HideTitle and pvpName and pvpName ~= "" then
+ if not C["Tooltip"].HideTitle and pvpName then
name = pvpName
end
diff --git a/KkthnxUI/Modules/Tooltip/Elements/SpecLevel.lua b/KkthnxUI/Modules/Tooltip/Elements/SpecLevel.lua
index 14b8c5c9..e1e1f00c 100644
--- a/KkthnxUI/Modules/Tooltip/Elements/SpecLevel.lua
+++ b/KkthnxUI/Modules/Tooltip/Elements/SpecLevel.lua
@@ -156,20 +156,19 @@ function Module:SetupItemLevel(level)
return
end
- local levelLine
+ local levelLineFound = false
for i = 2, GameTooltip:NumLines() do
- local line = _G["GameTooltipTextLeft" .. i]
+ local line = _G[GameTooltip:GetName() .. "TextLeft" .. i]
local text = line:GetText()
if text and strfind(text, levelPrefix) then
- levelLine = line
+ levelLineFound = true
+ line:SetText(levelPrefix .. (level or isPending))
+ break
end
end
- level = levelPrefix .. (level or isPending)
- if levelLine then
- levelLine:SetText(level)
- else
- GameTooltip:AddLine(level)
+ if not levelLineFound then
+ GameTooltip:AddLine(levelPrefix .. (level or isPending))
end
end
diff --git a/KkthnxUI/Modules/UnitFrames/Core.lua b/KkthnxUI/Modules/UnitFrames/Core.lua
index 4064305a..2a378c9e 100644
--- a/KkthnxUI/Modules/UnitFrames/Core.lua
+++ b/KkthnxUI/Modules/UnitFrames/Core.lua
@@ -123,6 +123,7 @@ function Module:UpdatePhaseIcon(isPhased)
end
function Module:CreateHeader()
+ -- Register for mouse clicks and hook mouse enter/leave events
self:RegisterForClicks("AnyUp")
self:HookScript("OnEnter", function()
UnitFrame_OnEnter(self)
@@ -159,8 +160,39 @@ function Module:ToggleCastBarLatency(frame)
end
end
+-- function Module.auraIconSize(w, n, s)
+-- return (w - (n - 1) * s) / n
+-- end
+
+-- function Module:UpdateAuraContainer(width, element, maxAuras)
+-- local iconsPerRow = element.iconsPerRow
+-- local size = iconsPerRow and Module.auraIconSize(width, iconsPerRow, element.spacing) or element.size
+-- local maxLines = iconsPerRow and K.Round(maxAuras / iconsPerRow) or 2
+
+-- element.size = size
+-- element:SetWidth(width)
+-- element:SetHeight((size + element.spacing) * maxLines)
+-- end
+
+-- function Module:UpdateIconTexCoord(width, height)
+-- local ratio = height / width
+-- local mult = (1 - ratio) / 2
+-- self.Icon:SetTexCoord(K.TexCoords[1], K.TexCoords[2], K.TexCoords[3] + mult, K.TexCoords[4] - mult)
+-- end
+
+-- Cache the result of auraIconSize calculation
+local auraIconSizeCache = {}
+
function Module.auraIconSize(w, n, s)
- return (w - (n - 1) * s) / n
+ if not auraIconSizeCache[w] then
+ auraIconSizeCache[w] = {}
+ end
+
+ if not auraIconSizeCache[w][n] then
+ auraIconSizeCache[w][n] = (w - (n - 1) * s) / n
+ end
+
+ return auraIconSizeCache[w][n]
end
function Module:UpdateAuraContainer(width, element, maxAuras)
@@ -168,9 +200,11 @@ function Module:UpdateAuraContainer(width, element, maxAuras)
local size = iconsPerRow and Module.auraIconSize(width, iconsPerRow, element.spacing) or element.size
local maxLines = iconsPerRow and K.Round(maxAuras / iconsPerRow) or 2
- element.size = size
- element:SetWidth(width)
- element:SetHeight((size + element.spacing) * maxLines)
+ if element.size ~= size or element:GetWidth() ~= width or element:GetHeight() ~= ((size + element.spacing) * maxLines) then
+ element.size = size
+ element:SetWidth(width)
+ element:SetHeight((size + element.spacing) * maxLines)
+ end
end
function Module:UpdateIconTexCoord(width, height)
@@ -186,6 +220,7 @@ function Module.PostCreateButton(element, button)
parentFrame:SetFrameLevel(button:GetFrameLevel() + 3)
button.Count = button.Count or K.CreateFontString(parentFrame, fontSize - 1, "", "OUTLINE", false, "BOTTOMRIGHT", 6, -3)
+
button.Cooldown.noOCC = true
button.Cooldown.noCooldownCount = true
button.Cooldown:SetReverse(true)
@@ -231,18 +266,16 @@ function Module.PostUpdateButton(element, button, unit, data)
local duration, expiration, debuffType = data.duration, data.expirationTime, data.dispelName
local style = element.__owner.mystyle
- if style == "nameplate" then
- button:SetSize(element.size, element.size * 1)
- else
- button:SetSize(element.size, element.size)
- end
+ button:SetSize(style == "nameplate" and element.size or element.size, style == "nameplate" and element.size * 1 or element.size)
+ -- Update appearance based on harmful status and style
if button.isHarmful and filteredStyle[style] and not data.isPlayerAura then
button.Icon:SetDesaturated(true)
else
button.Icon:SetDesaturated(false)
end
+ -- Update border color based on debuff type
if button.isHarmful then
local color = oUF.colors.debuff[debuffType] or oUF.colors.debuff.none
if style == "nameplate" then
@@ -258,10 +291,12 @@ function Module.PostUpdateButton(element, button, unit, data)
end
end
+ -- Show stealable indicator if applicable
if dispellType[debuffType] and not UnitIsPlayer(unit) and not button.isHarmful then
button.Stealable:Show()
end
+ -- Handle cooldown and timer display
if duration and duration > 0 then
button.expiration = expiration
button:SetScript("OnUpdate", K.CooldownOnUpdate)
@@ -271,20 +306,24 @@ function Module.PostUpdateButton(element, button, unit, data)
button.timer:Hide()
end
+ -- Replace icon texture with custom texture if defined
local newTexture = Module.ReplacedSpellIcons[button.spellID]
if newTexture then
button.Icon:SetTexture(newTexture)
end
+ -- Update bolster stacks count if applicable
if element.bolsterInstanceID and element.bolsterInstanceID == button.auraInstanceID then
button.Count:SetText(element.bolsterStacks)
end
end
function Module.AurasPostUpdateInfo(element, _, _, debuffsChanged)
+ -- Ensure consistent variable naming conventions
element.bolsterStacks = 0
element.bolsterInstanceID = nil
+ -- Loop through all buffs to find Bolster stacks
for auraInstanceID, data in next, element.allBuffs do
if data.spellId == 209859 then
if not element.bolsterInstanceID then
@@ -297,6 +336,8 @@ function Module.AurasPostUpdateInfo(element, _, _, debuffsChanged)
end
end
end
+
+ -- Update visible buttons with Bolster stacks
if element.bolsterStacks > 0 then
for i = 1, element.visibleButtons do
local button = element[i]
@@ -307,8 +348,10 @@ function Module.AurasPostUpdateInfo(element, _, _, debuffsChanged)
end
end
+ -- Update Dot status if debuffs changed
if debuffsChanged then
element.hasTheDot = nil
+ -- Check if any player debuff matches Dot spell list
if C["Nameplate"].ColorByDot then
for _, data in next, element.allDebuffs do
if data.isPlayerAura and C["Nameplate"].DotSpellList.Spells[data.spellId] then
@@ -321,27 +364,34 @@ function Module.AurasPostUpdateInfo(element, _, _, debuffsChanged)
end
function Module.CustomFilter(element, unit, data)
+ -- Ensure consistent variable naming conventions
local style = element.__owner.mystyle
local name, debuffType, isStealable, spellID, nameplateShowAll = data.name, data.dispelName, data.isStealable, data.spellId, data.nameplateShowAll
local showDebuffType = C["Unitframe"].OnlyShowPlayerDebuff
+ -- Add comments to clarify the purpose of certain sections
if style == "nameplate" or style == "boss" or style == "arena" then
- if name and spellID == 209859 then -- pass all bolster
+ -- Filter out specific spells
+ if name and spellID == 209859 then -- Pass all bolster
return true
end
+ -- Filter based on nameplate type
if element.__owner.plateType == "NameOnly" then
return C.NameplateWhiteList[spellID]
elseif C.NameplateBlackList[spellID] then
return false
+ -- Filter based on debuff type and dispellability
elseif (isStealable or dispellType[debuffType]) and not UnitIsPlayer(unit) and not data.isHarmful then
return true
elseif C.NameplateWhiteList[spellID] then
return true
else
+ -- Filter based on aura filter settings
local auraFilter = C["Nameplate"].AuraFilter.Value
return (auraFilter == 3 and nameplateShowAll) or (auraFilter ~= 1 and data.isPlayerAura)
end
else
+ -- Filter based on showDebuffType setting
return (showDebuffType and data.isPlayerAura) or (not showDebuffType and name)
end
end
diff --git a/KkthnxUI/Modules/UnitFrames/Elements/Castbar.lua b/KkthnxUI/Modules/UnitFrames/Elements/Castbar.lua
index 5fb8e4f9..af4f86fb 100644
--- a/KkthnxUI/Modules/UnitFrames/Elements/Castbar.lua
+++ b/KkthnxUI/Modules/UnitFrames/Elements/Castbar.lua
@@ -177,22 +177,18 @@ end
local function UpdateCastBarColor(self, unit)
local color = K.Colors.castbar.CastingColor
- -- Check if the casting should be colored with class colors and the unit is a player
+ -- Check if the casting should be colored with class colors or reaction colors
if C["Unitframe"].CastClassColor and UnitIsPlayer(unit) then
local _, class = UnitClass(unit)
color = class and K.Colors.class[class]
-
- -- Check if the casting should be colored with reaction colors
elseif C["Unitframe"].CastReactionColor then
local reaction = UnitReaction(unit, "player")
color = reaction and K.Colors.reaction[reaction]
-
- -- Check if the casting can only be interrupted by the caster
elseif self.notInterruptible and not UnitIsUnit(unit, "player") then
color = K.Colors.castbar.notInterruptibleColor
end
- -- Set the bar color to the color obtained above
+ -- Set the bar color to the obtained color
self:SetStatusBarColor(color[1], color[2], color[3])
end
diff --git a/KkthnxUI/Modules/UnitFrames/Elements/Tags.lua b/KkthnxUI/Modules/UnitFrames/Elements/Tags.lua
index 0de22ca6..3feb7776 100644
--- a/KkthnxUI/Modules/UnitFrames/Elements/Tags.lua
+++ b/KkthnxUI/Modules/UnitFrames/Elements/Tags.lua
@@ -14,7 +14,6 @@ local UnitClass = UnitClass
local UnitClassification = UnitClassification
local UnitEffectiveLevel = UnitEffectiveLevel
local UnitGroupRolesAssigned = UnitGroupRolesAssigned
-local UnitHasVehicleUI = UnitHasVehicleUI
local UnitHealth = UnitHealth
local UnitHealthMax = UnitHealthMax
local UnitIsAFK = UnitIsAFK
@@ -33,35 +32,82 @@ local UnitPowerType = UnitPowerType
local UnitReaction = UnitReaction
local UnitStagger = UnitStagger
-local function ColorPercent(value)
+-- local function ColorPercent(value)
+-- local r, g, b
+-- if value < 20 then
+-- r, g, b = 1, 0.1, 0.1
+-- elseif value < 35 then
+-- r, g, b = 1, 0.5, 0
+-- elseif value < 80 then
+-- r, g, b = 1, 0.9, 0.3
+-- else
+-- r, g, b = 1, 1, 1
+-- end
+
+-- return K.RGBToHex(r, g, b) .. value
+-- end
+
+-- local function ValueAndPercent(cur, per)
+-- if per < 100 then
+-- return K.ShortValue(cur) .. " - " .. ColorPercent(per)
+-- else
+-- return K.ShortValue(cur)
+-- end
+-- end
+
+-- local function GetUnitHealthPerc(unit)
+-- local unitHealth, unitMaxHealth = UnitHealth(unit), UnitHealthMax(unit)
+-- if unitMaxHealth == 0 then
+-- return 0, unitHealth
+-- else
+-- return K.Round(unitHealth / unitMaxHealth * 100, 1), unitHealth
+-- end
+-- end
+
+-- oUF.Tags.Methods["hp"] = function(unit)
+-- if UnitIsDeadOrGhost(unit) or not UnitIsConnected(unit) then
+-- return oUF.Tags.Methods["DDG"](unit)
+-- else
+-- local per, cur = GetUnitHealthPerc(unit)
+-- if unit == "player" or unit == "target" or unit == "focus" or unit == "party" then
+-- return ValueAndPercent(cur, per)
+-- else
+-- return ColorPercent(per)
+-- end
+-- end
+-- end
+-- oUF.Tags.Events["hp"] = "UNIT_HEALTH UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED PARTY_MEMBER_ENABLE PARTY_MEMBER_DISABLE"
+
+local function GetHealthColor(percentage)
local r, g, b
- if value < 20 then
+ if percentage < 20 then
r, g, b = 1, 0.1, 0.1
- elseif value < 35 then
+ elseif percentage < 35 then
r, g, b = 1, 0.5, 0
- elseif value < 80 then
+ elseif percentage < 80 then
r, g, b = 1, 0.9, 0.3
else
r, g, b = 1, 1, 1
end
-
- return K.RGBToHex(r, g, b) .. value
+ return K.RGBToHex(r, g, b) .. percentage
end
-local function ValueAndPercent(cur, per)
- if per < 100 then
- return K.ShortValue(cur) .. " - " .. ColorPercent(per)
+local function FormatHealthValue(health, percentage)
+ local formattedValue = K.ShortValue(health)
+ if percentage < 100 then
+ formattedValue = formattedValue .. " - " .. GetHealthColor(percentage)
else
- return K.ShortValue(cur)
+ formattedValue = formattedValue
end
+ return formattedValue
end
local function GetUnitHealthPerc(unit)
- local unitHealth, unitMaxHealth = UnitHealth(unit), UnitHealthMax(unit)
- if unitMaxHealth == 0 then
- return 0, unitHealth
+ local health, maxHealth = UnitHealth(unit), UnitHealthMax(unit)
+ if maxHealth == 0 then
+ return 0, health
else
- return K.Round(unitHealth / unitMaxHealth * 100, 1), unitHealth
+ return K.Round(health / maxHealth * 100, 1), health
end
end
@@ -69,11 +115,11 @@ oUF.Tags.Methods["hp"] = function(unit)
if UnitIsDeadOrGhost(unit) or not UnitIsConnected(unit) then
return oUF.Tags.Methods["DDG"](unit)
else
- local per, cur = GetUnitHealthPerc(unit)
- if unit == "player" or unit == "target" or unit == "focus" or unit == "party" then
- return ValueAndPercent(cur, per)
+ local percentage, currentHealth = GetUnitHealthPerc(unit)
+ if unit == "player" or unit == "target" or unit == "focus" or unit:match("party%d?$") then
+ return FormatHealthValue(currentHealth, percentage)
else
- return ColorPercent(per)
+ return GetHealthColor(percentage)
end
end
end
@@ -122,6 +168,17 @@ oUF.Tags.Methods["afkdnd"] = function(unit)
end
oUF.Tags.Events["afkdnd"] = "PLAYER_FLAGS_CHANGED"
+-- oUF.Tags.Methods["DDG"] = function(unit)
+-- if UnitIsDead(unit) then
+-- return "|cffCFCFCF" .. DEAD .. "|r"
+-- elseif UnitIsGhost(unit) then
+-- return "|cffCFCFCF" .. L["Ghost"] .. "|r"
+-- elseif not UnitIsConnected(unit) and GetNumArenaOpponentSpecs() == 0 then
+-- return "|cffCFCFCF" .. PLAYER_OFFLINE .. "|r"
+-- end
+-- end
+-- oUF.Tags.Events["DDG"] = "UNIT_HEALTH UNIT_MAXHEALTH UNIT_NAME_UPDATE UNIT_CONNECTION PLAYER_FLAGS_CHANGED"
+
oUF.Tags.Methods["DDG"] = function(unit)
if UnitIsDead(unit) then
return "|cffCFCFCF" .. DEAD .. "|r"
@@ -129,9 +186,16 @@ oUF.Tags.Methods["DDG"] = function(unit)
return "|cffCFCFCF" .. L["Ghost"] .. "|r"
elseif not UnitIsConnected(unit) and GetNumArenaOpponentSpecs() == 0 then
return "|cffCFCFCF" .. PLAYER_OFFLINE .. "|r"
+ elseif UnitIsAFK(unit) then
+ return "|cffCFCFCF <" .. AFK .. ">|r"
+ elseif UnitIsDND(unit) then
+ return "|cffCFCFCF <" .. DND .. ">|r"
+ else
+ return ""
end
end
-oUF.Tags.Events["DDG"] = "UNIT_HEALTH UNIT_MAXHEALTH UNIT_NAME_UPDATE UNIT_CONNECTION PLAYER_FLAGS_CHANGED"
+
+oUF.Tags.Events["DDG"] = "PLAYER_FLAGS_CHANGED UNIT_HEALTH UNIT_MAXHEALTH UNIT_NAME_UPDATE UNIT_CONNECTION"
-- Level tags
oUF.Tags.Methods["fulllevel"] = function(unit)
@@ -177,7 +241,7 @@ oUF.Tags.Methods["raidhp"] = function(unit)
return oUF.Tags.Methods["DDG"](unit)
elseif C["Raid"].HealthFormat.Value == 2 then
local per = GetUnitHealthPerc(unit) or 0
- return ColorPercent(per)
+ return GetHealthColor(per)
elseif C["Raid"].HealthFormat.Value == 3 then
local cur = UnitHealth(unit)
return K.ShortValue(cur)
@@ -195,9 +259,9 @@ oUF.Tags.Events["raidhp"] = "UNIT_HEALTH UNIT_MAXHEALTH UNIT_NAME_UPDATE UNIT_CO
oUF.Tags.Methods["nphp"] = function(unit)
local per, cur = GetUnitHealthPerc(unit)
if C["Nameplate"].FullHealth then
- return ValueAndPercent(cur, per)
+ return FormatHealthValue(cur, per)
elseif per < 100 then
- return ColorPercent(per)
+ return GetHealthColor(per)
end
end
oUF.Tags.Events["nphp"] = "UNIT_HEALTH UNIT_MAXHEALTH UNIT_CONNECTION"
@@ -246,10 +310,10 @@ end
oUF.Tags.Events["nplevel"] = "UNIT_LEVEL PLAYER_LEVEL_UP UNIT_CLASSIFICATION_CHANGED"
local NPClassifies = {
- rare = " ",
- elite = " ",
- rareelite = " ",
- worldboss = " ",
+ rare = " ",
+ elite = " ",
+ rareelite = " ",
+ worldboss = " ",
}
oUF.Tags.Methods["nprare"] = function(unit)
local class = UnitClassification(unit)
@@ -334,7 +398,7 @@ oUF.Tags.Events["monkstagger"] = "UNIT_MAXHEALTH UNIT_AURA"
oUF.Tags.Methods["lfdrole"] = function(unit)
local role = UnitGroupRolesAssigned(unit)
- if IsInGroup() and (UnitInParty(unit) or UnitInRaid(unit)) and (role ~= "NONE" or role ~= "DAMAGER") then
+ if IsInGroup() and (UnitInParty(unit) or UnitInRaid(unit)) and (role ~= "NONE" and role ~= "DAMAGER") then
if role == "HEALER" then
return "|TInterface\\LFGFrame\\LFGRole:12:12:-1:1:64:16:48:64:0:16|t"
elseif role == "TANK" then
diff --git a/KkthnxUI/Modules/UnitFrames/Groups/Party.lua b/KkthnxUI/Modules/UnitFrames/Groups/Party.lua
index 373e0057..23d4174d 100644
--- a/KkthnxUI/Modules/UnitFrames/Groups/Party.lua
+++ b/KkthnxUI/Modules/UnitFrames/Groups/Party.lua
@@ -17,8 +17,10 @@ function Module:CreateParty()
local HealPredictionTexture = K.GetTexture(C["General"].Texture)
local Overlay = CreateFrame("Frame", nil, self) -- We will use this to overlay onto our special borders.
- Overlay:SetAllPoints()
+ Overlay:SetFrameStrata(self:GetFrameStrata())
Overlay:SetFrameLevel(6)
+ Overlay:SetAllPoints()
+ Overlay:EnableMouse(false)
Module.CreateHeader(self)
@@ -166,7 +168,7 @@ function Module:CreateParty()
Debuffs.num = 5
Debuffs.iconsPerRow = 5
- Module:UpdateAuraContainer(partyWidth - 10, Debuffs, Debuffs.num)
+ Module:UpdateAuraContainer(partyWidth - 14, Debuffs, Debuffs.num)
Debuffs.PostCreateButton = Module.PostCreateButton
Debuffs.PostUpdateButton = Module.PostUpdateButton
@@ -312,15 +314,15 @@ function Module:CreateParty()
end
local LeaderIndicator = Overlay:CreateTexture(nil, "OVERLAY")
- LeaderIndicator:SetSize(12, 12)
+ LeaderIndicator:SetSize(15, 15)
if partyPortraitStyle == "NoPortraits" or partyPortraitStyle == "OverlayPortrait" then
- LeaderIndicator:SetPoint("TOPLEFT", Health, 0, 8)
+ LeaderIndicator:SetPoint("TOPLEFT", Health, 0, 10)
else
- LeaderIndicator:SetPoint("TOPLEFT", self.Portrait, 0, 8)
+ LeaderIndicator:SetPoint("TOPLEFT", self.Portrait, 0, 10)
end
local AssistantIndicator = Overlay:CreateTexture(nil, "OVERLAY")
- AssistantIndicator:SetSize(12, 12)
+ AssistantIndicator:SetSize(15, 15)
if partyPortraitStyle == "NoPortraits" or partyPortraitStyle == "OverlayPortrait" then
AssistantIndicator:SetPoint("TOPLEFT", Health, 0, 8)
else
@@ -338,7 +340,7 @@ function Module:CreateParty()
PhaseIndicator.PostUpdate = Module.UpdatePhaseIcon
local SummonIndicator = Health:CreateTexture(nil, "OVERLAY")
- SummonIndicator:SetSize(20, 20)
+ SummonIndicator:SetSize(30, 30)
SummonIndicator:SetPoint("LEFT", 2, 0)
local RaidTargetIndicator = Overlay:CreateTexture(nil, "OVERLAY")
diff --git a/KkthnxUI/Modules/UnitFrames/Groups/Raid.lua b/KkthnxUI/Modules/UnitFrames/Groups/Raid.lua
index 7f56b81f..a7dedd07 100644
--- a/KkthnxUI/Modules/UnitFrames/Groups/Raid.lua
+++ b/KkthnxUI/Modules/UnitFrames/Groups/Raid.lua
@@ -178,9 +178,11 @@ function Module:CreateRaid()
Name:SetWordWrap(false)
self:Tag(Name, "[lfdrole][name]")
- local Overlay = CreateFrame("Frame", nil, self)
- Overlay:SetAllPoints(Health)
+ local Overlay = CreateFrame("Frame", nil, self) -- We will use this to overlay onto our special borders.
+ Overlay:SetFrameStrata(self:GetFrameStrata())
Overlay:SetFrameLevel(self:GetFrameLevel() + 4)
+ Overlay:SetAllPoints(Health)
+ Overlay:EnableMouse(false)
local ReadyCheckIndicator = Overlay:CreateTexture(nil, "OVERLAY", nil, 2)
ReadyCheckIndicator:SetSize(22, 22)
@@ -205,23 +207,24 @@ function Module:CreateRaid()
ResurrectIndicator:SetPoint("CENTER", 0, -3)
local LeaderIndicator = Overlay:CreateTexture(nil, "OVERLAY")
+ LeaderIndicator:SetTexCoord(0, 1, 0, 1) -- NEW?
LeaderIndicator:SetPoint("TOPLEFT", Health, 0, 8)
- LeaderIndicator:SetSize(12, 12)
+ LeaderIndicator:SetSize(14, 14)
local AssistantIndicator = Overlay:CreateTexture(nil, "OVERLAY")
AssistantIndicator:SetPoint("TOPLEFT", Health, 0, 8)
- AssistantIndicator:SetSize(12, 12)
-
- if C["Raid"].ShowNotHereTimer then
- local StatusIndicator = self:CreateFontString(nil, "OVERLAY")
- StatusIndicator:SetPoint("CENTER", Overlay, "BOTTOM", 0, 6)
- StatusIndicator:SetFontObject(K.UIFont)
- StatusIndicator:SetFont(select(1, StatusIndicator:GetFont()), 10, select(3, StatusIndicator:GetFont()))
- StatusIndicator:SetTextColor(1, 0, 0)
- self:Tag(StatusIndicator, "[afkdnd]")
-
- self.StatusIndicator = StatusIndicator
- end
+ AssistantIndicator:SetSize(14, 14)
+
+ -- if C["Raid"].ShowNotHereTimer then
+ -- local StatusIndicator = self:CreateFontString(nil, "OVERLAY")
+ -- StatusIndicator:SetPoint("CENTER", Overlay, "BOTTOM", 0, 6)
+ -- StatusIndicator:SetFontObject(K.UIFont)
+ -- StatusIndicator:SetFont(select(1, StatusIndicator:GetFont()), 10, select(3, StatusIndicator:GetFont()))
+ -- StatusIndicator:SetTextColor(1, 0, 0)
+ -- self:Tag(StatusIndicator, "[status]")
+
+ -- self.StatusIndicator = StatusIndicator
+ -- end
if C["Raid"].RaidBuffsStyle.Value == "Aura Track" then
local AuraTrack = CreateFrame("Frame", nil, Health)
diff --git a/KkthnxUI/Modules/UnitFrames/Units/Arena.lua b/KkthnxUI/Modules/UnitFrames/Units/Arena.lua
index b876f596..8cf382ba 100644
--- a/KkthnxUI/Modules/UnitFrames/Units/Arena.lua
+++ b/KkthnxUI/Modules/UnitFrames/Units/Arena.lua
@@ -78,15 +78,15 @@ function Module:CreateArena()
self.Name:SetFontObject(K.UIFont)
if arenaPortraitStyle == "NoPortraits" or arenaPortraitStyle == "OverlayPortrait" then
if C["Unitframe"].HealthbarColor.Value == "Class" then
- self:Tag(self.Name, "[name] [nplevel][afkdnd]")
+ self:Tag(self.Name, "[name] [nplevel]")
else
- self:Tag(self.Name, "[color][name] [nplevel][afkdnd]")
+ self:Tag(self.Name, "[color][name] [nplevel]")
end
else
if C["Unitframe"].HealthbarColor.Value == "Class" then
- self:Tag(self.Name, "[name][afkdnd]")
+ self:Tag(self.Name, "[name]")
else
- self:Tag(self.Name, "[color][name][afkdnd]")
+ self:Tag(self.Name, "[color][name]")
end
end
diff --git a/KkthnxUI/Modules/UnitFrames/Units/Focus.lua b/KkthnxUI/Modules/UnitFrames/Units/Focus.lua
index 9832890a..06892c50 100644
--- a/KkthnxUI/Modules/UnitFrames/Units/Focus.lua
+++ b/KkthnxUI/Modules/UnitFrames/Units/Focus.lua
@@ -299,11 +299,11 @@ function Module:CreateFocus()
end
self.LeaderIndicator = self.Overlay:CreateTexture(nil, "OVERLAY")
- self.LeaderIndicator:SetSize(12, 12)
+ self.LeaderIndicator:SetSize(16, 16)
if focusPortraitStyle == "NoPortraits" then
- self.LeaderIndicator:SetPoint("TOPRIGHT", self.Health, 0, 8)
+ self.LeaderIndicator:SetPoint("TOPRIGHT", self.Health, 0, 10)
else
- self.LeaderIndicator:SetPoint("TOPRIGHT", self.Portrait, 0, 8)
+ self.LeaderIndicator:SetPoint("TOPRIGHT", self.Portrait, 0, 10)
end
self.RaidTargetIndicator = self.Overlay:CreateTexture(nil, "OVERLAY")
diff --git a/KkthnxUI/Modules/UnitFrames/Units/Nameplates.lua b/KkthnxUI/Modules/UnitFrames/Units/Nameplates.lua
index b491eb60..42ba343c 100644
--- a/KkthnxUI/Modules/UnitFrames/Units/Nameplates.lua
+++ b/KkthnxUI/Modules/UnitFrames/Units/Nameplates.lua
@@ -71,14 +71,14 @@ function Module:UpdatePlateCVars()
return
end
- local topInset, bottomInset = -1, -1
if C["Nameplate"].InsideView then
- topInset, bottomInset = 0.05, 0.08
+ SetCVar("nameplateOtherTopInset", 0.05)
+ SetCVar("nameplateOtherBottomInset", 0.08)
+ elseif GetCVar("nameplateOtherTopInset") == "0.05" and GetCVar("nameplateOtherBottomInset") == "0.08" then
+ SetCVar("nameplateOtherTopInset", -1)
+ SetCVar("nameplateOtherBottomInset", -1)
end
- SetCVar("nameplateOtherTopInset", topInset)
- SetCVar("nameplateOtherBottomInset", bottomInset)
-
local settings = {
namePlateMinScale = C["Nameplate"].MinScale,
namePlateMaxScale = C["Nameplate"].MinScale,
@@ -100,8 +100,11 @@ function Module:UpdateClickableSize()
end
local uiScale = C["General"].UIScale
- C_NamePlate_SetNamePlateEnemySize(C["Nameplate"].HarmWidth * uiScale, C["Nameplate"].HarmHeight * uiScale)
- C_NamePlate_SetNamePlateFriendlySize(C["Nameplate"].HelpWidth * uiScale, C["Nameplate"].HelpHeight * uiScale)
+ local harmWidth, harmHeight = C["Nameplate"].HarmWidth, C["Nameplate"].HarmHeight
+ local helpWidth, helpHeight = C["Nameplate"].HelpWidth, C["Nameplate"].HelpHeight
+
+ C_NamePlate_SetNamePlateEnemySize(harmWidth * uiScale, harmHeight * uiScale)
+ C_NamePlate_SetNamePlateFriendlySize(helpWidth * uiScale, helpHeight * uiScale)
end
function Module:UpdatePlateClickThru()
@@ -116,15 +119,15 @@ end
function Module:SetupCVars()
Module:UpdatePlateCVars()
local settings = {
- nameplateOverlapH = 0.8,
- nameplateSelectedAlpha = 1,
- showQuestTrackingTooltips = 1,
- nameplateSelectedScale = 1,
- nameplateLargerScale = 1,
- nameplateGlobalScale = 1,
- nameplateShowSelf = 0,
- nameplateResourceOnTarget = 0,
- nameplatePlayerMaxDistance = 60,
+ nameplateOverlapH = 0.8, -- Controls the horizontal overlap of nameplates. A lower value means nameplates will be more spaced out horizontally.
+ nameplateSelectedAlpha = 1, -- Sets the transparency level for the selected nameplate (the one currently targeted). A value of 1 means fully opaque.
+ showQuestTrackingTooltips = 1, -- Enables (1) or disables (0) the display of quest-related information in tooltips.
+ nameplateSelectedScale = 1.1, -- Determines the scale of the selected nameplate. A value greater than 1 enlarges the nameplate.
+ nameplateLargerScale = 1.1, -- Adjusts the scale of larger nameplates, such as for bosses or important enemies. Default is 1 (normal size).
+ nameplateGlobalScale = 1, -- Sets the overall scale for all nameplates. Default is 1 (normal size).
+ nameplateShowSelf = 0, -- Toggles the visibility of the player's own nameplate. 0 means the player's nameplate will not be shown.
+ nameplateResourceOnTarget = 0, -- Controls whether class resources (e.g., combo points, runes) are displayed on the target's nameplate. 0 means resources are shown below the character, not on the target.
+ nameplatePlayerMaxDistance = 60, -- Sets the maximum distance at which player nameplates are visible. The default value is 60 yards.
}
for cvar, value in pairs(settings) do
@@ -288,7 +291,26 @@ function Module:UpdateColor(_, unit)
elseif UnitIsTapDenied(unit) and not UnitPlayerControlled(unit) or C.NameplateTrashUnits[npcID] then
r, g, b = 0.6, 0.6, 0.6
else
- r, g, b = K.UnitColor(unit)
+ -- Ill work on this later, I have an idea how I want to handle it.
+ local selectionType = UnitSelectionType(unit, true)
+ -- print(selectionType)
+ if selectionType == 1 then -- Hostile or Unfriendly -- Dumbass orange color.
+ r, g, b = 0.87, 0.44, 0.20
+ else
+ r, g, b = K.UnitColor(unit)
+ end
+
+ -- [0] = { 1.00, 0.18, 0.18 }, -- HOSTILE
+ -- [1] = { 1.00, 0.51, 0.20 }, -- UNFRIENDLY
+ -- [2] = { 1.00, 0.85, 0.20 }, -- NEUTRAL
+ -- [3] = { 0.20, 0.71, 0.00 }, -- FRIENDLY
+ -- [5] = { 0.40, 0.53, 1.00 }, -- PLAYER_EXTENDED
+ -- [6] = { 0.40, 0.20, 1.00 }, -- PARTY
+ -- [7] = { 0.73, 0.20, 1.00 }, -- PARTY_PVP
+ -- [8] = { 0.20, 1.00, 0.42 }, -- FRIEND
+ -- [9] = { 0.60, 0.60, 0.60 }, -- DEAD
+ -- [13] = { 0.10, 0.58, 0.28 }, -- BATTLEGROUND_FRIENDLY_PVP
+
if status and (C["Nameplate"].TankMode or K.Role == "Tank") then
if status == 3 then
if K.Role ~= "Tank" and revertThreat then
@@ -484,16 +506,15 @@ function Module:UpdateQuestUnit(_, unit)
end
unit = unit or self.unit
-
- local questProgress
+ local startLooking, isLootQuest, questProgress -- FIXME: isLootQuest in old expansion
local prevDiff = 0
- local data = C_TooltipInfo.GetUnit(unit)
+ local data = C_TooltipInfo.GetUnit(unit)
if data then
for i = 1, #data.lines do
local lineData = data.lines[i]
if lineData.type == 8 then
- local text = lineData.leftText
+ local text = lineData.leftText -- progress string
if text then
local current, goal = strmatch(text, "(%d+)/(%d+)")
local progress = strmatch(text, "(%d+)%%")
@@ -504,8 +525,9 @@ function Module:UpdateQuestUnit(_, unit)
prevDiff = diff
end
elseif progress and prevDiff == 0 then
- questProgress = progress .. "%"
- break -- Exit loop if progress is found
+ if floor(100 - progress) > 0 then
+ questProgress = progress .. "%" -- lower priority on progress, keep looking
+ end
end
end
end
@@ -514,11 +536,16 @@ function Module:UpdateQuestUnit(_, unit)
if questProgress then
self.questCount:SetText(questProgress)
- self.questIcon:SetAtlas("pvptalents-warmode-swords")
+ self.questIcon:SetAtlas("UI-HUD-MicroMenu-Questlog-Up")
self.questIcon:Show()
else
self.questCount:SetText("")
- self.questIcon:Hide()
+ if isLootQuest then
+ self.questIcon:SetAtlas("adventureguide-microbutton-alert")
+ self.questIcon:Show()
+ else
+ self.questIcon:Hide()
+ end
end
end
@@ -528,13 +555,13 @@ function Module:AddQuestIcon(self)
end
self.questIcon = self:CreateTexture(nil, "OVERLAY", nil, 2)
- self.questIcon:SetPoint("LEFT", self, "RIGHT", 3, 0)
- self.questIcon:SetSize(28, 25)
- self.questIcon:SetAtlas("QuestNormal")
+ self.questIcon:SetPoint("LEFT", self, "RIGHT", -6, 0)
+ self.questIcon:SetSize(26, 32)
+ self.questIcon:SetAtlas("adventureguide-microbutton-alert")
self.questIcon:Hide()
- self.questCount = K.CreateFontString(self, 13, "", "", nil, "LEFT", 0, 0)
- self.questCount:SetPoint("LEFT", self.questIcon, "RIGHT", -1, 0)
+ self.questCount = K.CreateFontString(self, 14, "", nil, "LEFT", 0, 0)
+ self.questCount:SetPoint("LEFT", self.questIcon, "RIGHT", -3, 0)
self:RegisterEvent("QUEST_LOG_UPDATE", Module.UpdateQuestUnit, true)
end
@@ -629,7 +656,7 @@ end
function Module:AddCreatureIcon(self)
local ClassifyIndicator = self:CreateTexture(nil, "ARTWORK")
ClassifyIndicator:SetTexture(K.MediaFolder .. "Nameplates\\star")
- ClassifyIndicator:SetPoint("RIGHT", self.nameText, "LEFT", -2, 1)
+ ClassifyIndicator:SetPoint("RIGHT", self.nameText, "LEFT", 10, 0)
ClassifyIndicator:SetSize(16, 16)
ClassifyIndicator:Hide()
@@ -810,7 +837,7 @@ function Module:CreatePlates()
self.Castbar = CreateFrame("StatusBar", "oUF_CastbarNameplate", self)
self.Castbar:SetPoint("TOPLEFT", self, "BOTTOMLEFT", 0, -3)
self.Castbar:SetPoint("TOPRIGHT", self, "BOTTOMRIGHT", 0, -3)
- self.Castbar:SetHeight(self:GetHeight())
+ self.Castbar:SetHeight(self:GetHeight() + 6)
self.Castbar:SetStatusBarTexture(K.GetTexture(C["General"].Texture))
self.Castbar:SetFrameLevel(10)
self.Castbar:CreateShadow(true)
@@ -1024,10 +1051,10 @@ function Module:UpdateNameplateSize()
--self.nameText:SetFont(select(1, KkthnxUIFont:GetFont()), nameTextSize, "")
if self.plateType == "NameOnly" then
- self:Tag(self.nameText, "[nprare] [color][name] [nplevel]")
+ self:Tag(self.nameText, "[nprare][color][name] [nplevel]")
self.npcTitle:UpdateTag()
else
- self:Tag(self.nameText, "[name]")
+ self:Tag(self.nameText, "[nprare][name]")
end
-- self.npcTitle:SetFont(select(1, KkthnxUIFont:GetFont()), nameTextSize - 1, "")
@@ -1047,7 +1074,7 @@ end
function Module:RefreshNameplats()
for nameplate in pairs(platesList) do
- --Module.UpdateNameplateSize(nameplate)
+ Module.UpdateNameplateSize(nameplate)
Module.UpdateUnitClassify(nameplate)
Module.UpdateNameplateAuras(nameplate)
Module.UpdateTargetIndicator(nameplate)
@@ -1080,8 +1107,8 @@ function Module:UpdatePlateByType()
name:SetShown(not self.widgetsOnly)
name:ClearAllPoints()
- self:Tag(self.nameText, "[nprare] [color][name] [nplevel]")
- self.npcTitle:UpdateTag()
+ -- self:Tag(self.nameText, "[nprare] [color][name] [nplevel]")
+ -- self.npcTitle:UpdateTag()
raidtarget:ClearAllPoints()
if self.plateType == "NameOnly" then
@@ -1102,7 +1129,7 @@ function Module:UpdatePlateByType()
raidtarget:SetPoint("BOTTOM", name, "TOP", 0, 6)
if questIcon then
- questIcon:SetPoint("LEFT", name, "RIGHT", 0, 0)
+ questIcon:SetPoint("LEFT", name, "RIGHT", -6, 0)
end
if self.widgetContainer then
@@ -1119,7 +1146,7 @@ function Module:UpdatePlateByType()
name:SetJustifyH("LEFT")
name:SetPoint("BOTTOMLEFT", self, "TOPLEFT", 0, 4)
name:SetPoint("BOTTOMRIGHT", level, "TOPRIGHT", -21, 4)
- self:Tag(self.nameText, "[name]")
+ -- self:Tag(self.nameText, "[name]")
level:Show()
hpval:Show()
@@ -1138,7 +1165,7 @@ function Module:UpdatePlateByType()
end
end
- --Module.UpdateNameplateSize(self)
+ Module.UpdateNameplateSize(self)
Module.UpdateTargetIndicator(self)
Module.ToggleNameplateAuras(self)
end
diff --git a/KkthnxUI/Modules/UnitFrames/Units/Pet.lua b/KkthnxUI/Modules/UnitFrames/Units/Pet.lua
index 44bef2db..9594653f 100644
--- a/KkthnxUI/Modules/UnitFrames/Units/Pet.lua
+++ b/KkthnxUI/Modules/UnitFrames/Units/Pet.lua
@@ -16,8 +16,10 @@ function Module:CreatePet()
local UnitframeTexture = K.GetTexture(C["General"].Texture)
local Overlay = CreateFrame("Frame", nil, self) -- We will use this to overlay onto our special borders.
- Overlay:SetAllPoints()
+ Overlay:SetFrameStrata(self:GetFrameStrata())
Overlay:SetFrameLevel(5)
+ Overlay:SetAllPoints()
+ Overlay:EnableMouse(false)
Module.CreateHeader(self)
diff --git a/KkthnxUI/Modules/UnitFrames/Units/Player.lua b/KkthnxUI/Modules/UnitFrames/Units/Player.lua
index 35619bf3..e37276b8 100644
--- a/KkthnxUI/Modules/UnitFrames/Units/Player.lua
+++ b/KkthnxUI/Modules/UnitFrames/Units/Player.lua
@@ -43,8 +43,10 @@ function Module:CreatePlayer()
local HealPredictionTexture = K.GetTexture(C["General"].Texture)
local Overlay = CreateFrame("Frame", nil, self) -- We will use this to overlay onto our special borders.
- Overlay:SetAllPoints()
+ Overlay:SetFrameStrata(self:GetFrameStrata())
Overlay:SetFrameLevel(5)
+ Overlay:SetAllPoints()
+ Overlay:EnableMouse(false)
Module.CreateHeader(self)
@@ -460,15 +462,15 @@ function Module:CreatePlayer()
end
local LeaderIndicator = Overlay:CreateTexture(nil, "OVERLAY")
- LeaderIndicator:SetSize(12, 12)
+ LeaderIndicator:SetSize(16, 16)
if playerPortraitStyle ~= "NoPortraits" and playerPortraitStyle ~= "OverlayPortrait" then
- LeaderIndicator:SetPoint("TOPLEFT", self.Portrait, 0, 8)
+ LeaderIndicator:SetPoint("TOPLEFT", self.Portrait, 0, 10)
else
- LeaderIndicator:SetPoint("TOPLEFT", Health, 0, 8)
+ LeaderIndicator:SetPoint("TOPLEFT", Health, 0, 10)
end
local AssistantIndicator = Overlay:CreateTexture(nil, "OVERLAY")
- AssistantIndicator:SetSize(12, 12)
+ AssistantIndicator:SetSize(16, 16)
if playerPortraitStyle ~= "NoPortraits" and playerPortraitStyle ~= "OverlayPortrait" then
AssistantIndicator:SetPoint("TOPLEFT", self.Portrait, 0, 8)
else
diff --git a/KkthnxUI/Modules/UnitFrames/Units/Target.lua b/KkthnxUI/Modules/UnitFrames/Units/Target.lua
index 2fae1742..92a6052c 100644
--- a/KkthnxUI/Modules/UnitFrames/Units/Target.lua
+++ b/KkthnxUI/Modules/UnitFrames/Units/Target.lua
@@ -27,8 +27,10 @@ function Module:CreateTarget()
Health:CreateBorder()
local Overlay = CreateFrame("Frame", nil, self) -- We will use this to overlay onto our special borders.
- Overlay:SetAllPoints(Health)
- Overlay:SetFrameLevel(5)
+ Overlay:SetFrameStrata(self:GetFrameStrata())
+ Overlay:SetFrameLevel(6)
+ Overlay:SetAllPoints()
+ Overlay:EnableMouse(false)
Health.colorTapping = true
Health.colorDisconnected = true
@@ -341,11 +343,19 @@ function Module:CreateTarget()
end
local LeaderIndicator = Overlay:CreateTexture(nil, "OVERLAY")
- LeaderIndicator:SetSize(12, 12)
+ LeaderIndicator:SetSize(16, 16)
if targetPortraitStyle ~= "NoPortraits" and targetPortraitStyle ~= "OverlayPortrait" then
- LeaderIndicator:SetPoint("TOPRIGHT", self.Portrait, 0, 8)
+ LeaderIndicator:SetPoint("TOPRIGHT", self.Portrait, 0, 10)
else
- LeaderIndicator:SetPoint("TOPRIGHT", Health, 0, 8)
+ LeaderIndicator:SetPoint("TOPRIGHT", Health, 0, 10)
+ end
+
+ local AssistantIndicator = Overlay:CreateTexture(nil, "OVERLAY")
+ AssistantIndicator:SetSize(16, 16)
+ if AssistantIndicator ~= "NoPortraits" and targetPortraitStyle ~= "OverlayPortrait" then
+ AssistantIndicator:SetPoint("TOPRIGHT", self.Portrait, 0, 10)
+ else
+ AssistantIndicator:SetPoint("TOPRIGHT", Health, 0, 10)
end
local RaidTargetIndicator = Overlay:CreateTexture(nil, "OVERLAY")
@@ -410,6 +420,7 @@ function Module:CreateTarget()
self.Name = Name
self.Level = Level
self.LeaderIndicator = LeaderIndicator
+ self.AssistantIndicator = AssistantIndicator
self.RaidTargetIndicator = RaidTargetIndicator
self.ReadyCheckIndicator = ReadyCheckIndicator
self.ResurrectIndicator = ResurrectIndicator
diff --git a/KkthnxUI/Modules/UnitFrames/Units/TargetOfTarget.lua b/KkthnxUI/Modules/UnitFrames/Units/TargetOfTarget.lua
index 01692ed1..3511bbe1 100644
--- a/KkthnxUI/Modules/UnitFrames/Units/TargetOfTarget.lua
+++ b/KkthnxUI/Modules/UnitFrames/Units/TargetOfTarget.lua
@@ -11,8 +11,10 @@ function Module:CreateTargetOfTarget()
local targetOfTargetPortraitStyle = C["Unitframe"].PortraitStyle.Value
local Overlay = CreateFrame("Frame", nil, self) -- We will use this to overlay onto our special borders.
+ Overlay:SetFrameStrata(self:GetFrameStrata())
+ Overlay:SetFrameLevel(6)
Overlay:SetAllPoints()
- Overlay:SetFrameLevel(5)
+ Overlay:EnableMouse(false)
Module.CreateHeader(self)
diff --git a/KkthnxUI/Taintless.xml b/KkthnxUI/Taintless.xml
index 04964ec0..d6fdc05f 100644
--- a/KkthnxUI/Taintless.xml
+++ b/KkthnxUI/Taintless.xml
@@ -1,6 +1,6 @@
\ No newline at end of file