mirror of
https://codeberg.org/Duvelcorp/MetaHunt.git
synced 2026-09-22 07:36:58 +00:00
Fix realm-gate disable for book/options, pet-rank learning, unique beasts
- Hunter's Book and options window now show a full 'DISABLED.' overlay on realm-gated realms instead of rendering content - Pet training: new rank of an already-known ability is now recognised, announced, and reflected in tooltips - Restore curated 'unique appearance' beast allowlist (34 beasts) in data/init.lua - CHANGELOG updated
This commit is contained in:
@@ -1055,6 +1055,15 @@ end
|
||||
local function MTH_TT_HunterKnowsAbility(abilityLower, rankNumber)
|
||||
if abilityLower == "" then return false end
|
||||
|
||||
-- Prefer the authoritative pet-training check: it is rank-strict and also consults the
|
||||
-- hunter's learned-ability map, so a freshly learned rank counts even before a full
|
||||
-- Beast Training rescan has rebuilt the spell-map rows the fallback below relies on.
|
||||
if type(MTH_IsPetAbilityKnownByHunter) == "function" then
|
||||
if MTH_IsPetAbilityKnownByHunter(abilityLower, rankNumber) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
local spellMap = MTH_TT_GetKnownSpellMap()
|
||||
if type(spellMap) ~= "table" then
|
||||
return false
|
||||
@@ -1405,12 +1414,10 @@ local function MTH_TT_AddPetActionNotLearnedHint()
|
||||
|
||||
local canonicalLower = MTH_TT_Lower(canonical)
|
||||
local hunterKnown = MTH_TT_HunterKnowsAbility(canonicalLower, rankNumber)
|
||||
-- Only fall back to petKnown for ranked abilities: rankless abilities have no rank
|
||||
-- filter in CurrentPetKnowsAbility, so they always match on name alone -> false positive.
|
||||
local petKnown = (not hunterKnown)
|
||||
and MTH_TT_AbilityHasPositiveRanks(canonical)
|
||||
and MTH_TT_CurrentPetKnowsAbility(canonicalLower, rankNumber)
|
||||
if hunterKnown or petKnown then
|
||||
-- The hint reflects whether the HUNTER has learned this ability rank. We must NOT
|
||||
-- suppress it just because the current pet knows it: taming a new beast is exactly
|
||||
-- when you want to see which of its abilities you still have to learn.
|
||||
if hunterKnown then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user