2026-10-07 00:21:41 +07:00
|
|
|
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 {
|
2026-10-16 22:19:52 +07:00
|
|
|
tutorialIDs, _, err := getTutorialResourceIDs()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
2026-10-07 00:21:41 +07:00
|
|
|
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 {
|
2026-10-16 22:19:52 +07:00
|
|
|
_, tutorialGuideIDs, err := getTutorialResourceIDs()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
2026-10-07 00:21:41 +07:00
|
|
|
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
|
|
|
|
|
})
|
|
|
|
|
}
|