|
|
@@ -46,45 +46,6 @@ namespace ET
|
|
|
return (ErrorCode.ERR_Success, 0);
|
|
|
}
|
|
|
|
|
|
- public static async ETTask<(int, long)> LoginTest(Scene zoneScene, string address, string account,
|
|
|
- bool cancelDelete)
|
|
|
- {
|
|
|
- A2C_LoginAccount a2CLoginAccount = null;
|
|
|
- Session accountSession = null;
|
|
|
- try
|
|
|
- {
|
|
|
- Debug.Log($"address:{address}");
|
|
|
- accountSession = zoneScene.GetComponent<NetWSComponent>()
|
|
|
- .Create(null, address);
|
|
|
-
|
|
|
- a2CLoginAccount = (A2C_LoginAccount)await accountSession.Call(new C2A_LoginTest()
|
|
|
- {
|
|
|
- Account = account,
|
|
|
- Version = GameConst.SERVER_VERSION,
|
|
|
- PlatformId = LauncherConfig.platformId,
|
|
|
- ChannelId = LauncherConfig.ChannelId,
|
|
|
- CancelDelete = cancelDelete,
|
|
|
- Token = ""
|
|
|
- });
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- //accountSession?.Dispose();
|
|
|
- Log.Debug("打印报错:" + e.ToString());
|
|
|
- return (ErrorCode.ERR_NetWorkError, 0);
|
|
|
- }
|
|
|
-
|
|
|
- if (a2CLoginAccount.Error != ErrorCode.ERR_Success)
|
|
|
- {
|
|
|
- //accountSession?.Dispose();
|
|
|
- return (a2CLoginAccount.Error, a2CLoginAccount.DeleteTime);
|
|
|
- }
|
|
|
-
|
|
|
- OnLoginSuccess(zoneScene, a2CLoginAccount, accountSession, account);
|
|
|
-
|
|
|
- return (ErrorCode.ERR_Success, 0);
|
|
|
- }
|
|
|
-
|
|
|
public static async ETTask<(int, long)> Login(Scene zoneScene, string address, string account, string password,
|
|
|
bool isMD5, bool cancelDelete)
|
|
|
{
|
|
|
@@ -141,6 +102,7 @@ namespace ET
|
|
|
accountInfoComponent.AccountId = a2CLoginAccount.AccountId;
|
|
|
accountInfoComponent.Account = account;
|
|
|
accountInfoComponent.Age = a2CLoginAccount.Age;
|
|
|
+ GameGlobal.userAge = a2CLoginAccount.Age;
|
|
|
}
|
|
|
|
|
|
public static async ETTask<int> Register(Scene zoneScene, string address, string account, string password,
|