mirror of
https://codeberg.org/Duvelcorp/MetaHunt.git
synced 2026-09-23 16:16: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:
+73
-25
@@ -20,34 +20,34 @@ local MTH_BOOK_GetZoneName
|
||||
local MTH_BOOK_GetPlayerLevelValue
|
||||
local MTH_BOOK_IsSpellInLevelScope
|
||||
local MTH_BOOK_GetScopedRankSummary
|
||||
local MTH_BOOK_BEAST_DATABASE_URL = "https://database.turtlecraft.gg/?npc=%d"
|
||||
local MTH_BOOK_NPC_DATABASE_URL = "https://database.turtlecraft.gg/?npc=%d"
|
||||
local MTH_BOOK_ITEM_DATABASE_URL = "https://database.turtlecraft.gg/?item=%d"
|
||||
local MTH_BOOK_BEAST_DATABASE_URL = "https://octowow.st/db/?npc=%d"
|
||||
local MTH_BOOK_NPC_DATABASE_URL = "https://octowow.st/db/?npc=%d"
|
||||
local MTH_BOOK_ITEM_DATABASE_URL = "https://octowow.st/db/?item=%d"
|
||||
local MTH_BOOK_STABLE_CURRENT_ID_CACHE = nil
|
||||
|
||||
local MTH_BOOK_FALLBACK_BAG_ITEMS = {
|
||||
[2101] = { name = "Light Quiver", subtype = "quiver", slots = 6, reqlevel = nil, quality = 1, sourceUrl = "https://database.turtlecraft.gg/?item=2101" },
|
||||
[2102] = { name = "Small Ammo Pouch", subtype = "ammo pouch", slots = 6, reqlevel = nil, quality = 1, sourceUrl = "https://database.turtlecraft.gg/?item=2102" },
|
||||
[2662] = { name = "Ribbly's Quiver", subtype = "quiver", slots = 16, reqlevel = 50, quality = 2, sourceUrl = "https://database.turtlecraft.gg/?item=2662" },
|
||||
[2663] = { name = "Ribbly's Bandolier", subtype = "ammo pouch", slots = 16, reqlevel = 50, quality = 2, sourceUrl = "https://database.turtlecraft.gg/?item=2663" },
|
||||
[3573] = { name = "Hunting Quiver", subtype = "quiver", slots = 10, reqlevel = nil, quality = 1, sourceUrl = "https://database.turtlecraft.gg/?item=3573" },
|
||||
[3574] = { name = "Hunting Ammo Sack", subtype = "ammo pouch", slots = 10, reqlevel = nil, quality = 1, sourceUrl = "https://database.turtlecraft.gg/?item=3574" },
|
||||
[3604] = { name = "Bandolier of the Night Watch", subtype = "ammo pouch", slots = 12, reqlevel = nil, quality = 2, sourceUrl = "https://database.turtlecraft.gg/?item=3604" },
|
||||
[3605] = { name = "Quiver of the Night Watch", subtype = "quiver", slots = 12, reqlevel = nil, quality = 2, sourceUrl = "https://database.turtlecraft.gg/?item=3605" },
|
||||
[5439] = { name = "Small Quiver", subtype = "quiver", slots = 8, reqlevel = nil, quality = 1, sourceUrl = "https://database.turtlecraft.gg/?item=5439" },
|
||||
[5441] = { name = "Small Shot Pouch", subtype = "ammo pouch", slots = 8, reqlevel = nil, quality = 1, sourceUrl = "https://database.turtlecraft.gg/?item=5441" },
|
||||
[7278] = { name = "Light Leather Quiver", subtype = "quiver", slots = 8, reqlevel = nil, quality = 1, sourceUrl = "https://database.turtlecraft.gg/?item=7278" },
|
||||
[7279] = { name = "Small Leather Ammo Pouch", subtype = "ammo pouch", slots = 8, reqlevel = nil, quality = 1, sourceUrl = "https://database.turtlecraft.gg/?item=7279" },
|
||||
[7371] = { name = "Heavy Quiver", subtype = "quiver", slots = 14, reqlevel = 30, quality = 2, sourceUrl = "https://database.turtlecraft.gg/?item=7371" },
|
||||
[7372] = { name = "Heavy Leather Ammo Pouch", subtype = "ammo pouch", slots = 14, reqlevel = 30, quality = 2, sourceUrl = "https://database.turtlecraft.gg/?item=7372" },
|
||||
[8217] = { name = "Quickdraw Quiver", subtype = "quiver", slots = 16, reqlevel = 40, quality = 2, sourceUrl = "https://database.turtlecraft.gg/?item=8217" },
|
||||
[8218] = { name = "Thick Leather Ammo Pouch", subtype = "ammo pouch", slots = 16, reqlevel = 40, quality = 2, sourceUrl = "https://database.turtlecraft.gg/?item=8218" },
|
||||
[11362] = { name = "Medium Quiver", subtype = "quiver", slots = 10, reqlevel = 10, quality = 1, sourceUrl = "https://database.turtlecraft.gg/?item=11362" },
|
||||
[11363] = { name = "Medium Shot Pouch", subtype = "ammo pouch", slots = 10, reqlevel = 10, quality = 1, sourceUrl = "https://database.turtlecraft.gg/?item=11363" },
|
||||
[18714] = { name = "Ancient Sinew Wrapped Lamina", subtype = "quiver", slots = 18, reqlevel = 60, quality = 4, sourceUrl = "https://database.turtlecraft.gg/?item=18714" },
|
||||
[19319] = { name = "Harpy Hide Quiver", subtype = "quiver", slots = 16, reqlevel = 55, quality = 3, sourceUrl = "https://database.turtlecraft.gg/?item=19319" },
|
||||
[19320] = { name = "Gnoll Skin Bandolier", subtype = "ammo pouch", slots = 16, reqlevel = 55, quality = 3, sourceUrl = "https://database.turtlecraft.gg/?item=19320" },
|
||||
[61549] = { name = "Swiftfeather Quiver", subtype = "quiver", slots = 16, reqlevel = 57, quality = 3, sourceUrl = "https://database.turtlecraft.gg/?item=61549" },
|
||||
[2101] = { name = "Light Quiver", subtype = "quiver", slots = 6, reqlevel = nil, quality = 1, sourceUrl = "https://octowow.st/db/?item=2101" },
|
||||
[2102] = { name = "Small Ammo Pouch", subtype = "ammo pouch", slots = 6, reqlevel = nil, quality = 1, sourceUrl = "https://octowow.st/db/?item=2102" },
|
||||
[2662] = { name = "Ribbly's Quiver", subtype = "quiver", slots = 16, reqlevel = 50, quality = 2, sourceUrl = "https://octowow.st/db/?item=2662" },
|
||||
[2663] = { name = "Ribbly's Bandolier", subtype = "ammo pouch", slots = 16, reqlevel = 50, quality = 2, sourceUrl = "https://octowow.st/db/?item=2663" },
|
||||
[3573] = { name = "Hunting Quiver", subtype = "quiver", slots = 10, reqlevel = nil, quality = 1, sourceUrl = "https://octowow.st/db/?item=3573" },
|
||||
[3574] = { name = "Hunting Ammo Sack", subtype = "ammo pouch", slots = 10, reqlevel = nil, quality = 1, sourceUrl = "https://octowow.st/db/?item=3574" },
|
||||
[3604] = { name = "Bandolier of the Night Watch", subtype = "ammo pouch", slots = 12, reqlevel = nil, quality = 2, sourceUrl = "https://octowow.st/db/?item=3604" },
|
||||
[3605] = { name = "Quiver of the Night Watch", subtype = "quiver", slots = 12, reqlevel = nil, quality = 2, sourceUrl = "https://octowow.st/db/?item=3605" },
|
||||
[5439] = { name = "Small Quiver", subtype = "quiver", slots = 8, reqlevel = nil, quality = 1, sourceUrl = "https://octowow.st/db/?item=5439" },
|
||||
[5441] = { name = "Small Shot Pouch", subtype = "ammo pouch", slots = 8, reqlevel = nil, quality = 1, sourceUrl = "https://octowow.st/db/?item=5441" },
|
||||
[7278] = { name = "Light Leather Quiver", subtype = "quiver", slots = 8, reqlevel = nil, quality = 1, sourceUrl = "https://octowow.st/db/?item=7278" },
|
||||
[7279] = { name = "Small Leather Ammo Pouch", subtype = "ammo pouch", slots = 8, reqlevel = nil, quality = 1, sourceUrl = "https://octowow.st/db/?item=7279" },
|
||||
[7371] = { name = "Heavy Quiver", subtype = "quiver", slots = 14, reqlevel = 30, quality = 2, sourceUrl = "https://octowow.st/db/?item=7371" },
|
||||
[7372] = { name = "Heavy Leather Ammo Pouch", subtype = "ammo pouch", slots = 14, reqlevel = 30, quality = 2, sourceUrl = "https://octowow.st/db/?item=7372" },
|
||||
[8217] = { name = "Quickdraw Quiver", subtype = "quiver", slots = 16, reqlevel = 40, quality = 2, sourceUrl = "https://octowow.st/db/?item=8217" },
|
||||
[8218] = { name = "Thick Leather Ammo Pouch", subtype = "ammo pouch", slots = 16, reqlevel = 40, quality = 2, sourceUrl = "https://octowow.st/db/?item=8218" },
|
||||
[11362] = { name = "Medium Quiver", subtype = "quiver", slots = 10, reqlevel = 10, quality = 1, sourceUrl = "https://octowow.st/db/?item=11362" },
|
||||
[11363] = { name = "Medium Shot Pouch", subtype = "ammo pouch", slots = 10, reqlevel = 10, quality = 1, sourceUrl = "https://octowow.st/db/?item=11363" },
|
||||
[18714] = { name = "Ancient Sinew Wrapped Lamina", subtype = "quiver", slots = 18, reqlevel = 60, quality = 4, sourceUrl = "https://octowow.st/db/?item=18714" },
|
||||
[19319] = { name = "Harpy Hide Quiver", subtype = "quiver", slots = 16, reqlevel = 55, quality = 3, sourceUrl = "https://octowow.st/db/?item=19319" },
|
||||
[19320] = { name = "Gnoll Skin Bandolier", subtype = "ammo pouch", slots = 16, reqlevel = 55, quality = 3, sourceUrl = "https://octowow.st/db/?item=19320" },
|
||||
[61549] = { name = "Swiftfeather Quiver", subtype = "quiver", slots = 16, reqlevel = 57, quality = 3, sourceUrl = "https://octowow.st/db/?item=61549" },
|
||||
}
|
||||
|
||||
local function MTH_BOOK_FamiliesTrace(message)
|
||||
@@ -5661,11 +5661,58 @@ _G.MTH_BOOK_GetScopedRankSummary = MTH_BOOK_GetScopedRankSummary
|
||||
_G.MTH_BOOK_UpdateResults = MTH_BOOK_UpdateResults
|
||||
_G.MTH_BOOK_RefreshFilter = MTH_BOOK_RefreshFilter
|
||||
|
||||
-- On a blocked realm the whole book must be inert. Rather than rendering any pages we
|
||||
-- drop an opaque "DISABLED." panel over the entire window (with its own close button so
|
||||
-- the frame can still be dismissed). Returns true when the realm gate is active.
|
||||
local function MTH_BOOK_UpdateRealmGateOverlay(frame)
|
||||
if not frame then return false end
|
||||
local blocked = (MTH and MTH.IsRealmGateBlocked and MTH:IsRealmGateBlocked()) and true or false
|
||||
|
||||
local overlay = frame.realmGateOverlay
|
||||
if not overlay then
|
||||
if not blocked then return false end
|
||||
|
||||
overlay = CreateFrame("Frame", "MTH_BOOK_RealmGateOverlay", frame)
|
||||
overlay:SetAllPoints(frame)
|
||||
overlay:EnableMouse(true)
|
||||
overlay:EnableMouseWheel(true)
|
||||
overlay:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
if overlay.SetFrameLevel and frame.GetFrameLevel then
|
||||
overlay:SetFrameLevel(frame:GetFrameLevel() + 50)
|
||||
end
|
||||
|
||||
local bg = overlay:CreateTexture(nil, "BACKGROUND")
|
||||
bg:SetAllPoints(overlay)
|
||||
bg:SetTexture("Interface\\Buttons\\WHITE8X8")
|
||||
if bg.SetVertexColor then bg:SetVertexColor(0, 0, 0, 1) end
|
||||
|
||||
local label = overlay:CreateFontString(nil, "OVERLAY")
|
||||
label:SetPoint("CENTER", overlay, "CENTER", 0, 0)
|
||||
if label.SetFont then label:SetFont("Fonts\\FRIZQT__.TTF", 48, "OUTLINE") end
|
||||
label:SetText("DISABLED.")
|
||||
label:SetTextColor(1.0, 0.1, 0.1)
|
||||
|
||||
local close = CreateFrame("Button", nil, overlay, "UIPanelCloseButton")
|
||||
close:SetPoint("TOPRIGHT", overlay, "TOPRIGHT", -4, -4)
|
||||
close:SetScript("OnClick", function() frame:Hide() end)
|
||||
|
||||
frame.realmGateOverlay = overlay
|
||||
end
|
||||
|
||||
if blocked then
|
||||
overlay:Show()
|
||||
else
|
||||
overlay:Hide()
|
||||
end
|
||||
return blocked
|
||||
end
|
||||
|
||||
function MTH_OpenHunterBook()
|
||||
if not MTH_HB_RequireOpenDeps() then return end
|
||||
local frame = MTH_BOOK_EnsureWindow()
|
||||
if not frame then return end
|
||||
frame:Show()
|
||||
if MTH_BOOK_UpdateRealmGateOverlay(frame) then return end
|
||||
MTH_BOOK_RefreshFilter()
|
||||
end
|
||||
|
||||
@@ -5677,6 +5724,7 @@ function MTH_ToggleHunterBook()
|
||||
frame:Hide()
|
||||
else
|
||||
frame:Show()
|
||||
if MTH_BOOK_UpdateRealmGateOverlay(frame) then return end
|
||||
MTH_BOOK_RefreshFilter()
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user