Animations: wire remaining effects + 2-column options panel

- Shared FX toolkit in fx-celebrate.lua: mth_shake tween type, MTH_FX_Flash
  glow helper, MTH_CelebrateRunaway red shaking banner, gold title reset.
- pet.runaway, pet.happiness, pet.loyaltyup, pet.feed
- combat.ammoswap, combat.rangedswap, combat.mmprocs
- ui.zbar, ui.stable, ui.minimapping, ui.optionsclose
- book.model, book.search
- Options > Animations panel now uses a balanced two-column layout.
- CHANGELOG Animations entry expanded (no version bump).
This commit is contained in:
DuvelCorp
2026-09-10 16:38:14 +02:00
parent d2fb04f7c5
commit 66ff1ae711
14 changed files with 343 additions and 11 deletions
+9
View File
@@ -403,6 +403,7 @@ local lnl = {
expiresAt = 0,
DURATION = 10, -- Lock and Load real duration (tooltip: "Lasts 10 sec or until Aimed Shot is cast")
}
local MTH_EA_LnLWasActive = false -- for detecting the proc rising edge (animations)
-- ── Confirmed icon paths (captured in-game 2026-03-21) ────────
-- Action-button spells (spellbook scan)
@@ -700,10 +701,18 @@ MTH_EA_UpdateUI = function()
cellTop.icon:SetVertexColor(1.00, 0.82, 0.00, 1)
cellTop:SetBackdropBorderColor(1.00, 0.82, 0.00, 1)
cellTopCD:SetText("|cffffffff" .. secs .. "|r")
if not MTH_EA_LnLWasActive then
if type(MTH_FX_Flash) == "function" and type(MTH_FX_IsEnabled) == "function"
and MTH_FX_IsEnabled("combat.mmprocs") then
MTH_FX_Flash(cellTop, 1.00, 0.82, 0.20, 0.55)
end
MTH_EA_LnLWasActive = true
end
else
cellTop.icon:SetVertexColor(0.28, 0.28, 0.28, 0.40)
cellTop:SetBackdropBorderColor(0.25, 0.25, 0.25, 0.35)
cellTopCD:SetText("")
MTH_EA_LnLWasActive = false
end
end
+15
View File
@@ -221,6 +221,14 @@ local function MTHSmartAmmo_ShowFallbackWarning(previousAmmo, newAmmo)
elseif UIErrorsFrame and UIErrorsFrame.AddMessage then
UIErrorsFrame:AddMessage(warning, 1.0, 0.15, 0.15, 1.0)
end
if type(MTH_FX_Flash) == "function" and type(MTH_FX_IsEnabled) == "function"
and MTH_FX_IsEnabled("combat.ammoswap") then
local target = getglobal("zButtonAmmo")
if target then
MTH_FX_Flash(target, 1.00, 0.75, 0.20, 0.5)
end
end
end
local MTHSmartAmmo_FallbackCheckFrame = nil
@@ -371,6 +379,13 @@ local function MTHSmartAmmo_HandleWeaponSwapAutoEquip(reason)
if MTHSmartAmmo_EquipAmmoFromSlot(bestAmmo.bag, bestAmmo.slot) then
MTH_SA_LastKnownEquippedName = bestAmmo.name
MTHSmartAmmo_RefreshAmmoButtonDisplay()
if type(MTH_FX_Flash) == "function" and type(MTH_FX_IsEnabled) == "function"
and MTH_FX_IsEnabled("combat.rangedswap") then
local target = getglobal("zButtonAmmo")
if target then
MTH_FX_Flash(target, 0.30, 0.70, 1.00, 0.5)
end
end
end
end
+23
View File
@@ -5,6 +5,8 @@
local ZBAR_FRAME_NAME = "MTH_ZBar_Anchor"
local ZBar_Sauce = PizzaSauce
local ZBAR_ALL_BUTTONS = {
"zButtonAspect",
"zButtonAmmo",
@@ -282,6 +284,26 @@ function MTH_ZBar_Release()
end
end
-- Animations: gentle staggered fade-in of the bar's buttons when it activates.
function MTH_ZBar_AnimateActivate()
if not ZBar_Sauce then return end
if type(MTH_FX_IsEnabled) ~= "function" or not MTH_FX_IsEnabled("ui.zbar") then
return
end
local s = MTH_ZBar_GetSaved()
local order = s.order or {}
for i = 1, table.getn(order) do
local buttonName = order[i]
if type(buttonName) == "string" then
local btn = getglobal(buttonName)
if btn and btn:IsShown() then
btn:SetAlpha(0)
ZBar_Sauce:FadeTo(btn, 1, 0.30, "outQuad", { delay = (i - 1) * 0.05 })
end
end
end
end
-- Called when the user toggles the Enable checkbox in the options.
function MTH_ZBar_SetEnabled(enabled)
local s = MTH_ZBar_GetSaved()
@@ -289,6 +311,7 @@ function MTH_ZBar_SetEnabled(enabled)
if enabled then
MTH_ZBar_EnsureAnchor()
MTH_ZBar_ApplyLayout()
MTH_ZBar_AnimateActivate()
else
MTH_ZBar_Release()
end
+28
View File
@@ -312,6 +312,8 @@ local function zButtonPet_GetCorePetInfo()
return nil
end
local zButtonPet_LastLoyalty = nil
local function zButtonPet_RefreshSavedPetState(saved, corePetInfo)
local hasLivePet = false
if type(UnitExists) == "function" then
@@ -343,8 +345,34 @@ local function zButtonPet_RefreshSavedPetState(saved, corePetInfo)
if happiness == nil and type(GetPetHappiness) == "function" then
happiness = GetPetHappiness()
end
local prevHappiness = saved["pet"]["happiness"]
saved["pet"]["happiness"] = happiness
-- Animations: flash the pet button when happiness or loyalty changes.
if type(MTH_FX_Flash) == "function" and type(MTH_FX_IsEnabled) == "function" then
if MTH_FX_IsEnabled("pet.happiness")
and prevHappiness ~= nil and happiness ~= nil and happiness ~= prevHappiness then
local target = getglobal("zButtonPet")
if target then
if happiness > prevHappiness then
MTH_FX_Flash(target, 0.30, 1.00, 0.35, 0.5)
else
MTH_FX_Flash(target, 1.00, 0.30, 0.30, 0.5)
end
end
end
local loyalty = corePetInfo and tonumber(corePetInfo.loyaltyLevel) or nil
if MTH_FX_IsEnabled("pet.loyaltyup") and loyalty ~= nil then
if zButtonPet_LastLoyalty ~= nil and loyalty > zButtonPet_LastLoyalty then
local target = getglobal("zButtonPet")
if target then
MTH_FX_Flash(target, 1.00, 0.82, 0.20, 0.6)
end
end
zButtonPet_LastLoyalty = loyalty
end
end
if isDead then
saved["pet"]["status"] = 1
elseif currentHealth and currentHealthMax and currentHealthMax > 0 then