fix(scene): unlock teleport pillars on maps missing from mapDefaultEntranceMap

The user report: pillars visible on the map but locked, and clicking a
teleport does nothing (client never sends EnterScene).

Root cause: mapDefaultEntranceMap covers only 115 of 371 floors - the
GetSceneMapInfo reply had no unlocked teleports for the missing floors
(mostly new-region 2xxxxx maps), so the client locked the pillars and
never initiated the teleport.

- findEntryForFloor: resolve entry by searching config names P*_F<floor>
  directly, with mapDefaultEntranceMap as the first chance
- GetSceneMapInfo: use the new resolver and merge teleports.json keys
  into unlocked_teleport_list for every floor
- EnterScene: floor ids resolve through the same path; a teleport id
  arriving via scene_identifier (MDAIDPPKOPO.PLIDNBMCIJH) now also
  resolves the destination entry
- loadScene: exact teleport position from teleports.json when the res
  config has no inline teleport with that id
This commit is contained in:
CAtlas0784 committed 2026-10-07 01:45:56 +07:00
1 parent 72861c3028
commit d364b9616f
4 files changed
+90 -12

No files matched your search

+16
View File
@@ -47,3 +47,19 @@
1. **ทดสอบกับ client จริง** — เปิด `run_go.bat` (GaC-hkrpg-go) แล้ว login ด้วย hosts/proxy เดิม
2. Gacha handlers ถูก skip (proto 4.6.51 เปลี่ยนชื่อ GetGachaInfoCsReq/DoGachaCsReq) — หาชื่อใหม่จาก dump
3. ถ้า client ฟ้อง cmd ไหน "Unknown" ให้เช็ค `gameserver.log` แล้วเติม handler ในตัว Go
## เพิ่มเติม (รอบแก้เสาวาป — 01:3x)
**อาการ:** เสาวาปในแมพใหม่ๆ มองเห็นในแมพแต่ไม่เปิด + กดวาปไม่ไป (client ไม่ส่ง EnterScene เลย)
**ต้นเหตุ:** `mapDefaultEntranceMap` ใน res.json ครอบคลุมแค่ 115/371 ฟลอร์ — โค้ด GetSceneMapInfo
และ EnterScene resolution พึ่งมันทั้งคู่ ฟลอร์ที่ไม่อยู่ในนี้ = ไม่มีรายชื่อเสาปลดล็อคส่งกลับ
→ client ล็อคเสา และไม่เริ่มวาป
**แก้ (commit 0fdadd0):**
- `findEntryForFloor` — หา entry จากชื่อ config `P*_F<floor>` โดยตรง (mapDefaultEntranceMap เป็น first chance)
- GetSceneMapInfo รวมรายชื่อเสาจาก teleports.json ทุกฟลอร์
- EnterScene: teleport id ผ่าน scene_identifier (MDAIDPPKOPO.PLIDNBMCIJH) resolve ปลายทางได้
- loadScene: ใช้ตำแหน่ง teleport จาก teleports.json ตรงๆ ถ้า res ไม่มี id นั้น
**บทเรียน:** data index บางตัวใน res.json ไม่ครอบคลุมทุกแมพ — ต้องมี fallback ค้นจากชื่อ config / teleports.json เสมอ