少年修仙传客户端代码仓库
client_Wu Xijin
2019-06-28 6c3b5abe5cbc3c8eeb127179c06fe9ce00424543
7595 仙宝奇缘项目版本校验地址加入game参数
3个文件已修改
87 ■■■■ 已修改文件
System/ClientVersion/VersionConfig.cs 73 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ClientVersion/VersionUtility.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/OperationLogCollect.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ClientVersion/VersionConfig.cs
@@ -14,10 +14,8 @@
    public const string VERSION_ALTERNATIVE = "0.0.0";
    [SerializeField] public string m_AppId = string.Empty;
    public string appId
    {
        get
        {
    public string appId {
        get {
            if (!string.IsNullOrEmpty(SDKUtility.Yj_AppID))
            {
                return SDKUtility.Yj_AppID;
@@ -27,10 +25,8 @@
    }
    [SerializeField] public string m_SpID = string.Empty;
    public string SpID
    {
        get
        {
    public string SpID {
        get {
            if (!string.IsNullOrEmpty(SDKUtility.Yj_SpID))
            {
                return SDKUtility.Yj_SpID;
@@ -49,10 +45,8 @@
    public string clientPackageFlag { get { return m_ClientPackageFlag; } }
    [SerializeField] int m_Branch = 0;
    public int branch
    {
        get
        {
    public int branch {
        get {
            if (DebugUtility.Instance.debugAccount && DebugUtility.Instance.debugBranch >= 0)
            {
                return DebugUtility.Instance.debugBranch;
@@ -63,6 +57,9 @@
            }
        }
    }
    [SerializeField] string m_GameId = string.Empty;
    public string gameId { get { return m_GameId; } }
    [SerializeField] InstalledAsset m_AssetAccess = InstalledAsset.IngoreDownLoad;
    public InstalledAsset assetAccess { get { return m_AssetAccess; } set { m_AssetAccess = value; } }
@@ -92,29 +89,25 @@
    public string appleDeveloperTeamID { get { return m_AppleDeveloperTeamID; } }
    [SerializeField] bool m_DebugVersion = false;
    public bool debugVersion
    {
    public bool debugVersion {
        get { return m_DebugVersion; }
        set { m_DebugVersion = value; }
    }
    [SerializeField] bool m_IsBanShu = false;
    public bool isBanShu
    {
    public bool isBanShu {
        get { return m_IsBanShu; }
        set { m_IsBanShu = value; }
    }
    [SerializeField] string m_BuildTime;
    public string buildTime
    {
    public string buildTime {
        get { return m_BuildTime; }
        set { m_BuildTime = value; }
    }
    [SerializeField] int m_BuildIndex;
    public int buildIndex
    {
    public int buildIndex {
        get { return m_BuildIndex; }
        set { m_BuildIndex = value; }
    }
@@ -123,10 +116,8 @@
    public Vector2 logoPosition { get { return m_LogoPosition; } }
    [SerializeField] string m_BanHao;
    public string banHao
    {
        get
        {
    public string banHao {
        get {
            if (!string.IsNullOrEmpty(SDKUtility.Yj_BanHao))
            {
                return SDKUtility.Yj_BanHao;
@@ -145,20 +136,21 @@
            m_Version = dataStrings[4];
            m_ClientPackageFlag = dataStrings[5];
            m_Branch = int.Parse(dataStrings[6]);
            m_AssetAccess = (InstalledAsset)int.Parse(dataStrings[7]);
            m_PartAssetPackage = int.Parse(dataStrings[8]) == 1;
            m_ProductName = dataStrings[9];
            m_BundleIdentifier = dataStrings[10];
            m_KeystoreFileName = dataStrings[11];
            m_KeystorePassword = dataStrings[12];
            m_KeystoreAlias = dataStrings[13];
            m_KeystoreAliasPassword = dataStrings[14];
            m_AppleDeveloperTeamID = dataStrings[15];
            m_DebugVersion = int.Parse(dataStrings[16]) == 1;
            m_IsBanShu = int.Parse(dataStrings[17]) == 1;
            m_LogoPosition = dataStrings[18].Vector3Parse();
            m_BanHao = dataStrings[19];
            m_SpID = dataStrings[20];
            m_GameId = dataStrings[7];
            m_AssetAccess = (InstalledAsset)int.Parse(dataStrings[8]);
            m_PartAssetPackage = int.Parse(dataStrings[9]) == 1;
            m_ProductName = dataStrings[10];
            m_BundleIdentifier = dataStrings[11];
            m_KeystoreFileName = dataStrings[12];
            m_KeystorePassword = dataStrings[13];
            m_KeystoreAlias = dataStrings[14];
            m_KeystoreAliasPassword = dataStrings[15];
            m_AppleDeveloperTeamID = dataStrings[16];
            m_DebugVersion = int.Parse(dataStrings[17]) == 1;
            m_IsBanShu = int.Parse(dataStrings[18]) == 1;
            m_LogoPosition = dataStrings[19].Vector3Parse();
            m_BanHao = dataStrings[20];
            m_SpID = dataStrings[21];
        }
        catch (System.Exception ex)
        {
@@ -183,6 +175,7 @@
        _to.m_Version = _from.m_Version;
        _to.m_AppId = _from.m_AppId;
        _to.m_Branch = _from.m_Branch;
        _to.m_GameId = _from.m_GameId;
        _to.m_AssetAccess = _from.m_AssetAccess;
        _to.m_PartAssetPackage = _from.m_PartAssetPackage;
        _to.m_BuildTime = _from.m_BuildTime;
@@ -228,7 +221,7 @@
                var input = lhsStrings[i];
                var intTemp = 0;
                int.TryParse(input, out intTemp);
                version1 += intTemp * MathUtility.Power(1000, lhsStrings.Length -1- i);
                version1 += intTemp * MathUtility.Power(1000, lhsStrings.Length - 1 - i);
            }
            var version2 = 0;
@@ -237,7 +230,7 @@
                var input = rhsStrings[i];
                var intTemp = 0;
                int.TryParse(input, out intTemp);
                version2 += intTemp * MathUtility.Power(1000, rhsStrings.Length -1- i);
                version2 += intTemp * MathUtility.Power(1000, rhsStrings.Length - 1 - i);
            }
            return version1 > version2 ? _lhs : _rhs;
System/ClientVersion/VersionUtility.cs
@@ -62,6 +62,8 @@
            tables["branch"] = VersionConfig.Get().branch.ToString();
        }
        tables["game"] = VersionConfig.Get().gameId;
        var url = StringUtility.Contact(VERSION_URL[urlIndex % 2], HttpRequest.HashtablaToString(tables));
        urlIndex++;
        HttpRequest.Instance.RequestHttpGet(url, HttpRequest.defaultHttpContentType, 1, OnVersionCheckResult);
Utility/OperationLogCollect.cs
@@ -20,7 +20,7 @@
            tables["OperatorID"] = VersionConfig.Get().appId;
            tables["RegionName"] = "data";
            tables["EventID"] = 9001.ToString();
            tables["ProductID"] = "xbqy";
            tables["ProductID"] = VersionConfig.Get().gameId;
            tables["Device"] = SystemInfo.deviceName;
            tables["DeviceFlag"] = SDKUtility.Instance.Device.imei;
            tables["IP"] = DeviceUtility.GetIp();
@@ -44,7 +44,7 @@
            tables["RegionName"] = "data";
            tables["AccountID"] = SDKUtility.Instance.FreePlatformInfo == null ? "" : SDKUtility.Instance.FreePlatformInfo.account;
            tables["EventID"] = 9001.ToString();
            tables["ProductID"] = "xbqy";
            tables["ProductID"] = VersionConfig.Get().gameId;
            tables["Device"] = SystemInfo.deviceName;
            tables["IP"] = DeviceUtility.GetIp();
            tables["DeviceFlag"] = SDKUtility.Instance.Device.imei;
@@ -78,7 +78,7 @@
            tables["OperatorID"] = VersionConfig.Get().appId;
            tables["RegionName"] = StringUtility.Contact("s" + ServerListCenter.Instance.currentServer.region_flag);
            tables["EventID"] = 1102.ToString();
            tables["ProductID"] = "xbqy";
            tables["ProductID"] = VersionConfig.Get().gameId;
            tables["Time"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            tables["IP"] = DeviceUtility.GetIp();
            tables["AccountID"] = ModelCenter.Instance.GetModel<LoginModel>().sdkLoginResult.account;
@@ -98,7 +98,7 @@
            runtime["os_version"] = DeviceUtility.GetDeviceOSLevel();
            tables["Runtime"] = JsonMapper.ToJson(runtime);
            tables["Version"] = StringUtility.Contact(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex);
            HttpRequest.Instance.RequestHttpGet(StringUtility.Contact(url, HttpRequest.HashtablaToString(tables)), HttpRequest.defaultHttpContentType);
        }
@@ -116,7 +116,7 @@
        tables["RegionName"] = "data";
        tables["RegionID"] = ServerListCenter.Instance.currentServer.region_flag.ToString();
        tables["EventID"] = 9002.ToString();
        tables["ProductID"] = "xbqy";
        tables["ProductID"] = VersionConfig.Get().gameId;
        tables["Time"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
        tables["IP"] = DeviceUtility.GetIp();
        tables["AccountID"] = ModelCenter.Instance.GetModel<LoginModel>().sdkLoginResult.account;
@@ -144,7 +144,7 @@
#if !UNITY_EDITOR
        bool isFairy = chatType == ChatInfoType.Fairy;
        var tables = new Dictionary<string, string>();
        tables["ProductID"] = "xbqy";
        tables["ProductID"] = VersionConfig.Get().gameId;
        tables["OperatorID"] = VersionConfig.Get().appId;
        tables["OperatorName"] = string.Empty;
        tables["RegionName"] = StringUtility.Contact("s", ServerListCenter.Instance.currentServer.region_flag);