{"record":{"id":"d506c67060c5193a","repo":"babalae/better-genshin-impact","slug":"map-mapname-target-x-0-y-0","errorCode":null,"errorMessage":"目标点未移动到可点击区域：map={mapName}, target=({x:0.##},{y:0.##})","messagePattern":"目标点未移动到可点击区域：map=(.+?), target=\\((.+?),(.+?)\\)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs","lineNumber":1261,"sourceCode":"        await MoveMapToCore(x, y, mapName, finalZoomLevel, true, 0);\n    }\n\n    /// <summary>\n    /// 点击大地图上的指定坐标。\n    /// </summary>\n    /// <remarks>\n    /// 先将目标移动到可点击安全区域，\n    /// 再将原神地图坐标转换为游戏截图区域坐标并点击。\n    /// </remarks>\n    /// <param name=\"x\">目标 x 坐标。</param>\n    /// <param name=\"y\">目标 y 坐标。</param>\n    /// <param name=\"mapName\">大地图名称。</param>\n    public async Task ClickMapPoint(double x, double y, string mapName)\n    {\n        await MoveMapTo(x, y, mapName);\n        if (!TryGetClickableTargetPosition(mapName, x, y, 0, out _, out var clickX, out var clickY))\n        {\n            throw new Exception($\"目标点未移动到可点击区域：map={mapName}, target=({x:0.##},{y:0.##})\");\n        }\n\n        using var clickCapture = CaptureToRectArea();\n        clickCapture.ClickTo(clickX, clickY);\n    }\n\n    private async Task MoveMapToTeleportClickArea(double x, double y, string mapName, double requiredVisibleRadius)\n    {\n        await MoveMapToCore(x, y, mapName, MinTeleportZoomLevel, false, requiredVisibleRadius);\n    }\n\n    private async Task MoveMapToCore(\n        double x,\n        double y,\n        string mapName,\n        double finalZoomLevel,\n        bool allowZoom,\n        double requiredVisibleRadius)","sourceCodeStart":1243,"sourceCodeEnd":1279,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/GameTask/AutoTrackPath/TpTask.cs#L1243-L1279","documentation":"Thrown by ClickMapPoint after MoveMapTo completes but TryGetClickableTargetPosition reports the target coordinate still cannot be mapped to a safe on-screen click position. MoveMapTo panned the map but the final resting position left the target outside the clickable center region or the coordinate-to-pixel conversion failed.","triggerScenarios":"Called from ClickMapPoint(x, y, mapName). After MoveMapTo finishes, TryGetClickableTargetPosition(mapName, x, y, 0, ...) returns false. This happens when the map's current view doesn't contain the target within the safe margin, or the big-map rect for the area is unavailable/invalid.","commonSituations":"Target coordinates are at the extreme edge of the map region; the map zoom level is wrong leaving target off-screen; map assets or coordinate conversion data are stale for the area; the map was on a different layer (underground vs surface) than expected.","solutions":["Verify the (x, y) coordinates correspond to a real teleport point within the specified map area.","Ensure MapZoomEnabled and zoom settings allow the target to be brought into the clickable region.","Retry the entire ClickMapPoint call since MoveMapTo is documented as potentially imprecise on first attempt.","Confirm the correct map layer (ground/underground) is active for the target."],"exampleFix":"// before\nawait MoveMapTo(x, y, mapName);\nif (!TryGetClickableTargetPosition(mapName, x, y, 0, out _, out var clickX, out var clickY))\n{\n    throw new Exception($\"目标点未移动到可点击区域：map={mapName}, target=({x:0.##},{y:0.##})\");\n}\n// after: retry MoveMapTo once before giving up\nfor (int i = 0; i < 2; i++)\n{\n    await MoveMapTo(x, y, mapName);\n    if (TryGetClickableTargetPosition(mapName, x, y, 0, out _, out var clickX, out var clickY))\n    {\n        using var clickCapture = CaptureToRectArea();\n        clickCapture.ClickTo(clickX, clickY);\n        return;\n    }\n}\nthrow new Exception($\"目标点未移动到可点击区域：map={mapName}, target=({x:0.##},{y:0.##})\");","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try\n{\n    await task.ClickMapPoint(x, y, mapName);\n}\ncatch (Exception ex) when (ex.Message.Contains(\"目标点未移动到可点击区域\"))\n{\n    // MoveMapTo is documented as potentially imprecise; retry once\n    await task.ClickMapPoint(x, y, mapName);\n}","preventionTips":["Wrap ClickMapPoint in a retry since MoveMapTo is documented as imprecise on first try.","Verify the target coordinates are within the valid map area bounds.","Ensure the map zoom level allows the target to be in the clickable center region."],"tags":["map-navigation","coordinate-conversion","clickable-region"],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}