Files
GaCy-GO/internal/gameserver/handlers_tutorial.go
T
CAtlas0784 59ea97b1a6 feat: port GaC-hkrpg-ps to Go with SceneCastSkill camera-detach fix
- mihoyo-variant KCP in pure Go (28-byte conv+token header), UDP gateway
  with 0xFF/0x145/0x194 handshake, ms-precision KCP clock + retransmit ticker
- protobuf for 4.6.51 generated from the AstralOS StarRail.proto (4932
  messages) plus CmdID map from // CmdID: comments (2114 ids)
- sdkserver port: query_dispatch/query_gateway (Gateserver pb + base64),
  hotfix fetch, auth endpoints, SRTools freesr-data.json upload
- gameserver handlers: login flow, scene load/spawn with real monster
  entity tracking, lineup, avatar/skin, missions, tutorials (1249+855),
  bag/equip, challenge incl. StartChallenge 1787 layout + Tierce 8973 +
  peak 8948, all raw tierce replies
- SceneCastSkill camera bug fix: only real scene monsters (tracked per
  session) trigger battle; attacking props/NPCs/air replies retcode 0
  without battle_info so the camera stays locked on the character
- end-to-end smoke test simulating a client over real UDP: handshake,
  PlayerGetToken, and both SceneCastSkill paths
- reuses the Rust PS data files unchanged (freesr-data.json, persistent,
  res.json, teleports.json, challenge_data.json, mission_unlocks.json)
2026-10-07 00:22:23 +07:00

70 lines
2.1 KiB
Go

package gameserver
import (
goproto "gac-hkrpg-go/protocol/proto"
)
// All tutorials/guides are reported completed so the client never pops the
// tutorial modal (which locks camera + input).
func init() {
handle("GetTutorial", func(s *Session, req *goproto.GetTutorialCsReq, rsp *goproto.GetTutorialScRsp) error {
rsp.Retcode = 0
for _, id := range tutorialIDs {
rsp.TutorialList = append(rsp.TutorialList, &goproto.Tutorial{
Id: id,
Status: goproto.HHJGMFEALEB_HHJGMFEALEB_OEKDMAMGIDC,
})
}
return nil
})
handle("GetTutorialGuide", func(s *Session, req *goproto.GetTutorialGuideCsReq, rsp *goproto.GetTutorialGuideScRsp) error {
rsp.Retcode = 0
for _, id := range tutorialGuideIDs {
rsp.TutorialGuideList = append(rsp.TutorialGuideList, &goproto.TutorialGuide{
Id: id,
Status: goproto.HHJGMFEALEB_HHJGMFEALEB_OEKDMAMGIDC,
})
}
return nil
})
handle("FinishTutorial", func(s *Session, req *goproto.FinishTutorialCsReq, rsp *goproto.FinishTutorialScRsp) error {
rsp.Retcode = 0
rsp.Tutorial = &goproto.Tutorial{
Id: req.HPIMDINCCNN,
Status: goproto.HHJGMFEALEB_HHJGMFEALEB_OEKDMAMGIDC,
}
return nil
})
handle("FinishTutorialGuide", func(s *Session, req *goproto.FinishTutorialGuideCsReq, rsp *goproto.FinishTutorialGuideScRsp) error {
rsp.Retcode = 0
rsp.TutorialGuide = &goproto.TutorialGuide{
Id: req.GroupId,
Status: goproto.HHJGMFEALEB_HHJGMFEALEB_OEKDMAMGIDC,
Type: req.Type,
}
return nil
})
handle("UnlockTutorial", func(s *Session, req *goproto.UnlockTutorialCsReq, rsp *goproto.UnlockTutorialScRsp) error {
rsp.Retcode = 0
rsp.Tutorial = &goproto.Tutorial{
Id: req.HPIMDINCCNN,
Status: goproto.HHJGMFEALEB_HHJGMFEALEB_OEKDMAMGIDC,
}
return nil
})
handle("UnlockTutorialGuide", func(s *Session, req *goproto.UnlockTutorialGuideCsReq, rsp *goproto.UnlockTutorialGuideScRsp) error {
rsp.Retcode = 0
rsp.TutorialGuide = &goproto.TutorialGuide{
Id: req.GroupId,
Status: goproto.HHJGMFEALEB_HHJGMFEALEB_OEKDMAMGIDC,
Type: req.Type,
}
return nil
})
}