{"record":{"id":"75b0ca8efaa9385a","repo":"babalae/better-genshin-impact","slug":"error-75b0ca","errorCode":null,"errorMessage":"请先装备小道具「王树瑞佑」！如果已经装备仍旧出现此提示，请重新仔细阅读文档中的《快速上手》！","messagePattern":"请先装备小道具「王树瑞佑」！如果已经装备仍旧出现此提示，请重新仔细阅读文档中的《快速上手》！","errorType":"exception","errorClass":"NormalEndException","httpStatus":null,"severity":"warning","filePath":"BetterGenshinImpact/GameTask/AutoWood/AutoWoodTask.cs","lineNumber":445,"sourceCode":"        }\n\n        // 手动 GC\n        GC.Collect();\n    }\n\n    private void PressZ(WoodTaskParam taskParam)\n    {\n        // IMPORTANT: MUST try focus before press Z\n        SystemControl.FocusWindow(TaskContext.Instance().GameHandle);\n\n        if (_first)\n        {\n            using var contentRegion = CaptureToRectArea();\n            using var ra = contentRegion.Find(GetRecognitionObject(\"TheBoonOfTheElderTree\", contentRegion));\n            if (ra.IsEmpty())\n            {\n#if !TEST_WITHOUT_Z_ITEM\n                throw new NormalEndException(\"请先装备小道具「王树瑞佑」！如果已经装备仍旧出现此提示，请重新仔细阅读文档中的《快速上手》！\");\n#else\n                System.Threading.Thread.Sleep(2000);\n                Simulation.SendInput.SimulateAction(GIActions.QuickUseGadget);\n                Debug.WriteLine(\"[AutoWood] Z\");\n                _first = false;\n#endif\n            }\n            else\n            {\n                Simulation.SendInput.SimulateAction(GIActions.QuickUseGadget);\n                Debug.WriteLine(\"[AutoWood] Z\");\n                _first = false;\n            }\n        }\n        else\n        {\n            NewRetry.Do(() =>\n            {","sourceCodeStart":427,"sourceCodeEnd":463,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/GameTask/AutoWood/AutoWoodTask.cs#L427-L463","documentation":"Thrown as NormalEndException by PressZ on the first gadget-use attempt when the 'TheBoonOfTheElderTree' recognition template is not found on screen. The template matches the gadget icon shown when pressing Z, confirming the correct gadget is equipped. Its absence means the gadget is either not equipped or not the correct one, so auto-wood cannot proceed.","triggerScenarios":"Called from PressZ(taskParam) when _first is true. contentRegion.Find(GetRecognitionObject(\"TheBoonOfTheElderTree\", contentRegion)) returns an empty region (ra.IsEmpty() true). Only thrown when TEST_WITHOUT_Z_ITEM is not defined.","commonSituations":"Gadget 'Boon of the Elder Tree' (王树瑞佑) is not equipped in the quick-use (Z) slot; a different gadget is equipped; the gadget icon template doesn't match due to game version/UI change; the game screen resolution doesn't match the template scale.","solutions":["Equip the 'Boon of the Elder Tree' gadget in the quick-use slot in-game.","If already equipped, check that the correct gadget is active (not a different one).","Update the TheBoonOfTheElderTree recognition asset if the icon changed in a game update.","Verify the capture resolution matches the expected 1920x1080 base or the asset scaling logic.","Refer to the documentation's quick-start guide as the error message suggests."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try\n{\n    woodTask.PressZ(taskParam);\n}\ncatch (NormalEndException ex) when (ex.Message.Contains(\"王树瑞佑\"))\n{\n    // Inform the user to equip the correct gadget\n    Logger.LogWarning(ex.Message);\n}","preventionTips":["Equip the 'Boon of the Elder Tree' (王树瑞佑) gadget in the quick-use slot before starting.","Follow the quick-start documentation for proper setup.","Update the TheBoonOfTheElderTree recognition asset if the icon changed.","Verify capture resolution matches the template scale."],"tags":["auto-wood","gadget","template-matching","normal-end","precondition"],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}