test(upserver): 归档存档迁移与玩法闭环回归工具
This commit is contained in:
15
CodexOutput/upserver/uloop-exit-production-path.cs
Normal file
15
CodexOutput/upserver/uloop-exit-production-path.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using asap.core;
|
||||
if (!UnityEngine.Application.isPlaying) return "Refused: not playing";
|
||||
var user = GContext.container.Resolve<game.IUserService>();
|
||||
var api = GContext.container.Resolve<ICustomServerMgr>();
|
||||
var realtime = GContext.container.Resolve<IRTService>();
|
||||
if (!user.IsAuthorized || (user.ApiPlayerId != "101" && user.ApiPlayerId != "102"))
|
||||
return "Refused: not an authorized test account";
|
||||
var previousId = user.ApiPlayerId;
|
||||
var previousJar = api.Cookie;
|
||||
var previousVersion = api.SessionVersion;
|
||||
var previousConnected = realtime.IsConnected;
|
||||
game.QuitStage.Logout = true;
|
||||
await GContext.container.Resolve<IStageService>().SwitchStageAsync("QuitStage");
|
||||
await System.Threading.Tasks.Task.Delay(3500);
|
||||
return $"PreviousId={previousId}; WasConnected={previousConnected}; OldUserAuthorized={user.IsAuthorized}; OldInternalId={user.InternalId}; OldUserIdCleared={string.IsNullOrEmpty(user.UserId)}; OldApiPlayerIdCleared={string.IsNullOrEmpty(user.ApiPlayerId)}; CookieJarReplaced={!object.ReferenceEquals(previousJar,api.Cookie)}; NewJarCount={api.Cookie.Count}; SessionAdvanced={api.SessionVersion>previousVersion}; OldHubConnected={realtime.IsConnected}; Scene={UnityEngine.SceneManagement.SceneManager.GetActiveScene().name}";
|
||||
Reference in New Issue
Block a user