fix(scene): unlock all teleports across maps, merge resource configs, fix scenary not load error, and add quick farm battle handlers

This commit is contained in:
CAtlas0784 committed 2026-10-16 20:08:13 +07:00
1 parent 9aab62414f
commit 163d4433e6
47 files changed
+2025067 -6082

No files matched your search

+20 -1
View File
@@ -64,7 +64,7 @@ description: คู่มือ Honkai Star Rail Private Server (GaC-hkrpg-go
- **GetNpcTakenReward (2174)**: client ถามก่อนคุย NPC — ไม่ตอบ = dialogue ไม่มีตัวเลือกและค้าง
- **Tutorial**: mark ทุก id ว่าดูแล้ว (`GetTutorial`/`GetTutorialGuide` status enum `Oekdmamgidc`=2) ไม่งั้น popup เด้งวนและ**บล็อก input**; `FinishTutorial/UnlockTutorial*` ต้องตอบพร้อม Tutorial/TutorialGuide message
- **GetMissionStatusScRsp ต้องส่ง `finished_main_mission_id_list` + `curversion_finished_main_mission_id_list` (tag 13)** — ตอบเปล่า = client Lua NRE → บล็อก input + client ส่ง cmd 1204 ซ้ำรัวๆ
- **GetSwitchHandData**: 4.6.51 CsReq 8115 → ตอบ ScRsp **8104** (tag 3 retcode 0)
- **GetSwitchHandData**: 4.6.51 CsReq 8115 → ตอบ ScRsp **8108** (tag 3 retcode 0; 8104 คือ SwitchHandStartCsReq ห้ามตอบ)
- **arena ใหม่ไม่มีใน client เก่า**: challenge phase ใหม่ (เช่น 5312) ใช้ arena 3014101 ซึ่ง client build เก่าไม่มี MapEntrance → Lua `GotoMapParam: attempt to index nil with 'ID'` — fallback ไป arena มาตรฐาน 3000101
- **Scene ไม่มี teleport**: ฉาก arena ไม่มี teleport ใน res — fallback จาก `teleports.json` หรือ spawn ใกล้ prop แรกหันหน้าเข้าหา
- **full coverage ตอบ ScRsp ว่างทุก cmd = อันตราย!** — client modules (`GridFight`, `ChessRogue`, `EvolveBuild`, `ChimeraDuel`, `Jukebox`) รับว่างแล้ว `Sync(nil)` → NRE วน → **จอดำ** — cmd ไม่รู้จักต้อง **drop เงียบๆ** ตอบว่างได้เฉพาะ dummy list ที่ทดสอบแล้ว
@@ -149,3 +149,22 @@ commit สุดท้ายของ Rust (`ebc27a1`) อ้างชื่อ
Endgame entry รอ response นี้ก่อนเปิด UI (บันทึก Rust บอก 4130 ผิด)
- **Activity schedule จริง**: `tools/march7_dump/Config/Custom/ActivityConfig.json`
(147 activities จาก client 4.6.51) — อย่าส่ง synthetic id เพราะ Travel Log จะว่าง
## 14. บทเรียนระบบ Endgame ใน 4.6.51 (Apocalyptic Shadow, Pure Fiction, MoC)
1. **GetChallengeGroupStatistics (1775/1711 → 1708)**:
- Client ส่ง `GetChallengeGroupStatisticsCsReq`
- ScRsp 1708 ต้องใช้ proto 4.6.51 (`group_id=5`, `retcode=9`, `challenge_boss=1`, `challenge_story=3`, `challenge_default=11`) ห้ามใช้ layout 4.5.52
2. **StartChallengeTierce (Starward/PF/AS) = CmdID 8998 (4.6.51)**:
- Client ส่ง `StartChallengeTierceCsReq` (8986): `challenge_id` (tag 3), `stageIndex` (tag 5), `lineup_tierce_list` (tag 9)
- Response ใน 4.6.51 คือ **8998** (`StartChallengeTierceScRsp`) ประกอบด้วย `retcode` (tag 3), `scene` (tag 9), `cur_tierce_challenge` (tag 15)
- ข้อมูลแมพดึงจาก `cd.Tierce[baseID]` สำหรับทุก stageIndex
3. **SetChallengeTierceLineup (8978/9000 → 8985)**:
- Callback `OMOEFAHFJFL::EMMGHDLIPOH` ใน client รอ CmdID **8985** (`SetChallengeTierceLineupScRsp`) บอดี้ `[0x08, 0x00]`
- เซิร์ฟเวอร์เดิมส่ง 8999 ทำให้ client หมุนค้างตลอดเวลาเลือกตัวละคร
4. **Leave Challenge (1705 → 1771, 8989 → 8983) และการรักษาสภาพตัวละคร**:
- `loadChallengeScene` **ห้ามเขียนทับ** `player.Scene.EntryID/FloorID/PlaneID` — มิฉะนั้น persistent save จะพังเป็นฉาก arena
- เมื่อผู้เล่นกดยกเลิก/ออกจาก Endgame ต้องตอบ ScRsp (1771 หรือ 8983) พร้อมเรียก `loadScene(s, returnEntry, true, nil, nil)` สั่ง `EnterSceneByServerScNotify` (1427) ดึงตัวละครกลับ open world ทันที ตัวละครจะไม่หาย
5. **StartChallenge Lineup List & Stage Info (1787)**:
- ต้องแนบทั้ง Node 1 (index 0) และ Node 2 (index 1) ใน `LineupList`
- `StageInfo` (tag 13) แนบเฉพาะเมื่อ `challengeID >= 30000 && buff != 0` (AS Boss) ห้ามแนบว่างใน MoC และ PF