# us90 **Repository Path**: Top_hr/us90 ## Basic Information - **Project Name**: us90 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-08-15 - **Last Updated**: 2026-08-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # USDOF-C# Server (.NET 10) 参照 [86jp](https://codeberg.org/DTBOT/86jp) 代码风格,将 USDOF Python 服务端迁移为 C# .NET 10 项目。 ## 项目结构 ``` 90us-csharp/ ├── USDOF.slnx # .NET 10 解决方案 ├── PvfLib/ # PVF 档案读取库(独立) │ └── PvfArchive.cs # 简化版 PVF 解析器 ├── DfoServer/ # 主服务端 │ ├── Program.cs # 入口:启动 TCP 服务器 + SelfTest 支持 │ ├── Network/ │ │ ├── Core/ # MultiStructureTcpServer, PacketHeaders, Session, EncryptTool │ │ ├── Protocol/ # GameProtocolHandler, ChannelProtocolHandler │ │ └── OpcodeRegistry.cs # opcode 常量定义 │ ├── Game/ │ │ ├── Session/ # SessionDirectory, PlayerContext │ │ ├── Characters/ # CharacterRecord, CharacterStatComputer │ │ └── Dungeon/ # DungeonRun, DungeonRunState │ ├── Infrastructure/ # FileLogger, ServerPaths, SqliteDatabaseBootstrap │ ├── Sqlite/ # item_schema.sql, SqliteMigrations.cs │ ├── SelfTests/ # BasicSelfTest, DungeonRunLifecycleSelfTest │ └── Data/Pvf/ # 放置 Script.pvf └── 启动服务器.cmd # 一键启动脚本 ``` ## 构建 ```powershell cd J:\codextemp\90us-csharp dotnet build USDOF.slnx ``` ## 运行 1. 将 Stage3 客户端的 `Script.pvf` 放入 `DfoServer\Data\Pvf\Script.pvf` 2. 运行:`.\启动服务器.cmd` 或 `dotnet run --project DfoServer\DfoServer.csproj` 3. 自测:`dotnet run -- --selftest-all` ## 端口 - Channel: 7001 - Game: 7052 ## 当前状态(阶段一完成) - [x] .NET 10 解决方案和项目结构 - [x] MultiStructureTcpServer(单进程多端口 TCP) - [x] GamePacketHeader / ChannelPacketHeader 编解码 - [x] FlexiblePacketProcessor(粘包/拆包处理) - [x] EnhancedClientSession + SessionDirectory - [x] PlayerContext(角色状态上下文) - [x] DungeonRun(副本局状态机) - [x] CharacterStatComputer(角色属性计算,PVF 驱动) - [x] GameProtocolHandler opcode 路由框架 - [x] ChannelProtocolHandler(频道协议) - [x] SQL Schema + Migrations - [x] SelfTest 系统(启动时注册,--selftest-all 全跑) - [x] 编译通过,SelfTest 通过 ## 待完成(阶段二~四) - [ ] 完整 opcode handler 实现(当前为 stub) - [ ] PVF 完整解析(当前为简化版,需对接真实 Stage3 PVF 格式) - [ ] SQLite 角色/物品/任务数据层 - [ ] 副本状态机完整实现 - [ ] 与 Python 版本并行运行 + shadow 比对验证