mirror of
https://codeberg.org/Duvelcorp/MetaHunt.git
synced 2026-10-10 18:40:01 +00:00
MM widget: show SKIP on the action cell when the active ammo school is immune
This commit is contained in:
@@ -25,6 +25,8 @@ All notable changes to MetaHunt will be documented in this file.
|
|||||||
|
|
||||||
### Fixed
|
### 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.
|
- **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).
|
- **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).
|
||||||
|
|||||||
@@ -412,6 +412,13 @@ local ICON_STEADY = "Interface\\Icons\\Ability_Hunter_SteadyShot"
|
|||||||
local ICON_MULTI = "Interface\\Icons\\Ability_UpgradeMoonGlaive"
|
local ICON_MULTI = "Interface\\Icons\\Ability_UpgradeMoonGlaive"
|
||||||
local ICON_SERPENT = "Interface\\Icons\\Ability_Hunter_QuickShot"
|
local ICON_SERPENT = "Interface\\Icons\\Ability_Hunter_QuickShot"
|
||||||
local ICON_ARCANE = "Interface\\Icons\\Ability_ImpalingBolt"
|
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)
|
-- Aura/effect textures (aura-dump debug capture)
|
||||||
local ICON_EXP = "Interface\\Icons\\Ability_SearingArrow" -- Explosive Ammunition debuff
|
local ICON_EXP = "Interface\\Icons\\Ability_SearingArrow" -- Explosive Ammunition debuff
|
||||||
local ICON_POI = "Interface\\Icons\\Ability_PoisonArrow" -- Poisonous Ammunition debuff
|
local ICON_POI = "Interface\\Icons\\Ability_PoisonArrow" -- Poisonous Ammunition debuff
|
||||||
@@ -516,13 +523,15 @@ local function MTH_EA_GetSpellCD(spellName)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Action button: what spell to show and what spell to cast right now.
|
-- 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()
|
local function MTH_EA_GetActionSpell()
|
||||||
-- If current ammo state is blocked (creature immune or rotation toggle),
|
-- 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
|
if rt.state ~= IDLE and MTH_EA_IsStateBlocked(rt.state) then
|
||||||
local cd = MTH_EA_GetSpellCD(SPELL_AIMED)
|
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
|
end
|
||||||
|
|
||||||
if rt.state == EXPLOSIVE then
|
if rt.state == EXPLOSIVE then
|
||||||
@@ -718,9 +727,16 @@ MTH_EA_UpdateUI = function()
|
|||||||
|
|
||||||
-- ── BOTTOM cell: action button ────────────────────────────
|
-- ── BOTTOM cell: action button ────────────────────────────
|
||||||
if cellBot then
|
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.
|
-- Always display Aimed Shot icon + its CD.
|
||||||
-- The action (keybind/click) casts Steady Shot while Aimed is on CD.
|
-- The action (keybind/click) casts Steady Shot while Aimed is on CD.
|
||||||
cellBotIcon:SetTexture(ICON_AIMED)
|
cellBotIcon:SetTexture(ICON_AIMED)
|
||||||
|
|||||||
Reference in New Issue
Block a user