少年修仙传客户端代码仓库
client_linchunjie
2018-09-19 f7157efb7689b4e16b78067f45b1272621a48992
3685 【前端】只有通过合成的双属性才能分解出符印融合石
2个文件已修改
97 ■■■■■ 已修改文件
System/Rune/RuneBreakWin.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Rune/RuneModel.cs 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Rune/RuneBreakWin.cs
@@ -222,7 +222,8 @@
                var _data = model.runeBreakList[key];
                _itemCnt += model.GetRuneBreakExp(_data);
                _soulCnt += model.GetRuneSoulBreakExp(_data);
                if (runeComposeModel.m_RuneBothPropertys.Contains(_data.id))
                if (runeComposeModel.m_RuneBothPropertys.Contains(_data.id)
                    && model.ResolveFusionStone(_data.sourceType))
                {
                    var _composeCfg = Config.Instance.Get<RuneComposeConfig>(_data.id);
                    _magicCnt += (_composeCfg == null ? 0 : _composeCfg.NeedMJ);
System/Rune/RuneModel.cs
@@ -609,18 +609,19 @@
                runeData = runeData.Insert(0, _textBuilder.ToString());
                int id = int.Parse(runeData.Substring(5, 5));
                int lv = int.Parse(runeData.Substring(2, 3)) + 1;
                int sourceType = int.Parse(runeData.Substring(1, 1));
                int packType = vNetData.PackType;
                int index = item.ItemPlace;
                RuneData data = null;
                runePackData.TryGetValue(index, out data);
                if (data == null)
                {
                    data = new RuneData(index, id, lv, packType, 0);
                    data = new RuneData(index, id, lv, packType, sourceType, 0);
                    runePackData.Add(index, data);
                }
                else
                {
                    data.SetRuneData(index, id, lv, packType, 0);
                    data.SetRuneData(index, id, lv, packType, sourceType, 0);
                }
            }
            if (OnRefreshRunePack != null)
@@ -671,15 +672,16 @@
                        continue;
                    }
                    int lv = int.Parse(runeData.Substring(2, 3)) + 1;
                    int sourceType = int.Parse(runeData.Substring(1, 1));
                    int placetype = 1;
                    if (data == null)
                    {
                        data = new RuneData(i, id, lv, (int)PackType.rptInterimPack, placetype);
                        data = new RuneData(i, id, lv, (int)PackType.rptInterimPack, sourceType, placetype);
                        runeHoleData.Add(i, data);
                    }
                    else
                    {
                        data.SetRuneData(i, id, lv, (int)PackType.rptInterimPack, placetype);
                        data.SetRuneData(i, id, lv, (int)PackType.rptInterimPack, sourceType, placetype);
                    }
                }
                else
@@ -768,6 +770,15 @@
                    WindowCenter.Instance.Open<RechargeTipWin>();
                    break;
            }
        }
        public bool ResolveFusionStone(int sourceType)
        {
            if (sourceType == 0 || sourceType == 2)
            {
                return true;
            }
            return false;
        }
        public bool IsSpeicalHole(int hole)
@@ -1195,70 +1206,77 @@
        public int cost;
    }
    public enum RuneSource
    {
        Normal,
        Compose,
    }
    public class RuneData
    {
        /// <summary>
        /// 符印对应位置索引,若在孔上则对应孔id,若在背包,则对应背包位置索引
        /// </summary>
        private int _index = -1;
        public int index {
            get { return _index; }
        }
        private int m_Index = -1;
        public int index { get { return m_Index; } }
        /// <summary>
        /// 符印对应物品id
        /// </summary>
        private int _id = -1;
        public int id { get { return _id; } }
        private int m_Id = -1;
        public int id { get { return m_Id; } }
        /// <summary>
        /// 符印对应强化等级
        /// </summary>
        private int _lv = 0;
        public int lv {
            get { return _lv; }
        }
        private int m_Level = 0;
        public int lv { get { return m_Level; } }
        /// <summary>
        /// 预留字段
        /// </summary>
        private int _locked = -1;
        public int locked { get { return _locked; } }
        private int m_Lock = -1;
        public int locked { get { return m_Lock; } }
        /// <summary>
        /// 背包类型,符印背包255
        /// </summary>
        private int _packtype = -1;
        public int packtype { get { return _packtype; } }
        private int m_PackType = -1;
        public int packtype { get { return m_PackType; } }
        /// <summary>
        /// 符印放置位置,默认为符印背包
        /// </summary>
        private int _placetype = 0;
        public int placetype { get { return _placetype; } }
        private int m_PlaceType = 0;
        public int placetype { get { return m_PlaceType; } }
        public int m_SourceType = 0;
        public int sourceType { get { return m_SourceType; } }//来源(老号0,默认1,合成2)
        public bool IsRuneCream { get; private set; }
        public RuneData(int index, int id, int lv, int packtype, int placetype = 0)
        public RuneData(int index, int id, int level, int packtype, int sourcetype, int placetype = 0)
        {
            this._index = index;
            this._id = id;
            this._lv = lv;
            this._packtype = packtype;
            this._placetype = placetype;
            var _itemCfg = Config.Instance.Get<ItemConfig>(id);
            if (_itemCfg != null)
            m_Index = index;
            m_Id = id;
            m_Level = level;
            m_PackType = packtype;
            m_PlaceType = placetype;
            m_SourceType = sourcetype;
            var config = Config.Instance.Get<ItemConfig>(id);
            if (config != null)
            {
                IsRuneCream = _itemCfg.Type == RuneModel.RUNE_CREAMTYPE;
                IsRuneCream = config.Type == RuneModel.RUNE_CREAMTYPE;
            }
        }
        public void SetRuneData(int index, int id, int lv, int packtype, int placetype = 0)
        public void SetRuneData(int index, int id, int level, int packtype, int sourcetype, int placetype = 0)
        {
            this._index = index;
            this._id = id;
            this._lv = lv;
            this._packtype = packtype;
            this._placetype = placetype;
            var _itemCfg = Config.Instance.Get<ItemConfig>(id);
            if (_itemCfg != null)
            m_Index = index;
            m_Id = id;
            m_Level = level;
            m_PackType = packtype;
            m_PlaceType = placetype;
            m_SourceType = sourcetype;
            var config = Config.Instance.Get<ItemConfig>(id);
            if (config != null)
            {
                IsRuneCream = _itemCfg.Type == RuneModel.RUNE_CREAMTYPE;
                IsRuneCream = config.Type == RuneModel.RUNE_CREAMTYPE;
            }
        }
    }