From 357bf1e6da11aa14d1bb8b8cee03ea7cf3f34ed8 Mon Sep 17 00:00:00 2001 From: DuvelCorp Date: Thu, 8 Oct 2026 08:40:37 +0200 Subject: [PATCH] MM widget: show SKIP on the action cell when the active ammo school is immune --- CHANGELOG.md | 2 ++ modules/expammo/engine.lua | 26 +++++++++++++++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d934a5..df37215 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ All notable changes to MetaHunt will be documented in this file. ### Fixed +- **MM Widget — immune schools now show SKIP**: When the current target is immune to the active Explosive Ammunition school, the widget already skipped the special shot (casting Aimed/Steady instead), but the action cell still read "USE" — indistinguishable from a normal shot. It now shows a red **SKIP** with the skipped shot's icon so the skip is visible. + - **Feed-O-Matic — feeding food that's too low level**: With nearly-full bags, FeedOMatic could keep trying to feed a small stack whose level was too low for your pet, which the server refuses ("That food's level is not high enough"). It now skips below-minimum-level foods and only offers food the pet can actually eat. - **Pets — taming & feeding history disappearing**: Fixed a long-standing issue where a pet's taming info and feeding history could vanish from the Book — caused by the server handing out non-unique pet GUIDs that split one pet into several empty duplicate records. The Stable scan now re-adopts the real record instead of an empty duplicate, so the data reappears on your next stable visit (no data rewrite needed). diff --git a/modules/expammo/engine.lua b/modules/expammo/engine.lua index 1ea62ee..9166d7f 100644 --- a/modules/expammo/engine.lua +++ b/modules/expammo/engine.lua @@ -412,6 +412,13 @@ local ICON_STEADY = "Interface\\Icons\\Ability_Hunter_SteadyShot" local ICON_MULTI = "Interface\\Icons\\Ability_UpgradeMoonGlaive" local ICON_SERPENT = "Interface\\Icons\\Ability_Hunter_QuickShot" local ICON_ARCANE = "Interface\\Icons\\Ability_ImpalingBolt" + +-- Consume-spell icon per state (shown on the action cell). +local CONSUME_ICON = { + [EXPLOSIVE] = ICON_MULTI, + [POISONOUS] = ICON_SERPENT, + [ENCHANTED] = ICON_ARCANE, +} -- Aura/effect textures (aura-dump debug capture) local ICON_EXP = "Interface\\Icons\\Ability_SearingArrow" -- Explosive Ammunition debuff local ICON_POI = "Interface\\Icons\\Ability_PoisonArrow" -- Poisonous Ammunition debuff @@ -516,13 +523,15 @@ local function MTH_EA_GetSpellCD(spellName) end -- Action button: what spell to show and what spell to cast right now. --- Returns displaySpell, icon, r, g, b, cooldownRemaining, castSpell +-- Returns displaySpell, icon, r, g, b, cooldownRemaining, castSpell, blocked local function MTH_EA_GetActionSpell() -- If current ammo state is blocked (creature immune or rotation toggle), - -- skip the consume-spell and fall through to Aimed/Steady instead. + -- skip the consume-spell and fall through to Aimed/Steady instead. The cell + -- shows the skipped consume-spell icon in red with a SKIP hint. if rt.state ~= IDLE and MTH_EA_IsStateBlocked(rt.state) then local cd = MTH_EA_GetSpellCD(SPELL_AIMED) - return SPELL_AIMED, ICON_AIMED, 1.00, 0.85, 0.00, cd, (cd > 0 and SPELL_STEADY or SPELL_AIMED) + local skipIcon = CONSUME_ICON[rt.state] or ICON_AIMED + return SPELL_AIMED, skipIcon, 1.00, 0.25, 0.25, cd, (cd > 0 and SPELL_STEADY or SPELL_AIMED), true end if rt.state == EXPLOSIVE then @@ -718,9 +727,16 @@ MTH_EA_UpdateUI = function() -- ── BOTTOM cell: action button ──────────────────────────── if cellBot then - local displaySpell, icon, r, g, b, cdRemain = MTH_EA_GetActionSpell() + local displaySpell, icon, r, g, b, cdRemain, _castSpell, blocked = MTH_EA_GetActionSpell() - if rt.state == IDLE then + if blocked then + -- Current ammo school is immune: skip the consume-spell. + cellBotBlink = 0 + cellBotIcon:SetTexture(icon) + cellBotIcon:SetVertexColor(r, g, b, 1) + cellBot:SetBackdropBorderColor(1, 0, 0, 1) + cellBotCD:SetText("|cffff3030SKIP|r") + elseif rt.state == IDLE then -- Always display Aimed Shot icon + its CD. -- The action (keybind/click) casts Steady Shot while Aimed is on CD. cellBotIcon:SetTexture(ICON_AIMED)