少年修仙传客户端代码仓库
client_linchunjie
2018-09-26 9ee6fe853c33f10db9cd17312618d454609dc024
Merge branch 'master' into 3687天赋功能
17个文件已修改
223 ■■■■ 已修改文件
Core/GameEngine/Model/Config/InSevenDaysConfig.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/InSevenDaysConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C0_tagCMDogzEquipItem.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/State/SMB/Run_1.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/BossFakeLineUtility.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dogz/DogzItemCell.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dogz/DogzModel.cs 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dogz/DogzPackWin.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dogz/SelectCell.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemTipsModel.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/PackModelInterface.cs 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/InSevenDayWin.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Strengthening/CrystalSelectionWin.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Strengthening/GodBeastAttributes.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Strengthening/GodBeastEntry.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Strengthening/GodBeastSlidingList.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureModel.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/InSevenDaysConfig.cs
@@ -20,6 +20,7 @@
        public string ImgTxt2 { get ; private set; } 
        public string DayIcon { get ; private set; } 
        public int Money { get ; private set ; }
        public int IsTitle { get ; private set ; }
        public override string getKey()
        {
@@ -46,6 +47,8 @@
                DayIcon = rawContents[7].Trim();
            
                Money=IsNumeric(rawContents[8]) ? int.Parse(rawContents[8]):0; 
                IsTitle=IsNumeric(rawContents[9]) ? int.Parse(rawContents[9]):0;
            }
            catch (Exception ex)
            {
Core/GameEngine/Model/Config/InSevenDaysConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 9d99e3fb619c7cd42a34671aae8a28b1
timeCreated: 1537953751
timeCreated: 1537969598
licenseType: Free
MonoImporter:
  serializedVersion: 2
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C0_tagCMDogzEquipItem.cs
@@ -5,7 +5,8 @@
public class CA5C0_tagCMDogzEquipItem : GameNetPackBasic {
    public byte DogzID;    // 神兽ID
    public byte EquipIndex;    //神兽装备所在神兽背包索引
    public byte EquipIndexCount;
    public  byte[] EquipIndexList;    //神兽装备所在神兽背包索引列表
    public CA5C0_tagCMDogzEquipItem () {
        combineCmd = (ushort)0x03FE;
@@ -14,7 +15,8 @@
    public override void WriteToBytes () {
        WriteBytes (DogzID, NetDataType.BYTE);
        WriteBytes (EquipIndex, NetDataType.BYTE);
        WriteBytes (EquipIndexCount, NetDataType.BYTE);
        WriteBytes (EquipIndexList, NetDataType.BYTE, EquipIndexCount);
    }
}
Fight/Actor/State/SMB/Run_1.cs
@@ -4,14 +4,13 @@
{
    private bool m_SendOnce = false;
    private float m_CalculateRideTime;
    private ushort m_FrameCount;
    private float m_EscapeTime;
    protected override void OnEnter(GActor owner, Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        base.OnEnter(owner, animator, stateInfo, layerIndex);
        m_CalculateRideTime = Time.time;
        m_SendOnce = false;
        m_FrameCount = 0;
    }
    protected override void OnUpdate(GActor owner, Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
@@ -29,10 +28,10 @@
                }
            }
            m_FrameCount++;
            if ((m_FrameCount % 10) == 0)
            if ((Time.realtimeSinceStartup - m_EscapeTime) > .33f)
            {
                PlayerDatas.Instance.hero.PlayFootAudio();
                m_EscapeTime = Time.realtimeSinceStartup;
            }
        }
    }
Fight/BossFakeLineUtility.cs
@@ -30,7 +30,7 @@
    public bool IsShuntBoss(int _bossId)
    {
        if (TimeUtility.OpenDay > GeneralConfig.Instance.bossShuntDays)
        if (TimeUtility.OpenDay >= GeneralConfig.Instance.bossShuntDays)
        {
            return false;
        }
System/Dogz/DogzItemCell.cs
@@ -44,6 +44,7 @@
            itemBaisc.gameObject.SetActive(true);
            itemBaisc.Init(model,true);
            itemBaisc.bindIcon.gameObject.SetActive(false);
            itemBaisc.cellBtn.RemoveAllListeners();
            itemBaisc.cellBtn.AddListener(()=>
            {
System/Dogz/DogzModel.cs
@@ -521,11 +521,19 @@
            }
        }
        public void SendPutOnEquip(int index)
        public void SendPutOnEquip(List<int> indexlist)
        {
            if (indexlist == null || indexlist.Count < 1) return;
            CA5C0_tagCMDogzEquipItem dogzPutOn = new CA5C0_tagCMDogzEquipItem();
            dogzPutOn.DogzID = (byte)presentSelectDogz;
            dogzPutOn.EquipIndex = (byte)index;
            dogzPutOn.EquipIndexCount = (byte)indexlist.Count;
            byte[] indexBytes = new Byte[indexlist.Count];
            for(int i = 0; i < indexBytes.Length; i++)
            {
                indexBytes[i] = (byte)indexlist[i];
            }
            dogzPutOn.EquipIndexList = indexBytes;
            GameNetSystem.Instance.SendInfo(dogzPutOn);
        }
@@ -592,7 +600,7 @@
                    dogzItemList.Add(value);
                }
            }
            dogzItemList.Sort(CompareByDogzItemPack);
            return dogzItemList;
        }
@@ -610,6 +618,23 @@
            if (SelectDogzItemQuality == itemConfig.ItemColor && SelectDogzItemStart == itemConfig.StarLevel) return true;
            return false;
        }
        public int CompareByDogzItemPack(ItemModel start,ItemModel end)
        {
            int x = start.chinItemModel.EquipPlace;
            int y = end.chinItemModel.EquipPlace;
            if (x.CompareTo(y) != 0) return x.CompareTo(y);
            x = start.chinItemModel.ItemColor;
            y = end.chinItemModel.ItemColor;
            if (x.CompareTo(y) != 0) return -x.CompareTo(y);
            x = start.chinItemModel.StarLevel;
            y = end.chinItemModel.StarLevel;
            if (x.CompareTo(y) != 0) return -x.CompareTo(y);
            x = start.equipScore;
            y = end.equipScore;
            if (x.CompareTo(y) != 0) return -x.CompareTo(y);
            return 0;
        }
        public List<ItemModel> selectEquipPlacelist { get; private set; }
@@ -738,13 +763,24 @@
            bool isMaxAssistNum = GetAssistDogzCount() >= DogzAssistDefaultCnt ? true : false;
            if(!isMaxAssistNum)
            {
                int minAlreadyAssistId = 0;
                foreach (var dogzId in m_DogzEquipLimit.Keys)
                {
                    if (TryGetAssistDogzState(dogzId)
                        && ((minAlreadyAssistId < dogzId && minAlreadyAssistId != 0) || minAlreadyAssistId == 0))
                    {
                        minAlreadyAssistId = dogzId;
                    }
                }
                int maxDogzId = 0;
                foreach(var dogzId in m_DogzEquipLimit.Keys)
                {
                    var equips = GetDogzEquips(dogzId);
                    int equipNum = equips == null ? 0 : equips.Count;
                    if(equipNum >= 5 && maxDogzId < dogzId
                        && !TryGetAssistDogzState(dogzId))
                        && !TryGetAssistDogzState(dogzId)
                        && ((minAlreadyAssistId != 0 && dogzId > minAlreadyAssistId) || minAlreadyAssistId == 0))
                    {
                        maxDogzId = dogzId;
                    }
@@ -852,8 +888,7 @@
                foreach (var dogzId in m_DogzEquipLimit.Keys)
                {
                    if(TryGetAssistDogzState(dogzId)
                        && minAlreadyAssistId != 0
                        && minAlreadyAssistId < dogzId)
                        && ((minAlreadyAssistId < dogzId && minAlreadyAssistId != 0) || minAlreadyAssistId == 0))
                    {
                        minAlreadyAssistId = dogzId;
                    }
System/Dogz/DogzPackWin.cs
@@ -21,6 +21,7 @@
        [SerializeField] Image m_DogzHeadIcon;
        [SerializeField] Button m_CloseBtn;
        [SerializeField] Button m_GetEquipBtn;
        [SerializeField] Button m_OneKeyPutBtn;
        [SerializeField] ScrollerController m_PackController;
        [SerializeField] Button qualitySelectBtn;
        [SerializeField] Button starSelectBtn;
@@ -55,6 +56,7 @@
        {
            m_CloseBtn.onClick.AddListener(CloseClick);
            m_GetEquipBtn.onClick.AddListener(GetEquipBtn);
            m_OneKeyPutBtn.AddListener(ClickOneKeyPutBtn);
            qualitySelectBtn.AddListener(ClickQualitySelect);
            starSelectBtn.AddListener(ClickStarSelect);
        }
@@ -190,6 +192,24 @@
            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.DogzDungeon);
        }
        private void ClickOneKeyPutBtn()
        {
            List<int> indexlist = new List<int>();
            for(int i = 0; i < 5; i++)
            {
                dogzModel.GetDogzItemListByIndex(dogzModel.presentSelectDogz,i);
                if (dogzModel.selectEquipPlacelist.Count > 0)
                {
                    indexlist.Add(dogzModel.selectEquipPlacelist[0].itemInfo.ItemPlace);
                }
            }
            if(indexlist.Count > 0)
            {
                dogzModel.SendPutOnEquip(indexlist);
            }
        }
        private void ClickStarSelect()
        {
            starArrow.localRotation = Quaternion.Euler(0, 0, 0);
System/Dogz/SelectCell.cs
@@ -1,4 +1,5 @@
using EnhancedUI.EnhancedScroller;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
@@ -21,6 +22,7 @@
            nameTex.text = model.chinItemModel.ItemName;
            nameTex.color = UIHelper.GetUIColor(model.chinItemModel.ItemColor,true);
            itemBaisc.Init(model);
            itemBaisc.bindIcon.gameObject.SetActive(false);
            int strenLv = 0;
            if (model.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus) != null)
            {
@@ -39,7 +41,9 @@
            selectBtn.RemoveAllListeners();
            selectBtn.AddListener(()=>
            {
                dogzModel.SendPutOnEquip(model.itemInfo.ItemPlace);
                List<int> indexlist = new List<int>();
                indexlist.Add(model.itemInfo.ItemPlace);
                dogzModel.SendPutOnEquip(indexlist);
                WindowCenter.Instance.CloseImmediately<SelectDogzItemWin>();
            });
        }
System/KnapSack/Logic/ItemTipsModel.cs
@@ -814,7 +814,11 @@
            switch (attrData.winType)
            {
                case ItemWinType.equipWin:
                    attrData.SetTipsFuncBtn(ItemWinBtnType.putOn, (ItemWinBtnType, ItemAttrData) => { dogzModel.SendPutOnEquip(attrData.index); });
                    attrData.SetTipsFuncBtn(ItemWinBtnType.putOn, (ItemWinBtnType, ItemAttrData) => {
                        List<int> indexlist = new List<int>();
                        indexlist.Add(attrData.index);
                        dogzModel.SendPutOnEquip(indexlist);
                    });
                    break;
            }
        }
System/KnapSack/Logic/PackModelInterface.cs
@@ -297,19 +297,31 @@
            curEquipAttrDict.Clear();
            itemEffectDict.Clear();
            _equipGSFormulaDict.Clear();
            try
            {
                if (tagChinModel.Effect1 != 0)
                    itemEffectDict.Add(tagChinModel.Effect1, tagChinModel.EffectValueA1);
                {
                    ConvertAttrId(tagChinModel.Effect1, tagChinModel.EffectValueA1, itemEffectDict);
                }
                if (tagChinModel.Effect2 != 0)
                    itemEffectDict.Add(tagChinModel.Effect2, tagChinModel.EffectValueA2);
                {
                    ConvertAttrId(tagChinModel.Effect2, tagChinModel.EffectValueA2, itemEffectDict);
                }
                if (tagChinModel.Effect3 != 0)
                    itemEffectDict.Add(tagChinModel.Effect3, tagChinModel.EffectValueA3);
                {
                    ConvertAttrId(tagChinModel.Effect3, tagChinModel.EffectValueA3, itemEffectDict);
                }
                if (tagChinModel.Effect4 != 0)
                    itemEffectDict.Add(tagChinModel.Effect4, tagChinModel.EffectValueA4);
                {
                    ConvertAttrId(tagChinModel.Effect4, tagChinModel.EffectValueA4, itemEffectDict);
                }
                if (tagChinModel.Effect5 != 0)
                    itemEffectDict.Add(tagChinModel.Effect5, tagChinModel.EffectValueA5);
                {
                    ConvertAttrId(tagChinModel.Effect5, tagChinModel.EffectValueA5, itemEffectDict);
                }
            }
            catch (Exception ex)
@@ -399,6 +411,42 @@
            }
            return 0;
        }
        private void ConvertAttrId(int attrId,int attrValue,Dictionary<int,int> keyValues)
        {
            switch((AttrEnum)attrId)
            {
                case AttrEnum.ATK:
                    if(!keyValues.ContainsKey((int)AttrEnum.MinAtk))
                    {
                        keyValues.Add(((int)AttrEnum.MinAtk),attrValue);
                    }
                    else
                    {
                        keyValues[(int)AttrEnum.MinAtk] += attrValue;
                    }
                    if (!keyValues.ContainsKey((int)AttrEnum.MaxAtk))
                    {
                        keyValues.Add(((int)AttrEnum.MaxAtk), attrValue);
                    }
                    else
                    {
                        keyValues[(int)AttrEnum.MaxAtk] += attrValue;
                    }
                    break;
                default:
                    if (!keyValues.ContainsKey(attrId))
                    {
                        keyValues.Add(attrId, attrValue);
                    }
                    else
                    {
                        keyValues[attrId] += attrValue;
                    }
                    break;
            }
        }
        #endregion
        #region 主界面物品弹框展示
System/OpenServerActivity/InSevenDayWin.cs
@@ -24,6 +24,7 @@
        [SerializeField] RewardInformation m_rewardInformation;
        [SerializeField] Text m_TextName;
        [SerializeField] Image m_ImageShow;
        [SerializeField] Image m_ImageShowCH;
        [SerializeField] Image m_ImageDay;
        [SerializeField] Image m_ImageTex1;
        [SerializeField] Image m_ImageTex2;
@@ -119,8 +120,21 @@
            }
            m_rewardInformation.GetIsDays(SelectedDay);
            m_TextName.text = InsevenConfig.RewardName;
            if (InsevenConfig.IsTitle == 1)
            {
                m_ImageShow.gameObject.SetActive(false);
                m_ImageShowCH.gameObject.SetActive(true);
                m_ImageShowCH.SetSprite(InsevenConfig.Image);
                m_ImageShowCH.SetNativeSize();
            }
            else
            {
                m_ImageShowCH.gameObject.SetActive(false);
                m_ImageShow.gameObject.SetActive(true);
            m_ImageShow.SetSprite(InsevenConfig.Image);
            m_ImageShow.SetNativeSize();
            }
            m_ImageDay.SetSprite(InsevenConfig.DayIcon);
            m_ImageDay.SetNativeSize();
            m_ImageTex1.SetSprite(InsevenConfig.ImgTxt1);
System/Strengthening/CrystalSelectionWin.cs
@@ -42,7 +42,10 @@
        protected override void OnPreOpen()
        {
            m_TextDisplay.text = "你拥有" + godBeastModel.Crystal_ItemModel.itemInfo.ItemCount + "个强化水晶";
            string str = godBeastModel.Crystal_ItemModel.chinItemModel.ItemName;
            m_TextDisplay.text = string.Format(Language.Get("OwnQuantity_SH"), godBeastModel.Crystal_ItemModel.itemInfo.ItemCount,
                UIHelper.GetTextColorByItemColor(godBeastModel.Crystal_ItemModel.chinItemModel.ItemColor, str, true));
            m_Slider.minValue = 0;
            m_Slider.maxValue = godBeastModel.Crystal_ItemModel.itemInfo.ItemCount;
            if (godBeastModel.Absorption_Dic.ContainsKey(godBeastModel.ItemInde))
System/Strengthening/GodBeastAttributes.cs
@@ -207,10 +207,7 @@
                    m_BottomBox.SetActive(false);
                    m_Text_two.SetActive(false);
                    m_FrameNull.SetActive(false);
                    m_TextAttributes1.gameObject.SetActive(false);
                    m_TextAttributes2.gameObject.SetActive(false);
                    m_TextAttributesAdd1.gameObject.SetActive(false);
                    m_TextAttributesAdd2.gameObject.SetActive(false);
                    FullLevelAttributes();//设置满级属性
                    m_FullLevel.SetActive(true);
                    GodBeast_Number = GodBeastNumber;
                    GodBeast_Part = GodBeastPart;
@@ -496,6 +493,29 @@
            }
        }
        private void FullLevelAttributes()//设置满级属性
        {
            var DogzEquipConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(GodBeastPart, DogZLv);
            int[] AttType = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attType);
            int[] AttValue = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attValue);
            m_TextAttributesAdd1.gameObject.SetActive(false);
            m_TextAttributesAdd2.gameObject.SetActive(false);
            if (AttType.Length > 1)
            {
                m_TextAttributes1.gameObject.SetActive(true);
                m_TextAttributes2.gameObject.SetActive(true);
                string StrName1 = Config.Instance.Get<PlayerPropertyConfig>(AttType[0]).Name;
                string StrName2 = Config.Instance.Get<PlayerPropertyConfig>(AttType[1]).Name;
                m_TextAttributes1.text = StrName1 + ":" + AttValue[0];
                m_TextAttributes2.text = StrName2 + ":" + AttValue[1];
            }
            else
            {
                m_TextAttributes2.gameObject.SetActive(false);
                string StrName1 = Config.Instance.Get<PlayerPropertyConfig>(AttType[0]).Name;
                m_TextAttributes1.text = StrName1 + ":" + AttValue[0];
            }
        }
    }
}
System/Strengthening/GodBeastEntry.cs
@@ -37,7 +37,7 @@
                {
                    if (itemModel[i].EquipPlace == godBeastPart)
                    {
                        ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0, itemModel[i].itemInfo.IsBind);
                        ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0, 0);//不显示绑定
                        m_itemCell.Init(ItemModel);
                        var itemConfig = Config.Instance.Get<ItemConfig>(itemModel[i].itemId);
                        var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
System/Strengthening/GodBeastSlidingList.cs
@@ -334,19 +334,19 @@
            switch (Type)
            {
                case 0:
                    m_Label.text = "强化水晶";
                    m_Label.text = Language.Get("Crystal_SH");
                    break;
                case 2:
                    m_Label.text = "蓝色以下";
                    m_Label.text = Language.Get("BelowBlue_SH");
                    break;
                case 3:
                    m_Label.text = "紫色以下";
                    m_Label.text = Language.Get("BelowPurple_SH");
                    break;
                case 4:
                    m_Label.text = "橙色以下";
                    m_Label.text = Language.Get("BelowOrange_SH");
                    break;
                case 10:
                    m_Label.text = "全部";
                    m_Label.text = Language.Get("All_SH");
                    break;
                default:
                    break;
System/Treasure/TreasureModel.cs
@@ -1301,7 +1301,7 @@
            treasureUnOpens.AddRange(ConfigParse.GetMultipleStr<int>(funcConfig.Numerical1));
        }
        const string pattern = "\\\"[0-9]\\\":\\[[0-9|,]*\\]";
        const string pattern = "\\\"[0-9]+\\\":\\[[0-9|,]*\\]";
        private void ParseSkillLevelUpConfig()
        {
            try
@@ -1315,7 +1315,7 @@
                    var stringArray = match.Split(':');
                    var key = 0;
                    int.TryParse(Regex.Match(stringArray[0], "[0-9]").Value, out key);
                    int.TryParse(Regex.Match(stringArray[0], "[0-9]+").Value, out key);
                    var skillList = skillLevelUpTypes[key] = new List<int>();
                    var skillMatches = Regex.Matches(stringArray[1], "[0-9]{2,}");
                    for (int j = 0; j < skillMatches.Count; j++)