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
+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