diff --git a/api/core-scan-beasttraining.lua b/api/core-scan-beasttraining.lua index 7fb930f..a497e47 100644 --- a/api/core-scan-beasttraining.lua +++ b/api/core-scan-beasttraining.lua @@ -714,6 +714,10 @@ local function MTH_PT_RunDoubleScan(triggerBase) or triggerText == "beast-training-rows-open" or triggerText == "petbook-visible-poll" ) + -- Stay quiet while Growl auto-teach is driving the trainer window. + if feedbackOnOpen and type(MTH_Growl_IsTeaching) == "function" and MTH_Growl_IsTeaching() then + feedbackOnOpen = false + end if not MTH_PT_ShouldScanNow() then if MTH_PT_DebugLog then MTH_PT_DebugLog("scan skipped: no beast-training rows, trigger=" .. tostring(triggerBase or "")) diff --git a/api/pet-growl-teach.lua b/api/pet-growl-teach.lua index b3769e5..caad0b0 100644 --- a/api/pet-growl-teach.lua +++ b/api/pet-growl-teach.lua @@ -151,6 +151,16 @@ local MTH_Growl_Pending = nil -- The offer currently awaiting the player's Yes/No answer. { rank, name, level } local MTH_Growl_Offer = nil + +-- While we auto-open the trainer to teach Growl, silence the Beast Training +-- scanner's chat feedback (set on confirm; expires after the teach window). +local MTH_Growl_SuppressScanUntil = 0 +function MTH_Growl_IsTeaching() + local getTime = MTH_Growl_GetGlobal("GetTime") + local now = (type(getTime) == "function" and getTime()) or 0 + return now < (MTH_Growl_SuppressScanUntil or 0) +end + local function MTH_Growl_TryTrainNow() if not MTH_Growl_Pending or MTH_Growl_Pending.done then return false @@ -195,6 +205,9 @@ local function MTH_Growl_TryTrainNow() MTH_Growl_DebugLog("Trained Growl Rank " .. tostring(bestRank) .. " (target " .. tostring(target) .. ") for '" .. tostring(MTH_Growl_Pending.name) .. "' via DoCraft(" .. tostring(bestIndex) .. ")") + if MTH and type(MTH.Print) == "function" then + MTH:Print("Auto-taught Growl (Rank " .. tostring(bestRank) .. ") to " .. tostring(MTH_Growl_Pending.name) .. ".") + end MTH_Growl_Pending.done = true if MTH_Growl_Pending.closeAfter then @@ -255,6 +268,8 @@ end) -- --------------------------------------------------------------------------- local function MTH_Growl_StartTraining(rank, petName) local alreadyOpen = MTH_Growl_IsTrainingWindowVisible() + local getTime = MTH_Growl_GetGlobal("GetTime") + MTH_Growl_SuppressScanUntil = ((type(getTime) == "function" and getTime()) or 0) + 10 MTH_Growl_Pending = { rank = rank, name = petName,