少年修仙传客户端代码仓库
client_linchunjie
2018-09-18 d1fe47e500458a48b2aa2f5f326eee03eb50f85a
Merge branch '3610法宝之魂改为由各个法宝单独觉醒,取消激活条件'
17个文件已修改
540 ■■■■■ 已修改文件
Core/GameEngine/Model/Config/TreasureConfig.cs 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/TreasureConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/TreasureUpConfig.cs 79 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/TreasureUpConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/PlayerMainDate.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/DragSelectComponent.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureData.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureLevelUpWin.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureMeridianBehaviour.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureModel.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureNewGotBehaviour.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasurePotentialPanel.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulBehaviour.cs 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulModel.cs 134 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulWin.cs 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureStageTipWin.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureUnlockCell.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/TreasureConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:            第二世界
//    [  Date ]:           Friday, June 29, 2018
//    [  Date ]:           Tuesday, September 18, 2018
//--------------------------------------------------------
using UnityEngine;
@@ -9,8 +9,8 @@
namespace TableConfig {
    
    public partial class TreasureConfig : ConfigBase {
    public partial class TreasureConfig : ConfigBase {
        public int ID { get ; private set ; }
        public int Category { get ; private set ; }
        public int PreTreasure { get ; private set ; }
@@ -29,20 +29,21 @@
        public int LineId { get ; private set ; }
        public int ChallengeLevel { get ; private set ; }
        public int[] Potentials;
        public int[] SkillPower;
        public string NeedItem { get ; private set; } 
        public int EffectID { get ; private set ; }
        public string[] Verse;
        public int ShowNetGotEffect { get ; private set ; }
        public int PreferredStage { get ; private set ; }
        public int PreferredStage { get ; private set ; }
        public override string getKey()
        {
            return ID.ToString();
        public override string getKey()
        {
            return ID.ToString();
        }
        public override void Parse() {
            try
            {
            try
            {
                ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; 
            
                Category=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; 
@@ -89,19 +90,26 @@
                     int.TryParse(PotentialsStringArray[i],out Potentials[i]);
                }
            
                NeedItem = rawContents[18].Trim();
                string[] SkillPowerStringArray = rawContents[18].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                SkillPower = new int[SkillPowerStringArray.Length];
                for (int i=0;i<SkillPowerStringArray.Length;i++)
                {
                     int.TryParse(SkillPowerStringArray[i],out SkillPower[i]);
                }
            
                EffectID=IsNumeric(rawContents[19]) ? int.Parse(rawContents[19]):0;
                NeedItem = rawContents[19].Trim();
            
                Verse = rawContents[20].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                EffectID=IsNumeric(rawContents[20]) ? int.Parse(rawContents[20]):0;
            
                ShowNetGotEffect=IsNumeric(rawContents[21]) ? int.Parse(rawContents[21]):0;
                Verse = rawContents[21].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
            
                PreferredStage=IsNumeric(rawContents[22]) ? int.Parse(rawContents[22]):0;
            }
            catch (Exception ex)
            {
                DebugEx.Log(ex);
                ShowNetGotEffect=IsNumeric(rawContents[22]) ? int.Parse(rawContents[22]):0;
                PreferredStage=IsNumeric(rawContents[23]) ? int.Parse(rawContents[23]):0;
            }
            catch (Exception ex)
            {
                DebugEx.Log(ex);
            }
        }
    
Core/GameEngine/Model/Config/TreasureConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 607f2341c6f1e3e468b7eb233bc91ff2
timeCreated: 1530238289
timeCreated: 1537237950
licenseType: Pro
MonoImporter:
  serializedVersion: 2
Core/GameEngine/Model/Config/TreasureUpConfig.cs
@@ -1,16 +1,16 @@
//--------------------------------------------------------
//    [Author]:            第二世界
//    [  Date ]:           Monday, September 03, 2018
//--------------------------------------------------------
using UnityEngine;
using System;
namespace TableConfig {
    public partial class TreasureUpConfig : ConfigBase {
//--------------------------------------------------------
//    [Author]:            第二世界
//    [  Date ]:           Tuesday, September 18, 2018
//--------------------------------------------------------
using UnityEngine;
using System;
namespace TableConfig {
    public partial class TreasureUpConfig : ConfigBase {
        public int ID { get ; private set ; }
        public int MWID { get ; private set ; }
        public int LV { get ; private set ; }
@@ -20,16 +20,17 @@
        public int UnLockFuncID { get ; private set ; }
        public int ActiveMWID { get ; private set ; }
        public string ItemAward { get ; private set; } 
        public string DescriptionMainWin { get ; private set; }
        public override string getKey()
        {
            return ID.ToString();
        }
        public override void Parse() {
            try
            {
        public int SoulID { get ; private set ; }
        public string DescriptionMainWin { get ; private set; }
        public override string getKey()
        {
            return ID.ToString();
        }
        public override void Parse() {
            try
            {
                ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; 
            
                MWID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; 
@@ -53,18 +54,20 @@
            
                ItemAward = rawContents[8].Trim();
            
                DescriptionMainWin = rawContents[9].Trim();
            }
            catch (Exception ex)
            {
                DebugEx.Log(ex);
            }
        }
    }
}
                SoulID=IsNumeric(rawContents[9]) ? int.Parse(rawContents[9]):0;
                DescriptionMainWin = rawContents[10].Trim();
            }
            catch (Exception ex)
            {
                DebugEx.Log(ex);
            }
        }
    }
}
Core/GameEngine/Model/Config/TreasureUpConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 882666fd713678849aebb360643bfe19
timeCreated: 1535946483
timeCreated: 1537237919
licenseType: Pro
MonoImporter:
  serializedVersion: 2
System/MainInterfacePanel/PlayerMainDate.cs
@@ -337,6 +337,10 @@
    public void PowerAdd(int power)
    {
        if (ModelCenter.Instance.GetModel<TreasureModel>().inPotentialModifyPower)
        {
            return;
        }
        if (prowBool)
        {
            prowNum = power;
System/Treasure/DragSelectComponent.cs
@@ -23,7 +23,8 @@
        {
            if (Input.touchCount > 1 || NewBieCenter.Instance.inGuiding
                || WindowCenter.Instance.CheckOpen<TreasureNewStageWin>()
                || WindowCenter.Instance.CheckOpen<PotentialItemUseWin>())
                || WindowCenter.Instance.CheckOpen<PotentialItemUseWin>()
                || WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>())
            {
                m_StartDrag = false;
                return;
System/Treasure/TreasureData.cs
@@ -558,6 +558,7 @@
        public int func { get; private set; }
        public Item item { get; private set; }
        public int treasure { get; private set; }
        public int treasureSoul { get; private set; }
        public int exp { get; set; }
        public int stateSfxId { get; private set; }
        public const int selectedSfxId = 5144;
@@ -591,6 +592,11 @@
            {
                unlockType = TreasureStageUnlock.Treasure;
                treasure = _config.ActiveMWID;
            }
            else if (_config.SoulID != 0)
            {
                unlockType = TreasureStageUnlock.TreasureSoul;
                treasureSoul = _config.SoulID;
            }
            else if (!string.IsNullOrEmpty(_config.ItemAward))
            {
@@ -661,6 +667,7 @@
        Func,
        Item,
        Treasure,
        TreasureSoul,
    }
}
System/Treasure/TreasureLevelUpWin.cs
@@ -460,6 +460,7 @@
                    case TreasureStageUnlock.Skill:
                    case TreasureStageUnlock.Func:
                    case TreasureStageUnlock.Treasure:
                    case TreasureStageUnlock.TreasureSoul:
                        m_Controller.AddCell(ScrollerDataType.Header, stage.stage);
                        break;
                }
@@ -503,20 +504,6 @@
                        m_TreasureChallengeLimit.text = Language.Get("TreasureGetRequire", _taskConfig.lv);
                        break;
                }
            }
        }
        private void OpenTreasureStageTip(int _stage, RectTransform _target)
        {
            model.selectedStage = _stage;
            if (model.treasureStepUpShow)
            {
                return;
            }
            if (!WindowCenter.Instance.CheckOpen<TreasureStageTipWin>())
            {
                TreasureStageTipWin.SetTargetPosition(_target);
                WindowCenter.Instance.Open<TreasureStageTipWin>();
            }
        }
@@ -852,7 +839,7 @@
        private void WindowAfterCloseEvent(Window _win)
        {
            if (_win is TreasureNewStageWin)
            if (_win is TreasureNewStageWin || _win is TreasureSoulActiveWin)
            {
                if (m_Treasure.IsHighestStage && FuncOpen.Instance.IsFuncOpen(82))
                {
@@ -990,6 +977,10 @@
                    WindowJumpMgr.Instance.ClearJumpData();
                    WindowCenter.Instance.Open<MainInterfaceWin>();
                    CloseImmediately();
                    break;
                case TreasureStageUnlock.TreasureSoul:
                    TreasureSoulActiveWin.treasureSoulId = stage.treasureSoul;
                    WindowCenter.Instance.Open<TreasureSoulActiveWin>(true);
                    break;
            }
        }
@@ -1160,6 +1151,11 @@
                        m_CurrentStageIcon.SetSprite(_treasureConfig.Icon);
                        m_TreasureStageDesc.text = Language.Get("TreasureLevelUpTreasure", _treasureConfig.Name);
                        break;
                    case TreasureStageUnlock.TreasureSoul:
                        var _treasureSoulConfig = Config.Instance.Get<TreasurePrivilegeConfig>(_nextStage.treasureSoul);
                        m_CurrentStageIcon.SetSprite(_treasureSoulConfig.Icon);
                        m_TreasureStageDesc.text = Language.Get("TreasureLevelUpTreasureSoul", _treasureSoulConfig.Name);
                        break;
                }
            }
            else
System/Treasure/TreasureMeridianBehaviour.cs
@@ -188,6 +188,16 @@
                        m_Descs[0].text = treasureConfig.Name;
                        m_Icon.rectTransform.sizeDelta = new Vector2(86, 86);
                        break;
                    case TreasureStageUnlock.TreasureSoul:
                        m_Descs[0].gameObject.SetActive(true);
                        m_Descs[0].color = UIHelper.s_LightYellow;
                        var treasureSoulConfig = Config.Instance.Get<TreasurePrivilegeConfig>(m_TreasureStage.treasureSoul);
                        m_Icon.SetSprite(treasureSoulConfig.Icon);
                        m_Descs[0].text = treasureSoulConfig.Name;
                        m_Icon.SetNativeSize();
                        var sizeDelta = m_Icon.rectTransform.sizeDelta;
                        m_Icon.rectTransform.sizeDelta = new Vector2(86, (sizeDelta.y / sizeDelta.x) * 86);
                        break;
                }
            }
        }
System/Treasure/TreasureModel.cs
@@ -174,6 +174,7 @@
        List<int> m_CacheGotAchievements = new List<int>();
        Dictionary<int, int> treasureStageShowDict = new Dictionary<int, int>();
        List<int> treasureUnOpens = new List<int>();//版本未开放法宝
        Dictionary<int, int[]> potentialInitialPowers = new Dictionary<int, int[]>();
        public Dictionary<int, int> fairyTreasureGetDict { get; private set; }
@@ -203,6 +204,7 @@
        public bool openFromTreasureUnlockShow { get; set; }
        public bool openFromTreasureCollect { get; set; }
        public bool openFromTreasureList { get; set; }
        public bool inPotentialModifyPower { get; set; }
        public int openFromTaskId = 0;
        public List<int> castSoulGuideTaskIds { get; private set; }
@@ -1208,6 +1210,7 @@
                {
                    var caseSoulRedpoint = new Redpoint(CATEGORY_REDPOINTIDS[config.Category - 1], TREASURE_REDPOINTBASE + redpointIndex++);
                    treasure = new HumanTreasure(config.ID, config.Potentials, skillLevelUpRedpoint, achievementRedpoint, caseSoulRedpoint);
                    potentialInitialPowers.Add(config.ID, config.SkillPower);
                }
                else
                {
@@ -1410,6 +1413,19 @@
            }
            return true;
        }
        public int GetPotentialInitialPower(int treasureId, int index)
        {
            if (potentialInitialPowers.ContainsKey(treasureId))
            {
                var powerArray = potentialInitialPowers[treasureId];
                if (powerArray != null && index < powerArray.Length && index >= 0)
                {
                    return powerArray[index];
                }
            }
            return 0;
        }
    }
}
System/Treasure/TreasureNewGotBehaviour.cs
@@ -71,6 +71,16 @@
                            m_FuncName.text = treasureConfig.Name;
                        }
                        break;
                    case TreasureStageUnlock.TreasureSoul:
                        m_ContaienrTreasure.gameObject.SetActive(true);
                        var treasureSoulConfig = Config.Instance.Get<TreasurePrivilegeConfig>(treasureStage.treasureSoul);
                        if (treasureSoulConfig != null)
                        {
                            m_TreasureIcon.SetSprite(treasureSoulConfig.Icon);
                            m_Func.text = Language.Get("TreasureUnlockNewTreasureSoul");
                            m_FuncName.text = treasureSoulConfig.Name;
                        }
                        break;
                }
            }
        }
System/Treasure/TreasurePotentialPanel.cs
@@ -261,6 +261,8 @@
            m_TreasureAnimation.OnPotentialLineAnimComplete -= OnPotentialLineAnimComplete;
            m_SelectedPotential = 0;
            model.inPotentialModifyPower = false;
        }
        private void RedpointValueChangeEvent(int _id)
@@ -295,11 +297,28 @@
            }
        }
        private void ModifyPowerUp(int treasureId, int index, int fightPower)
        {
            var power = model.GetPotentialInitialPower(treasureId, index);
            if (power != 0)
            {
                ModelCenter.Instance.GetModel<PlayerMainDate>().FabaoPowerAdd(fightPower);
                model.inPotentialModifyPower = true;
            }
        }
        private void OnUnlockPotentialComplete(int _index)
        {
            selectedPotential = m_Treasure.potentials[_index].id;
            m_TreasureAnimation.DisplayPotentialLine(_index);
            HandleAchievement();
            if (model.inPotentialModifyPower)
            {
                var power = model.GetPotentialInitialPower(m_Treasure.id, _index);
                model.inPotentialModifyPower = false;
                ModelCenter.Instance.GetModel<PlayerMainDate>().FabaoPowerAdd(power);
            }
        }
        private void OnPotentialLineAnimComplete(int _index)
@@ -745,9 +764,26 @@
                DisplayPotentialEffect();
            }
            var potential = m_Treasure.GetPotential(_potentialId);
            if (potential != null)
            if (potential != null && model.serverInited)
            {
                PotentialLevelUpAnimation(_potentialId, potential.level);
                var nextPotential = GetNextPotential(potential.id);
                if (nextPotential != 0)
                {
                    var config = Config.Instance.Get<SkillConfig>(nextPotential);
                    if (potential.level == config.LearnSkillLV && potentialBriefInfos != null)
                    {
                        for (int i = 0; i < potentialBriefInfos.Length; i++)
                        {
                            if (potentialBriefInfos[i].potential.id == nextPotential)
                            {
                                var current = Config.Instance.Get<SkillConfig>(potential.id + potential.level - 1);
                                var before = Config.Instance.Get<SkillConfig>(potential.id + potential.level - 2);
                                ModifyPowerUp(m_Treasure.id, i, current.FightPower - before.FightPower);
                            }
                        }
                    }
                }
            }
            var levelUpConfig = GetPotentialLevelUpConfig();
            if (levelUpConfig.own < levelUpConfig.need)
System/Treasure/TreasureSoulBehaviour.cs
@@ -38,27 +38,27 @@
        {
            model.treasureSelectSoulChangeEvent += TreasureSelectSoulChangeEvent;
            model.treasureSoulEvent += TreasureSoulEvent;
            achievementModel.achievementCompletedEvent += AchievementCompletedEvent;
            //achievementModel.achievementCompletedEvent += AchievementCompletedEvent;
        }
        private void OnDisable()
        {
            model.treasureSelectSoulChangeEvent -= TreasureSelectSoulChangeEvent;
            model.treasureSoulEvent -= TreasureSoulEvent;
            achievementModel.achievementCompletedEvent -= AchievementCompletedEvent;
            //achievementModel.achievementCompletedEvent -= AchievementCompletedEvent;
        }
        private void AchievementCompletedEvent(int _id)
        {
            int achievementId = 0;
            if (model.TryGetLockAchievement(treasureSoulId, out achievementId))
            {
                if (achievementId == _id)
                {
                    DisplayState();
                }
            }
        }
        //private void AchievementCompletedEvent(int _id)
        //{
        //    int achievementId = 0;
        //    if (model.TryGetLockAchievement(treasureSoulId, out achievementId))
        //    {
        //        if (achievementId == _id)
        //        {
        //            DisplayState();
        //        }
        //    }
        //}
        public void Display(int _id)
        {
@@ -88,25 +88,27 @@
                }
                else
                {
                    int achievementId = 0;
                    bool unlock = true;
                    if (model.TryGetLockAchievement(treasureSoulId, out achievementId))
                    {
                        Achievement achievement;
                        if (achievementModel.TryGetAchievement(achievementId, out achievement))
                        {
                            unlock = achievement.completed;
                        }
                    }
                    if (unlock)
                    {
                        m_SoulState.text = Language.Get("TreasureSoul_Awaking");
                    }
                    else
                    {
                        var successConfig = Config.Instance.Get<SuccessConfig>(achievementId);
                        m_SoulState.text = Language.Get("TreasureSoulRealm", successConfig.NeedCnt);
                    }
                    m_SoulState.text = Language.Get("TreasureSoul_Awaking");
                    //int achievementId = 0;
                    //bool unlock = true;
                    //if (model.TryGetLockAchievement(treasureSoulId, out achievementId))
                    //{
                    //    Achievement achievement;
                    //    if (achievementModel.TryGetAchievement(achievementId, out achievement))
                    //    {
                    //        unlock = achievement.completed;
                    //    }
                    //}
                    //if (unlock)
                    //{
                    //    m_SoulState.text = Language.Get("TreasureSoul_Awaking");
                    //}
                    //else
                    //{
                    //    var successConfig = Config.Instance.Get<SuccessConfig>(achievementId);
                    //    m_SoulState.text = Language.Get("TreasureSoulRealm", successConfig.NeedCnt);
                    //}
                }
            }
        }
System/Treasure/TreasureSoulModel.cs
@@ -10,7 +10,6 @@
    {
        Dictionary<int, TreasureSpecialData> treasureSoulDict = new Dictionary<int, TreasureSpecialData>();
        List<int> treasureSouls = new List<int>();
        Dictionary<int, List<int>> soulAchievements = new Dictionary<int, List<int>>();
        public Dictionary<int, int> signAddProperty = new Dictionary<int, int>();
        public int signAddTreasure { get; private set; }
@@ -42,8 +41,6 @@
        {
            packModel.RefreshItemCountAct += RefreshItemCountAct;
            PlayerStrengthengDatas.RefreshEquipUpgradLvAct += RefreshEquipSTRLv;
            achievementModel.achievementProgressUpdateEvent += AchievementUpdate;
            achievementModel.achievementCompletedEvent += AchievementUpdate;
            ParseConfig();
        }
@@ -69,8 +66,6 @@
        {
            packModel.RefreshItemCountAct -= RefreshItemCountAct;
            PlayerStrengthengDatas.RefreshEquipUpgradLvAct -= RefreshEquipSTRLv;
            achievementModel.achievementProgressUpdateEvent -= AchievementUpdate;
            achievementModel.achievementCompletedEvent -= AchievementUpdate;
        }
        void ParseConfig()
@@ -85,7 +80,6 @@
                }
                treasureSouls.Add(configs[i].PrivilegeID);
                treasureSoulDict.Add(configs[i].PrivilegeID, new TreasureSpecialData((TreasurePrivilege)configs[i].PrivilegeID));
                soulAchievements.Add(configs[i].PrivilegeID, new List<int>(configs[i].successList));
            }
            var funcConfig = Config.Instance.Get<FuncConfigConfig>("MWSignDayAttr");
            var jsonData = LitJson.JsonMapper.ToObject(funcConfig.Numerical1);
@@ -101,82 +95,9 @@
            return treasureSouls;
        }
        public bool TryGetLockAchievement(int _id,out int achievementId)
        {
            achievementId = 0;
            List<int> list;
            if (soulAchievements.TryGetValue(_id, out list))
            {
                for (int i = 0; i < list.Count; i++)
                {
                    var config = Config.Instance.Get<SuccessConfig>(list[i]);
                    if (config != null && config.Type == 1)
                    {
                        achievementId = list[i];
                        return true;
                    }
                }
            }
            return false;
        }
        public bool TryGetAchievements(int _id,out List<int> list)
        {
            return soulAchievements.TryGetValue(_id, out list);
        }
        public bool IsCompleteLockAchievement(int _id)
        {
            TreasureSpecialData special;
            if (TryGetTreasureSoul(_id, out special))
            {
                if (special.active)
                {
                    return true;
                }
                int achievementId;
                if (TryGetLockAchievement(_id, out achievementId))
                {
                    Achievement achievement;
                    return achievementModel.TryGetAchievement(achievementId, out achievement) && achievement.completed;
                }
            }
            return true;
        }
        public bool IsCompleteAllAchievement(int _id)
        {
            if (soulAchievements.ContainsKey(_id))
            {
                var list = soulAchievements[_id];
                bool allCompleted = true;
                for (int i = 0; i < list.Count; i++)
                {
                    Achievement achievement;
                    achievementModel.TryGetAchievement(list[i], out achievement);
                    if (achievement == null || (!achievement.completed && !Achievement.IsReach(achievement.id, achievement.progress)))
                    {
                        allCompleted = false;
                    }
                }
                return allCompleted;
            }
            return false;
        }
        public bool TryGetTreasureSoul(int _id, out TreasureSpecialData special)
        {
            return treasureSoulDict.TryGetValue(_id, out special);
        }
        public void ActiveTreasureSoul(int _id)
        {
            if (IsCompleteAllAchievement(_id))
            {
                CA512_tagCMActiveMWSoul pak = new CA512_tagCMActiveMWSoul();
                pak.ID = (byte)_id;
                GameNetSystem.Instance.SendInfo(pak);
            }
        }
        public int GetTreasureSoulValue(int _soulId)
@@ -222,17 +143,6 @@
            }
        }
        private void AchievementUpdate(int _id)
        {
            foreach (var soulId in soulAchievements.Keys)
            {
                if (soulAchievements[soulId].Contains(_id))
                {
                    UpdateAchievementRedpoint(soulId);
                }
            }
        }
        public void UpdateTreasureSoulStrenthen()
        {
            UpdateRedpoint((int)TreasurePrivilege.StrengthenAdd);
@@ -254,19 +164,18 @@
                }
                bool beforeActived = special.active;
                special.active = _data.State == 1;
                if (!beforeActived && special.active && serverInited && WindowCenter.Instance.CheckOpen<TreasureSoulWin>()
                    && !WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>() && !NewBieCenter.Instance.inGuiding)
                {
                    TreasureSoulActiveWin.treasureSoulId = (int)_data.PriID;
                    WindowCenter.Instance.Open<TreasureSoulActiveWin>();
                }
                //if (!beforeActived && special.active && serverInited && WindowCenter.Instance.CheckOpen<TreasureSoulWin>()
                //    && !WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>() && !NewBieCenter.Instance.inGuiding)
                //{
                //    TreasureSoulActiveWin.treasureSoulId = (int)_data.PriID;
                //    WindowCenter.Instance.Open<TreasureSoulActiveWin>();
                //}
                if ((TreasurePrivilege)_data.PriID == TreasurePrivilege.StrengthenAdd)
                {
                    if (treasureSoulEvent != null)
                    {
                        treasureSoulEvent((int)_data.PriID);
                    }
                    UpdateAchievementRedpoint((int)_data.PriID);
                    UpdateRedpoint((int)_data.PriID);
                    continue;
                }
@@ -277,14 +186,12 @@
                special.presentGetCount = (int)_data.CurValue;
                special.itemGet = _data.ItemAwardState == 1;
                UpdateRedpoint((int)_data.PriID);
                UpdateAchievementRedpoint((int)_data.PriID);
                if (treasureSoulEvent != null)
                {
                    treasureSoulEvent((int)_data.PriID);
                }
                if (beforeFinishCount < special.presentFinishCount && serverInited && special.active
                    && !WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>()
                    && WindowCenter.Instance.CheckOpen<TreasureSoulWin>()
                    && !WindowCenter.Instance.CheckOpen<RealmPropertyUpWin>()
                    && !NewBieCenter.Instance.inGuiding)
@@ -308,7 +215,6 @@
                        _specialData.presentFinishCount = (int)_data.Cnt;
                        UpdateRedpoint((int)TreasurePrivilege.StrengthenAdd);
                        if (beforeFinishCount < _specialData.presentFinishCount && serverInited && _specialData.active
                             && !WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>()
                             && WindowCenter.Instance.CheckOpen<TreasureSoulWin>()
                             && !WindowCenter.Instance.CheckOpen<RealmPropertyUpWin>())
                        {
@@ -358,37 +264,11 @@
            }
        }
        private void UpdateAchievementRedpoint(int _id)
        {
            if (treasureSoulDict.ContainsKey(_id) && soulAchievements.ContainsKey(_id))
            {
                var special = treasureSoulDict[_id];
                special.activeRedpoint.state = RedPointState.None;
                if (!FuncOpen.Instance.IsFuncOpen(126) || !IsOpenTreasureSoul(_id) || special.active)
                {
                    return;
                }
                var list = soulAchievements[_id];
                bool allCompleted = true;
                for (int i = 0; i < list.Count; i++)
                {
                    Achievement achievement;
                    achievementModel.TryGetAchievement(list[i], out achievement);
                    if (achievement == null || (!achievement.completed && !Achievement.IsReach(achievement.id, achievement.progress)))
                    {
                        allCompleted = false;
                    }
                }
                special.activeRedpoint.state = allCompleted ? RedPointState.Simple : RedPointState.None;
            }
        }
        private void UpdateRedpoints()
        {
            foreach (var special in treasureSoulDict.Keys)
            {
                UpdateRedpoint(special);
                UpdateAchievementRedpoint(special);
            }
        }
    }
@@ -403,7 +283,6 @@
        public Dictionary<int, int> propertyDict { get; private set; }
        public Redpoint redpoint { get; private set; }
        public Redpoint privilegeRedpoint { get; private set; }
        public Redpoint activeRedpoint { get; private set; }
        public int treasureId { get; set; }
        public bool active { get; set; }
@@ -485,7 +364,6 @@
            }
            redpoint = new Redpoint(TreasureModel.TREASURE_SOUL_ID, TreasureModel.TREASURE_SOUL_ID * 100 + (int)type);
            activeRedpoint = new Redpoint(redpoint.id, redpoint.id * 100 + 1);
            switch (_type)
            {
                case TreasurePrivilege.DemonJarAtk:
System/Treasure/TreasureSoulWin.cs
@@ -26,7 +26,6 @@
        [SerializeField] UIEffect m_SoulEffect;
        [SerializeField] Button m_Active;
        [SerializeField] Text m_ActiveText;
        [SerializeField] Button m_GotoRealm;
        [SerializeField] List<TreasureSoulPattern> m_TreasureSouls;
@@ -35,9 +34,6 @@
        [SerializeField] RectTransform m_ContainerPreview;
        [SerializeField] Text m_PreviewTitle;
        [SerializeField] List<PropertyBehaviour> m_PreviewPropretys;
        [SerializeField] RectTransform m_ContainerCondition;
        [SerializeField] ScrollerController m_ConditonControl;
        TreasureSoulModel m_Model;
        TreasureSoulModel model
@@ -58,9 +54,9 @@
            }
        }
        AchievementModel achievementModel
        TreasureModel treasureModel
        {
            get { return ModelCenter.Instance.GetModel<AchievementModel>(); }
            get { return ModelCenter.Instance.GetModel<TreasureModel>(); }
        }
@@ -76,10 +72,8 @@
        protected override void AddListeners()
        {
            m_Active.onClick.AddListener(Active);
            m_GotoRealm.onClick.AddListener(GotoRealm);
            m_CloseBtn.onClick.AddListener(CloseClick);
            m_ScollerControl.OnRefreshCell += OnRefreshCell;
            m_ConditonControl.OnRefreshCell += OnRefreshConditionCell;
        }
        protected override void OnPreOpen()
@@ -87,7 +81,6 @@
            model.treasureSelectSoulChangeEvent += TreasureSelectSoulChangeEvent;
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
            model.treasureSoulEvent += TreasureSoulEvent;
            achievementModel.achievementCompletedEvent += AchievementCompletedEvent;
            m_TreasureSoulBtn.state = TitleBtnState.Click;
            Display();
        }
@@ -115,7 +108,6 @@
            model.treasureSelectSoulChangeEvent -= TreasureSelectSoulChangeEvent;
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= PlayerDataRefreshInfoEvent;
            model.treasureSoulEvent -= TreasureSoulEvent;
            achievementModel.achievementCompletedEvent -= AchievementCompletedEvent;
            for (int i = 0; i < m_TreasureSouls.Count; i++)
            {
                m_TreasureSouls[i].Dispose();
@@ -131,15 +123,6 @@
            }
        }
        #endregion
        private void AchievementCompletedEvent(int _id)
        {
            List<int> list;
            if (model.TryGetAchievements(model.selectSoul, out list) && list.Contains(_id))
            {
                DisplaySelect();
            }
        }
        private void Display()
        {
@@ -228,19 +211,16 @@
        private void Active()
        {
            model.ActiveTreasureSoul(model.selectSoul);
        }
        private void GotoRealm()
        {
            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.RealmFunc1);
            var config = Config.Instance.Get<TreasurePrivilegeConfig>(model.selectSoul);
            treasureModel.selectedTreasure = config.treasureId;
            treasureModel.currentCategory = TreasureCategory.Human;
            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.TreasureCollectSoul);
        }
        private void DisplaySelect()
        {
            TreasureSpecialData special;
            model.TryGetTreasureSoul(model.selectSoul, out special);
            m_ContainerCondition.gameObject.SetActive(false);
            if (special != null)
            {
                var config = Config.Instance.Get<TreasurePrivilegeConfig>((int)special.type);
@@ -256,27 +236,8 @@
                    m_SelectSoulImg.material = special.active ? MaterialUtility.GetUIDefaultGraphicMaterial() : MaterialUtility.GetDefaultSpriteGrayMaterial();
                    m_SelectSoulImg.SetNativeSize();
                    if (special.active)
                    {
                        m_Active.gameObject.SetActive(false);
                        m_GotoRealm.gameObject.SetActive(false);
                    }
                    else
                    {
                        if (!model.IsCompleteLockAchievement(model.selectSoul))
                        {
                            m_Active.gameObject.SetActive(false);
                            m_GotoRealm.gameObject.SetActive(false);
                        }
                        else
                        {
                            m_Active.gameObject.SetActive(true);
                            m_GotoRealm.gameObject.SetActive(false);
                            m_Active.SetInteractable(m_ActiveText, model.IsCompleteAllAchievement(model.selectSoul));
                            m_ContainerCondition.gameObject.SetActive(true);
                            DisplayCondition();
                        }
                    }
                    m_Active.gameObject.SetActive(!special.active);
                    m_ContainerPreview.gameObject.SetActive(!special.active);
                    m_SoulEffect.StopImediatly();
                    if (!special.active)
@@ -458,33 +419,6 @@
                    }
                    break;
            }
        }
        private void DisplayCondition()
        {
            m_ContainerCondition.gameObject.SetActive(true);
            List<int> list;
            model.TryGetAchievements(model.selectSoul, out list);
            m_ConditonControl.Refresh();
            if (list != null)
            {
                for (int i = 0; i < list.Count; i++)
                {
                    var config = Config.Instance.Get<SuccessConfig>(list[i]);
                    if (config != null && config.Type == 1)
                    {
                        continue;
                    }
                    m_ConditonControl.AddCell(ScrollerDataType.Header, list[i]);
                }
            }
            m_ConditonControl.Restart();
        }
        private void OnRefreshConditionCell(ScrollerDataType type, CellView cell)
        {
            var _cell = cell as TreasureSoulAchievementCell;
            _cell.Display(cell.index);
        }
        int Compare(int x, int y)
System/Treasure/TreasureStageTipWin.cs
@@ -135,6 +135,13 @@
                    m_StageName.text = treasureConfig.Name;
                    m_Description.text = UIHelper.ReplaceNewLine(treasureConfig.Verse.Length > 0 ? treasureConfig.Verse[0] : string.Empty);
                    break;
                case TreasureStageUnlock.TreasureSoul:
                    m_ContainerFuncSoul.gameObject.SetActive(true);
                    var treasureSoulConfig = Config.Instance.Get<TreasurePrivilegeConfig>(m_TreasureStage.treasureSoul);
                    m_Icon.SetSprite(treasureSoulConfig.Icon);
                    m_StageName.text = treasureSoulConfig.Name;
                    m_Description.text = UIHelper.ReplaceNewLine(treasureSoulConfig.Description);
                    break;
            }
        }
System/Treasure/TreasureUnlockCell.cs
@@ -31,7 +31,7 @@
                    var _stage = treasure.treasureStages[i];
                    if (stage < _stage.stage &&
                        (_stage.unlockType == TreasureStageUnlock.Func || _stage.unlockType == TreasureStageUnlock.Skill
                        || _stage.unlockType == TreasureStageUnlock.Treasure))
                        || _stage.unlockType == TreasureStageUnlock.Treasure || _stage.unlockType == TreasureStageUnlock.TreasureSoul))
                    {
                        last = false;
                        break;
@@ -66,6 +66,14 @@
                                m_Func.text = Language.Get("TreasureUnlockNewTreasure");
                            }
                            break;
                        case TreasureStageUnlock.TreasureSoul:
                            var treasureSoulConfig = Config.Instance.Get<TreasurePrivilegeConfig>(treasureStage.treasureSoul);
                            if (treasureSoulConfig != null)
                            {
                                m_Icon.SetSprite(treasureSoulConfig.Icon);
                                m_Func.text = Language.Get("TreasureUnlockNewTreasureSoul");
                            }
                            break;
                    }
                    m_Button.AddListener(() =>
                    {