少年修仙传客户端代码仓库
client_Zxw
2018-09-27 17d155789d26f4d301efba4054c8947f0cfadf01
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
4个文件已修改
55 ■■■■ 已修改文件
System/ClientVersion/VersionUtility.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dogz/DogzEquip.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dogz/DogzPackWin.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/New/CommonItemBaisc.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ClientVersion/VersionUtility.cs
@@ -26,7 +26,7 @@
    }
    public VersionInfo versionInfo { get; private set; }
    public MaoErVersion maoerVersion;
    public JsonData maoerVersion;
    public bool completed { get { return step == Step.Completed; } }
    Step m_Step = Step.None;
@@ -146,7 +146,14 @@
    {
        if (IsMaoErGame())
        {
            return maoerVersion.url;
            if (maoerVersion.Keys.Contains("url"))
            {
                return maoerVersion["url"].ToString();
            }
            else
            {
                return string.Empty;
            }
        }
        else
        {
@@ -159,13 +166,13 @@
    {
        if (IsMaoErGame())
        {
            if (string.IsNullOrEmpty(maoerVersion.content))
            if (maoerVersion.Keys.Contains("content"))
            {
                return string.Empty;
                return StringUtility.Contact(Language.GetFromLocal(30), "\r\n", maoerVersion["content"].ToString());
            }
            else
            {
                return StringUtility.Contact(Language.GetFromLocal(30), "\r\n", maoerVersion.content);
                return string.Empty;
            }
        }
        else
@@ -236,24 +243,20 @@
            var tables = new Dictionary<string, string>();
            tables["uid"] = ModelCenter.Instance.GetModel<LoginModel>().sdkLoginResult.account;
            var url = "https://api.maoergame.com/update/download/url";
            Debug.LogFormat("猫耳强更url:{0}  uid:{1} ", url, ModelCenter.Instance.GetModel<LoginModel>().sdkLoginResult.account);
            HttpRequest.Instance.RequestHttpPost(url, tables, HttpRequest.defaultHttpContentType, 1, OnMaoErVersionCheckResult);
        }
    }
    private void OnMaoErVersionCheckResult(bool ok, string result)
    {
        UTF8Encoding utf8 = new UTF8Encoding();
        Byte[] encodedBytes = utf8.GetBytes(result);
        String decodedString = utf8.GetString(encodedBytes);
        Debug.LogFormat("猫耳强更请求返回结果 result:{0}:{1}", ok, result);
        Debug.LogFormat("猫耳强更请求返回结果 result:{0}", decodedString);
        if (ok)
        {
            try
            {
                maoerVersion = JsonMapper.ToObject<MaoErVersion>(result);
                if (maoerVersion.code == 0)
                maoerVersion = JsonMapper.ToObject(result);
                if (maoerVersion.Keys.Contains("code") && maoerVersion["code"].ToString() == "0")
                {
                    step = Step.DownLoadPrepared;
                    WindowCenter.Instance.OpenFromLocal<VersionUpdateWin>();
@@ -266,6 +269,7 @@
            }
            catch (System.Exception ex)
            {
                Debug.Log(ex);
                step = Step.None;
                Clock.Create(DateTime.Now + new TimeSpan(TimeSpan.TicksPerSecond), RequestMaoErVersionCheck);
            }
@@ -346,7 +350,7 @@
    public struct MaoErVersion
    {
        public string msg;
        public int code;
        public string code;
        public string content;
        public string url;
    }
System/Dogz/DogzEquip.cs
@@ -15,6 +15,7 @@
        public void Display(ItemModel model)
        {
            itemBaisc.Init(model);
            itemBaisc.bindIcon.gameObject.SetActive(false);
            int strenLv = 0;
            if(model.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus) != null)
            {
System/Dogz/DogzPackWin.cs
@@ -264,7 +264,26 @@
                dogzModel.GetDogzItemListByIndex(dogzModel.presentSelectDogz,i);
                if (dogzModel.selectEquipPlacelist.Count > 0)
                {
                    indexlist.Add(dogzModel.selectEquipPlacelist[0].itemInfo.ItemPlace);
                    ItemModel selectModel = dogzModel.selectEquipPlacelist[0];
                    ItemModel itemModel = null;
                    int equipPlace = dogzModel.GetDogzEquipPlaceByIndex(i);
                    dogzModel.TryGetDogzEquip(dogzModel.presentSelectDogz,equipPlace,out itemModel);
                    if(itemModel == null)
                    {
                        indexlist.Add(selectModel.itemInfo.ItemPlace);
                    }
                    else
                    {
                        if (itemModel.chinItemModel.ItemColor < selectModel.chinItemModel.ItemColor
                           || (itemModel.chinItemModel.StarLevel < selectModel.chinItemModel.StarLevel
                           && itemModel.chinItemModel.ItemColor == selectModel.chinItemModel.ItemColor)
                            || (itemModel.equipScore < selectModel.equipScore
                            && itemModel.chinItemModel.ItemColor == selectModel.chinItemModel.ItemColor
                            && itemModel.chinItemModel.StarLevel == selectModel.chinItemModel.StarLevel))
                        {
                            indexlist.Add(dogzModel.selectEquipPlacelist[0].itemInfo.ItemPlace);
                        }
                    }
                }
            }
            if(indexlist.Count > 0)
System/KnapSack/New/CommonItemBaisc.cs
@@ -218,7 +218,8 @@
        {
            ItemConfig config = Config.Instance.Get<ItemConfig>(itemId);
            int playerJob = PlayerDatas.Instance.baseData.Job;
            if (config == null || (!isCompare && compareSocre <= 0) || config.EquipPlace == 0 || score == compareSocre) return 0;
            if (config == null || (!isCompare && compareSocre <= 0) || config.EquipPlace == 0
                || score == compareSocre || type == PackType.rptEquip || type == PackType.rptDogzEquip) return 0;
            ItemModel model = playerPack.GetItemModelByGUID(guid);
            if (model != null && modelInterface.IsOverdue(guid, itemId, model.useDataDict)) return 1;