proj/.cursor/skills/crystal-map-parsing-reference/SKILL.md
Use when debugging Mir2 map parsing, .map format precision, FishingCell, or terrain coordinate issues in Legendary Terrain. Consult Crystal source as authoritative reference.
npx skillsauth add luxuia/testgame1 crystal-map-parsing-referenceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
解析传奇 2 .map 或地形坐标出现问题时,以 Crystal 官方源码 为权威参考,对照 Mir2MapParser 实现。
.map 解析结果与预期不符| 用途 | Crystal 文件路径 |
|------|-----------------|
| 地图解析(权威) | Server/MirEnvir/Map.cs |
| 格式检测与布局 | LoadMapCellsv0 ~ LoadMapCellsV100 |
| 可视化/简化版 | Server.MirForms/VisualMapInfo/Class/ReadMap.cs |
| RespawnInfo 结构 | Server/MirDatabase + MirDBParser |
FindType 确定当前 .map 的版本(v0–v7、v100)Server/MirEnvir/Map.cs,找到对应 LoadMapCellsvN0x8000、0x20000000)light >= 100 && light <= 119,非仅 100–101| 字段/属性 | Crystal 逻辑 | 常见差异 |
|-----------|-------------|----------|
| FishingCell | light >= 100 && light <= 119 | 若只判 100–101 会漏掉部分水域 |
| HighWall | backImg & 0x8000 或 frontImg & 0x8000 | 与实现一致 |
| LowWall | middleImg & 0x8000 | 与实现一致 |
| Door | fileBytes[offSet] > 0 | 与实现一致 |
BitConverter 默认小端,与 Crystal 一致data-ai
Generates a JSON Schema for a given C# type name using reflection. Supports primitives, enums, arrays, generic collections, dictionaries, and complex objects. The type must be present in any loaded assembly. Use the full type name (e.g. 'UnityEngine.Vector3') for best results.
development
Execute Unity tests and return detailed results. Supports filtering by test mode, assembly, namespace, class, and method. Recommended to use 'EditMode' for faster iteration during development.
tools
Updates or creates script file with the provided C# code. Does AssetDatabase.Refresh() at the end. Provides compilation error details if the code has syntax errors. Use 'script-read' tool to read existing script files first.
tools
Reads the content of a script file and returns it as a string. Use 'script-update-or-create' tool to update or create script files.