Save endgame progress, team presets, technique support and camera controls

This commit is contained in:
CAtlas0784 committed 2026-10-17 23:44:36 +07:00
1 parent a681affdb3
commit 639cef7d19
52 files changed
+11940 -766

No files matched your search

+18 -18
View File
@@ -218,21 +218,21 @@ type accountPayload struct {
Retcode int `json:"retcode"`
}
func standardAccount() map[string]any {
func (a *appState) standardAccount() map[string]any {
return map[string]any{
"area_code": "**",
"email": "ReversedRooms",
"country": "RU",
"is_email_verify": "1",
"token": "mostsecuretokenever",
"uid": "1337",
"uid": fmt.Sprint(a.runtime.PlayerUID),
}
}
func loginReply(w http.ResponseWriter) {
func (a *appState) loginReply(w http.ResponseWriter) {
writeJSON(w, map[string]any{
"data": map[string]any{
"account": standardAccount(),
"account": a.standardAccount(),
"device_grant_required": false,
"reactivate_required": false,
"realperson_required": false,
@@ -243,15 +243,15 @@ func loginReply(w http.ResponseWriter) {
})
}
func granterLoginReply(w http.ResponseWriter) {
func (a *appState) granterLoginReply(w http.ResponseWriter) {
writeJSON(w, map[string]any{
"data": map[string]any{
"account_type": 1,
"combo_id": "1337",
"combo_id": fmt.Sprint(a.runtime.PlayerUID),
"combo_token": "9065ad8507d5a1991cb6fddacac5999b780bbd92",
"data": `{"guest":false}`,
"heartbeat": false,
"open_id": "1337",
"open_id": fmt.Sprint(a.runtime.PlayerUID),
},
"message": "OK",
"retcode": 0,
@@ -270,13 +270,13 @@ func riskyCheckReply(w http.ResponseWriter) {
})
}
func apnLoginReply(w http.ResponseWriter) {
func (a *appState) apnLoginReply(w http.ResponseWriter) {
writeJSON(w, map[string]any{
"data": map[string]any{
"token": map[string]any{"token": "mostsecuretokenever", "token_type": 1},
"user_info": map[string]any{
"aid": "1337",
"mid": "1337",
"aid": fmt.Sprint(a.runtime.PlayerUID),
"mid": fmt.Sprint(a.runtime.PlayerUID),
"is_email_verify": 1,
"area_code": "**",
"country": "US",
@@ -289,13 +289,13 @@ func apnLoginReply(w http.ResponseWriter) {
})
}
func apnVerifyReply(w http.ResponseWriter) {
func (a *appState) apnVerifyReply(w http.ResponseWriter) {
writeJSON(w, map[string]any{
"data": map[string]any{
"tokens": []any{map[string]any{"token": "mostsecuretokenever", "token_type": 1}},
"user_info": map[string]any{
"aid": "1337",
"mid": "1337",
"aid": fmt.Sprint(a.runtime.PlayerUID),
"mid": fmt.Sprint(a.runtime.PlayerUID),
"is_email_verify": 1,
"area_code": "**",
"country": "US",
@@ -361,12 +361,12 @@ func Listen() error {
mux := http.NewServeMux()
mux.HandleFunc("/query_dispatch", func(w http.ResponseWriter, r *http.Request) { queryDispatch(w, r, runtime) })
mux.HandleFunc("/query_gateway", queryGateway(state))
mux.HandleFunc("/{product_name}/mdk/shield/api/login", func(w http.ResponseWriter, r *http.Request) { loginReply(w) })
mux.HandleFunc("/{product_name}/mdk/shield/api/verify", func(w http.ResponseWriter, r *http.Request) { loginReply(w) })
mux.HandleFunc("/{product_name}/combo/granter/login/v2/login", func(w http.ResponseWriter, r *http.Request) { granterLoginReply(w) })
mux.HandleFunc("/{product_name}/mdk/shield/api/login", func(w http.ResponseWriter, r *http.Request) { state.loginReply(w) })
mux.HandleFunc("/{product_name}/mdk/shield/api/verify", func(w http.ResponseWriter, r *http.Request) { state.loginReply(w) })
mux.HandleFunc("/{product_name}/combo/granter/login/v2/login", func(w http.ResponseWriter, r *http.Request) { state.granterLoginReply(w) })
mux.HandleFunc("/account/risky/api/check", func(w http.ResponseWriter, r *http.Request) { riskyCheckReply(w) })
mux.HandleFunc("/account/ma-cn-passport/app/loginByPassword", func(w http.ResponseWriter, r *http.Request) { apnLoginReply(w) })
mux.HandleFunc("/account/ma-cn-session/app/verify", func(w http.ResponseWriter, r *http.Request) { apnVerifyReply(w) })
mux.HandleFunc("/account/ma-cn-passport/app/loginByPassword", func(w http.ResponseWriter, r *http.Request) { state.apnLoginReply(w) })
mux.HandleFunc("/account/ma-cn-session/app/verify", func(w http.ResponseWriter, r *http.Request) { state.apnVerifyReply(w) })
mux.HandleFunc("/srtools", corsWrapper(srToolsSave))
registerAPIRoutes(mux)
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {