Beispiel #1
0
 private void setUserInfo(ApolloAccountInfo accountInfo, uint worldId, string roleId)
 {
     if (accountInfo == null)
     {
         ADebug.Log("TssService account info is null");
     }
     else
     {
         TssSdk.EENTRYID entryId = TssSdk.EENTRYID.ENTRY_ID_OTHERS;
         string          openId  = accountInfo.OpenId;
         string          appId   = null;
         if (accountInfo != null)
         {
             if (accountInfo.Platform == ApolloPlatform.Wechat)
             {
                 entryId = TssSdk.EENTRYID.ENTRY_ID_MM;
                 appId   = ApolloCommon.ApolloInfo.WXAppId;
             }
             else
             {
                 entryId = TssSdk.EENTRYID.ENTRY_ID_QZONE;
                 appId   = ApolloCommon.ApolloInfo.QQAppId;
             }
         }
         TssSdk.TssSdkSetUserInfoEx(entryId, openId, appId, worldId, roleId);
     }
 }
 public void OnLogin(int platf, string openId, uint worldId, string roleId)
 {
     this.isLogin = true;
     Debug.Log(string.Concat(new object[]
     {
         this.tag,
         " plat: ",
         platf,
         "openid:",
         openId,
         " worldid: ",
         worldId,
         " roleid: ",
         roleId
     }));
     if (platf == 3)
     {
         TssSdk.TssSdkSetUserInfoEx(TssSdk.EENTRYID.ENTRY_ID_QQ, openId, "1105309683", worldId, roleId);
     }
     else if (platf == 4)
     {
         TssSdk.TssSdkSetUserInfoEx(TssSdk.EENTRYID.ENTRY_ID_MM, openId, "wxfdab5af74990787a", worldId, roleId);
     }
     else
     {
         TssSdk.TssSdkSetUserInfoEx(TssSdk.EENTRYID.ENTRY_ID_OTHERS, openId, "guest100023", worldId, roleId);
     }
 }
Beispiel #3
0
 public static void TssSdkSetUserInfo(TssSdk.EENTRYID entryId, string uin, string appId)
 {
     TssSdk.TssSdkSetUserInfoEx(entryId, uin, appId, 0u, "0");
 }
Beispiel #4
0
 public static void OnWeChatLogin(string openId, string appId, int serverid, string roleId)
 {
     TssSdk.TssSdkSetUserInfoEx(TssSdk.EENTRYID.ENTRY_ID_MM, openId, appId, (uint)serverid, roleId);
 }