Skip to content

Commit

Permalink
Merge pull request #64 from rookdorf/dragonflight
Browse files Browse the repository at this point in the history
Initial Dragonflight Update
  • Loading branch information
rookdorf authored Aug 23, 2023
2 parents 6cfd42e + f5c73e9 commit e146e74
Show file tree
Hide file tree
Showing 14 changed files with 98 additions and 25 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Libs/*
Libs/*
.release
.idea
2 changes: 1 addition & 1 deletion ArcHUD3.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 90002
## Interface: 100105
## Title: ArcHUD3
## Notes: Smooth combat HUD based on ArcHUD2
## Author: nyyr, Nenie
Expand Down
3 changes: 2 additions & 1 deletion Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@ ArcHUD.configOptionsTableCmd = {
return debugLevels[ArcHUD:GetDebugLevel() or 4]
end,
set = function(info, v)
if (v == 1) then
if (v == 4) then
ArcHUD:SetDebugLevel(nil)
ArcHUD.db.profile.Debug = nil
ArcHUD:Printf(L["CMD_OPTS_DEBUG_SET"], "off")
else
ArcHUD:SetDebugLevel(v)
ArcHUD.db.profile.Debug = v
Expand Down
4 changes: 2 additions & 2 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ end
-- Set debug level
----------------------------------------------
function ArcHUD:SetDebugLevel(level)
if (level == nil) or (level >= 0 and level < 4) then
if (level == nil) or (level > 0 and level <= 4) then
local levelName = "off"
if (level ~= nil) then
levelName = debugLevels[level]
self:Printf(L["CMD_OPTS_DEBUG_SET"], levelName)
end
self:Printf(L["CMD_OPTS_DEBUG_SET"], levelName)
self.db.global.debugLevel = level
else
self:Print("Invalid debug level: "..level)
Expand Down
3 changes: 3 additions & 0 deletions Locales/deDE.lua
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ L["TOOLTIP"] = {
CHICOMBO = "Schaltet Anzeige von Chi (Mönch) als Kombopunkte ein/aus (die Anzeige von Kombopunkten muss aktiviert sein)",
RUNECOMBO = "Schaltet Anzeige von Runen (Todesritter) als Kombopunkte ein/aus (die Anzeige von Kombopunkten muss aktiviert sein)",
SOULFRAGMENTCOMBO = "Schaltet Anzeige von Seelenfragmenten (Dämonenjäger) als Kombopunkte ein/aus (die Anzeige von Kombopunkten muss aktiviert sein)",
ESSENCECOMBO = "Schaltet Anzeige von Essenz (Rufer) als Kombopunkte ein/aus (die Anzeige von Kombopunkten muss aktiviert sein)",

CPCOLOR = "Setzt die Textfarbe für Kombopunkte",
CPCOLORDECAY = "Setzt die Farbe von verfallenden Kombopunkten des letzten Ziels",
RESETCOLORS = "Setzt die Farben auf ihre Standardeinstellungen zurück",
Expand Down Expand Up @@ -219,6 +221,7 @@ LM["SoulShards"] = "Hexenmeister: Seelensplitter etc."
LM["Chi"] = "Mönch: Chi"
LM["Stagger"] = "Mönch: Staffelung"
LM["Runes"] = "Todesritter: Runen"
LM["Essence"] = "Rufer: Essenz"
LM["ManaShadowPriest"] = "Priester: Mana (Schattenpriester)"
LM["ManaBalanceDruid"] = "Druide: Mana (Gleichgewichtsdruide)"
LM["ManaDruid"] = "Druide: Mana (Katzen-/Bärengestalt)"
Expand Down
4 changes: 3 additions & 1 deletion Locales/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ L["TOOLTIP"] = {
HOLYPOWERCOMBO = "Toggle display of Paladin's Holy Power points as combo points (combo points must be turned on)",
SOULSHARDCOMBO = "Toggle display of Warlord's Soul Shards as combo points (combo points must be turned on)",
CHICOMBO = "Toggle display of Monk's Chi as combo points (combo points must be turned on)",
RUNECOMBO = "Toggle display of Deathnight's Runes as combo points (combo points must be turned on)",
RUNECOMBO = "Toggle display of Death Knight's Runes as combo points (combo points must be turned on)",
SOULFRAGMENTCOMBO = "Toggle display of Demon Hunter's Soul Fragments as combo points (combo points must be turned on)",
ESSENCECOMBO = "Toggle display of Evoker's Essence as combo points (combo points must be turned on)",
CPCOLOR = "Set text color of combo points",
CPCOLORDECAY = "Set color of decaying combo points",
RESETCOLORS = "Reset colors to default values",
Expand Down Expand Up @@ -214,6 +215,7 @@ LM["SoulShards"] = "Warlock: Soul Shards"
LM["Chi"] = "Monk: Chi"
LM["Stagger"] = "Monk: Stagger"
LM["Runes"] = "Death Knight: Runes"
LM["Essence"] = "Evoker: Essence"
LM["ManaShadowPriest"] = "Priest: Mana (Shadow Priest)"
LM["ManaBalanceDruid"] = "Druid: Mana (Balance Druid)"
LM["ManaDruid"] = "Druid: Mana (Cat/Bear Forms)"
Expand Down
2 changes: 2 additions & 0 deletions Locales/ruRU.lua
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ L["TOOLTIP"] = {
CHICOMBO = "Вкл/Выкл отображение Энергии Чи монахов как приёмов в серии (Приёмы в серии должны быть включены)",
RUNECOMBO = "Вкл/Выкл отображение рун Рыцаря Смерти как приёмов в серии (Приёмы в серии должны быть включены)",
SOULFRAGMENTCOMBO = "Вкл/Выкл отображение Фрагментов душ охотника на демонов как приёмов в серии (Приёмы в серии должны быть включены)",
ESSENCECOMBO = "Вкл/Выкл отображение сущности Пробудитель как приёмов в серии (Приёмы в серии должны быть включены)",
CPCOLOR = "Установка цвета текста приёмов в серии (комбо-поинтов)",
CPCOLORDECAY = "Установка цвета уменьшения приёмов в серии",
RESETCOLORS = "Сброс окраски на цвета по умолчанию",
Expand Down Expand Up @@ -217,6 +218,7 @@ LM["SoulShards"] = "Чернокнижник: Осколки душ"
LM["Chi"] = "Монах: Чи"
LM["Stagger"] = "Монах: Пошатывание"
LM["Runes"] = "Рыцарь смерти: Руны"
LM["Essence"] = "Пробудитель: сущности"
LM["ManaShadowPriest"] = "Жрец: мана (для жрецов тьмы)"
LM["ManaBalanceDruid"] = "Друид: мана (для сов)"
LM["ManaDruid"] = "Друид: мана (Cat/Bear Forms)"
Expand Down
7 changes: 5 additions & 2 deletions Locales/zhCN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ L["TOOLTIP"] = {
HOLYPOWERCOMBO = "切换显示神圣能量点作为连击点(连击点必须启用)",
SOULSHARDCOMBO = "切换显示灵魂碎片作为连击点(连击点必须启用)",
CHICOMBO = "切换显示真气作为连击点(连击点必须启用)",
RUNECOMBO = "Toggle display of Deathnight's Runes as combo points (combo points must be turned on)",
SOULFRAGMENTCOMBO = "Toggle display of Demon Hunter's Soul Fragments as combo points (combo points must be turned on)",
RUNECOMBO = "切换显示符文作为连击点(连击点必须启用)",
SOULFRAGMENTCOMBO = "切换显示灵魂残片作为连击点(连击点必须启用)",
ESSENCECOMBO = "切换显示精华作为连击点(连击点必须启用)",

CPCOLOR = "设置连击点文本的颜色",
CPCOLORDECAY = "设置连击点衰变的颜色",
RESETCOLORS = "重置颜色为默认值",
Expand Down Expand Up @@ -215,6 +217,7 @@ LM["SoulShards"] = "术士:灵魂碎片,燃烧余烬,恶魔之怒"
LM["Chi"] = "武僧:真气"
LM["Stagger"] = "武僧:醉拳"
LM["Runes"] = "死亡骑士:符文"
LM["Essence"] = "唤魔师: 精华"
LM["ManaShadowPriest"] = "牧师:Mana (Shadow Priest)"
LM["ManaBalanceDruid"] = "德鲁伊:Mana (Balance Druid)"
LM["ManaDruid"] = "德鲁伊:Mana (Cat/Bear Forms)"
Expand Down
6 changes: 3 additions & 3 deletions RingTemplate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<Frame name="$parentFillUpdateFrame" parentKey="fillUpdateFrame">
<Animations>
<AnimationGroup parentKey="fillUpdate" looping="REPEAT">
<Animation duration="1" maxFramerate="30" order="1">
<Animation duration="1" order="1">
<Scripts>
<OnLoad>
self.ring = self:GetParent():GetParent():GetParent();
Expand All @@ -78,7 +78,7 @@

<Animations>
<AnimationGroup parentKey="applyAlpha">
<Alpha parentKey="alphaAnim" change="0" duration="0.5" order="1" />
<Alpha parentKey="alphaAnim" duration="0.5" order="1" />
<Scripts>
<OnLoad>
self.ring = self:GetParent();
Expand All @@ -98,7 +98,7 @@

<!-- (more or less) synchronized pulse -->
<AnimationGroup parentKey="syncPulse" looping="REPEAT">
<Animation change="0" duration="1" order="1">
<Animation duration="1" order="1">
<Scripts>
<OnLoad>
self.ring = self:GetParent():GetParent();
Expand Down
2 changes: 1 addition & 1 deletion Rings/Casting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.options = {
}
module.localized = true
module.disableEvents = {
{frame = "CastingBarFrame", hide = TRUE, events = {"UNIT_SPELLCAST_START", "UNIT_SPELLCAST_STOP", "UNIT_SPELLCAST_DELAYED",
{frame = "PlayerCastingBarFrame", hide = TRUE, events = {"UNIT_SPELLCAST_START", "UNIT_SPELLCAST_STOP", "UNIT_SPELLCAST_DELAYED",
"UNIT_SPELLCAST_FAILED", "UNIT_SPELLCAST_INTERRUPTED",
"UNIT_SPELLCAST_CHANNEL_START", "UNIT_SPELLCAST_CHANNEL_UPDATE",
"UNIT_SPELLCAST_CHANNEL_STOP", "PLAYER_ENTERING_WORLD"}},
Expand Down
44 changes: 44 additions & 0 deletions Rings/Essence.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
local module = ArcHUD:NewModule("Essence")
module.version = "5.0 (@file-abbreviated-hash@)"

module.unit = "player"
module.noAutoAlpha = nil

module.defaults = {
profile = {
Enabled = true,
Outline = true,
Flash = false,
Side = 2,
Level = 1,
ShowSeparators = true,
--Color = PowerBarColor["ESSENCE"],
Color = { r = 0.71, g = 1.0, b = 0.92 }, --the real essence color is NYI. this reuses chi's for now
RingVisibility = 2, -- always fade out when out of combat, regardless of ring status
ShowTextHuge = false
}
}
module.options = {
{name = "Flash", text = "FLASH", tooltip = "FLASH"},
{name = "ShowTextHuge", text = "SHOWTEXTHUGE", tooltip = "SHOWTEXTHUGE"}, -- fka "combo points"
attach = true,
hasseparators = true,
}
module.localized = true

module.class = "EVOKER"
module.specs = nil -- array of SPEC_... constants; nil if this ring is available for all specs
module.powerType = Enum.PowerType.Essence
module.powerTypeString = "ESSENCE"
module.flashAt = nil

function module:Initialize()
self.InitializePowerRing = ArcHUD.templatePowerRing.InitializePowerRing
self.OnModuleUpdate = ArcHUD.templatePowerRing.OnModuleUpdate
self.OnModuleEnable = ArcHUD.templatePowerRing.OnModuleEnable
self.UpdatePowerRing = ArcHUD.templatePowerRing.UpdatePowerRing
self.UpdatePower = ArcHUD.templatePowerRing.UpdatePower
self.UpdateActive = ArcHUD.templatePowerRing.UpdateActive

self:InitializePowerRing()
end
2 changes: 1 addition & 1 deletion Rings/FocusPower.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function module:OnModuleUpdate()
self.MPPerc:SetPoint("TOP", self.f, "BOTTOMLEFT", 20, -130)
end
if(UnitExists(self.unit)) then
self.f:SetValue(UnitMana(self.unit))
self.f:SetValue(UnitPower(self.unit))
self:UpdateColor(UnitPowerType(self.unit))
end
end
Expand Down
39 changes: 27 additions & 12 deletions Rings/MirrorTimer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ module.options = {
}
module.localized = true
module.disableEvents = {
{frame = "MirrorTimer1", hide = TRUE, events = {"MIRROR_TIMER_PAUSE", "MIRROR_TIMER_STOP", "PLAYER_ENTERING_WORLD"}},
{frame = "MirrorTimer2", hide = TRUE, events = {"MIRROR_TIMER_PAUSE", "MIRROR_TIMER_STOP", "PLAYER_ENTERING_WORLD"}},
{frame = "MirrorTimer3", hide = TRUE, events = {"MIRROR_TIMER_PAUSE", "MIRROR_TIMER_STOP", "PLAYER_ENTERING_WORLD"}},
{frame = "MirrorTimerContainer", hide = TRUE, events = {"MIRROR_TIMER_START", "MIRROR_TIMER_PAUSE", "MIRROR_TIMER_STOP", "PLAYER_ENTERING_WORLD"}},
{frame = "UIParent", hide = FALSE, events = {"MIRROR_TIMER_START"}},
}

-- ideally, source directly from FrameXML/MirrorTimer.lua
local numMirrorTimerTypes = 3;

function module:Initialize()
-- Setup the frame we need
self.f = self:CreateRing(true, ArcHUDFrame)
Expand Down Expand Up @@ -57,7 +58,7 @@ end

local function MirrorTimer_UpdateTimers(frame, elapsed)
local self = frame.module
for i=1,MIRRORTIMER_NUMTIMERS do
for i=1,numMirrorTimerTypes do
if(self.timers[i] and not self.timers[i].paused) then
self.timers[i].value = self.timers[i].value + self.timers[i].scale * elapsed*1000
if(self.timers[i].value > self.timers[i].maxvalue) then
Expand Down Expand Up @@ -112,20 +113,34 @@ function module:OnModuleEnable()
self.timer = 0
end

self.MirrorTimerColors = { };
self.MirrorTimerColors["EXHAUSTION"] = {
r = 1.00, g = 0.90, b = 0.00
};
self.MirrorTimerColors["BREATH"] = {
r = 0.00, g = 0.50, b = 1.00
};
self.MirrorTimerColors["DEATH"] = {
r = 1.00, g = 0.70, b = 0.00
};
self.MirrorTimerColors["FEIGNDEATH"] = {
r = 1.00, g = 0.70, b = 0.00
};

self.f:Show()
end

function module:MIRROR_TIMER_START(event, arg1, arg2, arg3, arg4, arg5, arg6)
-- Find a free timer table
local updTimer, newTimer
for i=1,MIRRORTIMER_NUMTIMERS do
for i=1,numMirrorTimerTypes do
if(self.timers[i] and self.timers[i].timer == arg1) then
updTimer = i
break
end
end
if(not updTimer) then
for i=1,MIRRORTIMER_NUMTIMERS do
for i=1,numMirrorTimerTypes do
if(not self.timers[i]) then
newTimer = i
break
Expand All @@ -144,7 +159,7 @@ function module:MIRROR_TIMER_START(event, arg1, arg2, arg3, arg4, arg5, arg6)
label = arg6,
}
-- Switch ring color to the new timer
self.f:UpdateColor(MirrorTimerColors[arg1])
self.f:UpdateColor(self.MirrorTimerColors[arg1])
self.timer = newTimer
self.timers.count = self.timers.count + 1
--self:Msg("Adding new timer %d: %s, %d, %d, %d, %d, %s", newTimer, arg1, arg2, arg3, arg4, arg5, arg6)
Expand All @@ -168,15 +183,15 @@ function module:MIRROR_TIMER_START(event, arg1, arg2, arg3, arg4, arg5, arg6)
end

function module:MIRROR_TIMER_PAUSE(event, arg1)
for i=1,MIRRORTIMER_NUMTIMERS do
for i=1,numMirrorTimerTypes do
if(self.timers[i]) then
self.timers[i].paused = (arg1 > 0 and 1 or nil)
end
end
end

function module:MIRROR_TIMER_STOP(event, arg1)
for i=1,MIRRORTIMER_NUMTIMERS do
for i=1,numMirrorTimerTypes do
if(self.timers[i] and self.timers[i].timer == arg1) then
if(self.timers[i+1]) then
self.timers[i] = self.timers[i+1]
Expand All @@ -193,10 +208,10 @@ function module:MIRROR_TIMER_STOP(event, arg1)
self.f:SetRingAlpha(0)
else
if(not self.timers[self.timer]) then
for i=MIRRORTIMER_NUMTIMERS,1,-1 do
for i=numMirrorTimerTypes,1,-1 do
if(self.timers[i]) then
self.timer = i
self.f:UpdateColor(MirrorTimerColors[self.timers[i].timer])
self.f:UpdateColor(self.MirrorTimerColors[self.timers[i].timer])
break
end
end
Expand All @@ -205,7 +220,7 @@ function module:MIRROR_TIMER_STOP(event, arg1)
end

function module:PLAYER_ENTERING_WORLD()
for i=1,MIRRORTIMER_NUMTIMERS do
for i=1,numMirrorTimerTypes do
self.timers[i] = nil
end
self.timers.count = 0
Expand Down
1 change: 1 addition & 0 deletions Rings/Rings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<Script file="Chi.lua" />
<Script file="Runes.lua" />
<Script file="Stagger.lua" />
<Script file="Essence.lua" />

<Script file="CustomBuff.lua" />

Expand Down

0 comments on commit e146e74

Please sign in to comment.