Animations: add option-tab fade, minimap pulse, zButton expand fade, map-pin drop-in; wire BeastTraining debug log to /mth err

This commit is contained in:
DuvelCorp
2026-09-10 16:05:36 +02:00
parent 566f3f4925
commit d2fb04f7c5
7 changed files with 91 additions and 2 deletions
+14 -1
View File
@@ -168,7 +168,10 @@ function MTH_PT_HasBeastTrainingRows()
end
local function MTH_PT_DebugLog(line)
return
if line == nil then return end
if MTH_DebugFrame and type(MTH_DebugFrame.AddInfo) == "function" then
MTH_DebugFrame:AddInfo("[BeastTraining] " .. tostring(line))
end
end
local function MTH_PT_IsScanMessageEnabled()
@@ -381,6 +384,10 @@ local function MTH_PT_ProcessLearnSystemMessage(rawMessage)
_, _, abilityName, rankText = string.find(message, "^[Yy]ou have learned a new spell:%s*(.-)%s*[Rr]ank%s*(%d+)%.?$")
end
if not abilityName or not rankText then
-- Only trace messages that look like a learn line, to avoid flooding the log.
if MTH_PT_DebugLog and string.find(message, "[Ll]earned") then
MTH_PT_DebugLog("learn-msg parse FAILED: '" .. tostring(message) .. "'")
end
return false
end
@@ -412,6 +419,12 @@ local function MTH_PT_ProcessLearnSystemMessage(rawMessage)
petRecorded = MTH_PETS_RecordCurrentPetLearnedAbility(abilityName, rankNumber, "beasttraining:learn-msg") and true or false
end
if MTH_PT_DebugLog then
MTH_PT_DebugLog("learn-msg matched: ability='" .. tostring(abilityName) .. "' rank=" .. tostring(rankNumber)
.. " token='" .. tostring(token) .. "' alreadyKnown=" .. tostring(alreadyKnown)
.. " changed=" .. tostring(changed) .. " petRecorded=" .. tostring(petRecorded))
end
if changed or petRecorded then
if MTH_PT_DebugLog then
MTH_PT_DebugLog("learn-msg captured: source='you have learned a new spell' ability='" .. tostring(abilityName) .. "' rank=" .. tostring(rankNumber) .. " token='" .. tostring(token) .. "' changed=" .. tostring(changed) .. " petRecorded=" .. tostring(petRecorded))