| | |
| | |
|
| | | public enum E_ChannelPlatform
|
| | | {
|
| | | Free,
|
| | | Mr,
|
| | | Free = 1,// 自由
|
| | | Mr = 2,// 猫耳
|
| | | Sp = 3,// 思璞
|
| | | }
|
| | |
|
| | | public E_ChannelPlatform ChannelPlatform { get; private set; }
|
| | |
| | | {
|
| | | ChannelPlatform = E_ChannelPlatform.Mr;
|
| | | }
|
| | | else if (_channelPlatform.Equals("sp"))
|
| | | {
|
| | | ChannelPlatform = E_ChannelPlatform.Sp;
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | |
| | | public const int PayFinished = 105;
|
| | | public const int CreateRole = 106;
|
| | | public const int RoleLogin = 107;
|
| | | public const int RoleLevelUp = 108;
|
| | | /**
|
| | | * 极光推送
|
| | | * */
|
| | |
| | | public string tokenExpire;
|
| | | public int phone;
|
| | | public int accountID;
|
| | | public string timeStamp;
|
| | | public string sessionID;
|
| | | }
|
| | |
|
| | | public struct FP_CheckIDAuthentication
|
| | |
| | | m_Json["cpInfo"] = cpInfo;
|
| | | m_Json["title"] = title;
|
| | |
|
| | | if (ChannelPlatform == E_ChannelPlatform.Mr)
|
| | | if(ChannelPlatform == E_ChannelPlatform.Mr
|
| | | || ChannelPlatform == E_ChannelPlatform.Sp)
|
| | | {
|
| | | m_Json["notifyurl"] = _json["notifyurl"];
|
| | | m_Json["roleID"] = PlayerDatas.Instance.baseData.PlayerID;
|
| | | m_Json["roleName"] = PlayerDatas.Instance.baseData.PlayerName;
|
| | | m_Json["level"] = PlayerDatas.Instance.baseData.LV.ToString();
|
| | | m_Json["sid"] = "s" + ServerListCenter.Instance.currentServer.region_flag;
|
| | | }
|
| | |
|
| | | if (ChannelPlatform == E_ChannelPlatform.Mr)
|
| | | {
|
| | | m_Json["notifyurl"] = _json["notifyurl"];
|
| | | }
|
| | | else if(ChannelPlatform == E_ChannelPlatform.Sp)
|
| | | {
|
| | | m_Json["serverName"] = ServerListCenter.Instance.currentServer.name;
|
| | | m_Json["familyName"] = PlayerDatas.Instance.baseData.FamilyName;
|
| | | m_Json["job"] = PlayerDatas.Instance.baseData.Job.ToString();
|
| | | m_Json["money"] = PlayerDatas.Instance.baseData.Gold.ToString();
|
| | | m_Json["gameName"] = VersionConfig.Get().productName;
|
| | | m_Json["vipLevel"] = PlayerDatas.Instance.baseData.VIPLv.ToString();
|
| | | }
|
| | | #if UNITY_IOS
|
| | | m_Json["identifier"] = VersionConfig.Get().bundleIdentifier;
|
| | |
| | | if (_iDict.Contains("token"))
|
| | | {
|
| | | FreePlatformInfo.token = json["token"].ToString();
|
| | | Debug.Log("token: " + FreePlatformInfo.token);
|
| | | }
|
| | | if (_iDict.Contains("token_expire"))
|
| | | {
|
| | |
| | | if (_iDict.Contains("account"))
|
| | | {
|
| | | FreePlatformInfo.account = json["account"].ToString();
|
| | | Debug.Log("account: " + FreePlatformInfo.account);
|
| | | }
|
| | |
|
| | | if (_iDict.Contains("account_id"))
|
| | | {
|
| | | int.TryParse(json["account_id"].ToString(), out FreePlatformInfo.accountID);
|
| | | Debug.Log("account_id: " + FreePlatformInfo.accountID);
|
| | | }
|
| | |
|
| | | if (_iDict.Contains("session_id"))
|
| | | {
|
| | | FreePlatformInfo.sessionID = (string)json["session_id"];
|
| | | }
|
| | |
|
| | | if (_iDict.Contains("timeStamp"))
|
| | | {
|
| | | FreePlatformInfo.timeStamp = (string)json["timeStamp"];
|
| | | }
|
| | |
|
| | | FreePlatformInfo.phone = 0;
|
| | |
| | | {
|
| | | m_Json.Clear();
|
| | | m_Json["code"] = CodeU2A.CreateRole;
|
| | |
|
| | | m_Json["roleID"] = roleID;
|
| | | m_Json["roleName"] = roleName;
|
| | | m_Json["sid"] = "s" + ServerListCenter.Instance.currentServer.region_flag;
|
| | | m_Json["serverName"] = ServerListCenter.Instance.currentServer.name;
|
| | | m_Json["familyName"] = PlayerDatas.Instance.baseData.FamilyName;
|
| | | m_Json["level"] = "1";
|
| | | m_Json["job"] = PlayerDatas.Instance.baseData.Job.ToString();
|
| | | m_Json["money"] = PlayerDatas.Instance.baseData.Gold.ToString();
|
| | | m_Json["gameName"] = VersionConfig.Get().productName;
|
| | | m_Json["vipLevel"] = PlayerDatas.Instance.baseData.VIPLv.ToString();
|
| | | SendMessageToSDK(m_Json);
|
| | | }
|
| | |
|