From 5f5fe4e82b862228073f760f413baf0fc1b66519 Mon Sep 17 00:00:00 2001 From: CAtlas0784 Date: Wed, 16 Sep 2026 01:36:59 +0700 Subject: [PATCH] fix(vehicles): support AskClaimVehicleSeat and AskReleaseVehicleSeat for F-key entry, and update README status matrix --- .../Game/GameRouter.Vehicles.cs | 36 +++++++++++++++++++ .../Ananta.Handlers/Game/GameRouter.cs | 2 ++ .../Methods/GameScene/VehicleMethods.cs | 8 +++++ README.md | 3 +- 4 files changed, 47 insertions(+), 2 deletions(-) diff --git a/Ananta.Server/Ananta.Handlers/Game/GameRouter.Vehicles.cs b/Ananta.Server/Ananta.Handlers/Game/GameRouter.Vehicles.cs index 61e1d1e..cdf3521 100644 --- a/Ananta.Server/Ananta.Handlers/Game/GameRouter.Vehicles.cs +++ b/Ananta.Server/Ananta.Handlers/Game/GameRouter.Vehicles.cs @@ -596,5 +596,41 @@ internal sealed partial class GameRouter conn.Log.Info("[TAFFY_MOTO] AskGetOffMotor"); return msg.IsInvoke ? conn.ReturnEmptyOkAsync(msg) : Task.CompletedTask; } + + [Handler(MethodId.AskClaimVehicleSeat, HandlerPacketKind.Invoke)] + private async Task AskClaimVehicleSeat(Connection conn, UxRpcMessage msg) + { + ulong vehicleId = 0; + try + { + var args = msg.GetArgs(); + vehicleId = args.VehicleEntityId; + } + catch + { + vehicleId = LastSummonedEntity(); + } + conn.Log.Info($"[VEHICLE] AskClaimVehicleSeat invoked for vehicle={vehicleId}"); + await conn.ReturnAsync(msg, (byte)0); + await ForceEnterVehicleAsync(conn.Session, vehicleId); + } + + [Handler(MethodId.AskReleaseVehicleSeat, HandlerPacketKind.Notify)] + [Handler(MethodId.AskReleaseVehicleSeat, HandlerPacketKind.Invoke)] + private async Task AskReleaseVehicleSeat(Connection conn, UxRpcMessage msg) + { + conn.Log.Info("[VEHICLE] AskReleaseVehicleSeat received"); + if (msg.IsInvoke) + await conn.ReturnEmptyOkAsync(msg); + await ForceExitVehicleAsync(conn.Session); + } + + [Handler(MethodId.AskChangeCanMoveToDriveSeat, HandlerPacketKind.Invoke)] + [Handler(MethodId.AskChangeCanMoveToDriveSeat, HandlerPacketKind.Notify)] + private Task AskChangeCanMoveToDriveSeat(Connection conn, UxRpcMessage msg) + { + conn.Log.Info("[VEHICLE] AskChangeCanMoveToDriveSeat"); + return msg.IsInvoke ? conn.ReturnEmptyOkAsync(msg) : Task.CompletedTask; + } } diff --git a/Ananta.Server/Ananta.Handlers/Game/GameRouter.cs b/Ananta.Server/Ananta.Handlers/Game/GameRouter.cs index 36206af..c4d91e1 100644 --- a/Ananta.Server/Ananta.Handlers/Game/GameRouter.cs +++ b/Ananta.Server/Ananta.Handlers/Game/GameRouter.cs @@ -73,6 +73,8 @@ internal sealed partial class GameRouter MethodId.AskGetUnlockedVehicles, MethodId.SyncStoryCoreClientInfo, MethodId.AskClaimVehicleSeat, + MethodId.AskReleaseVehicleSeat, + MethodId.AskChangeCanMoveToDriveSeat, MethodId.AskPlayerStartEnterOrExitVehicle, MethodId.AskPlayerFinishEnterOrExitVehicle, MethodId.AskVehicleMove, diff --git a/Ananta.Server/Ananta.RpcTypes/Client4229938/Methods/GameScene/VehicleMethods.cs b/Ananta.Server/Ananta.RpcTypes/Client4229938/Methods/GameScene/VehicleMethods.cs index a4b8aeb..0970992 100644 --- a/Ananta.Server/Ananta.RpcTypes/Client4229938/Methods/GameScene/VehicleMethods.cs +++ b/Ananta.Server/Ananta.RpcTypes/Client4229938/Methods/GameScene/VehicleMethods.cs @@ -298,6 +298,14 @@ internal sealed class AskClaimVehicleSeatArgs public List SeatIndices = []; } +/// Client -> server AskReleaseVehicleSeat(vehicleEntityId, seatIndex). Inline. +[UxContract(Inline = true)] +internal sealed class AskReleaseVehicleSeatArgs +{ + public ulong VehicleEntityId; + public byte SeatIndex; +} + /// Client -> GameScene AskVehicleStartAutonomousDriving(bool hasvalidtargetposition, UXVector3 targetposition). [UxContract(Inline = true)] internal sealed class AskVehicleStartAutonomousDrivingArgs diff --git a/README.md b/README.md index 6f1219d..e8f195b 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,7 @@ | **Web Debug Panel (`:5809/debug`)** | 🟢 ใช้งานได้สมบูรณ์ | แดชบอร์ดเว็บสำหรับวาร์ปตามพิกัด (Teleport), ปรับเวลาสภาพอากาศ, เสกมอนเตอร์, และเปิดหน้าต่างวิดีโอ | | **Safe Fastpatch Loader** | 🟢 ใช้งานได้สมบูรณ์ | ตัวสร้าง `fastpatch_4229938.zip` อัตโนมัติ ทุกคำสั่งถูกครอบด้วย `pcall` ป้องกันข้อความคำสั่งรั่วขึ้นหน้าจอ และหมดปัญหาเกมค้างหน้า Initialize Client | | **Monster Spawning (เสกมอนเตอร์)** | 🟡 กำลังพัฒนา / มีข้อจำกัด / บัค | เสกได้ผ่าน GM Console (`Alt+F1`) และ Debug Panel (`CMD:SPAWN_ENEMY`) ส่งคำสั่งเข้า `gCS.LuaUtils.AddEnemy` โดยตรงไม่ขึ้นเป็นตัวหนังสือบนจอ แต่การเกิดจะขึ้นอยู่กับ NavMesh ใน Chunk นั้นๆ | -| **Realtime 3D Cutscenes & Timelines** | 🟢 ใช้งานได้สมบูรณ์ | เล่นคัทซีน Realtime 3D In-Engine ผ่าน Cinemachine และ Timeline ภายในตัวเกมโดยตรง (14 Presets บน Web Debug Panel) ตัดคัทซีนวิดีโอพรีเรนเดอร์ที่ไม่มีไฟล์ออกแล้ว | -| **Taffy Signature Weapon & Combat (塔菲专属武器/技能)** | 🟢 ใช้งานได้สมบูรณ์ | มอเตอร์ไซค์ล้อเดียวของ Taffy เป็นการแปลงสภาพอาวุธค้อนของ Taffy โดยตรง (Active Skill `51935230`) เซิร์ฟเวอร์ผูกสกิลเฉพาะตัวและรองรับ RPC การขับขี่ไว้สมบูรณ์แล้ว | +| **Realtime 3D Cutscenes & Timelines** | 🟡 กำลังทดสอบ / มีข้อจำกัด / บัค | เล่นคัทซีน Realtime 3D In-Engine ผ่าน Cinemachine และ Timeline ภายในตัวเกมโดยตรง (14 Presets บน Web Debug Panel) ตัดคัทซีนวิดีโอพรีเรนเดอร์ที่ไม่มีไฟล์ออกแล้ว | | **Gacha System (ตู้สุ่มตัวละคร)** | 🟡 กำลังพัฒนา / มีข้อจำกัด / บัค | หน้าร้านค้าเปิดตู้ได้และบายพาสวันหมดอายุ CBT แล้ว แต่ผลการสุ่มยังเป็นการให้ไอเทมแบบสุ่มตายตัว (ยังไม่มี Database เรทกาชาแบบเต็มระบบ) | | **Phone Customization (ตกแต่งมือถือ)** | 🟡 กำลังพัฒนา / มีข้อจำกัด / บัค | ปลดล็อกไอเทมเคสมือถือ วอลเปเปอร์ จี้ห้อย (`1..200`) ในหน่วยความจำ แต่ยังไม่บันทึกความเปลี่ยนแปลงข้าม Session แบบถาวร | | **Monster Combat AI & Aggro** | 🔴 ยังทำไม่ได้ / วางแผนไว้ | มอนเตอร์ที่เสกออกมาจะยืนนิ่งหรือเคลื่อนที่พื้นฐาน ยังไม่มี Behavior Tree เชิงรุกเข้าโจมตีผู้เล่น (ต้องรอเขียน Combat AI Loop ฝั่งเซิร์ฟเวอร์) |