少年修仙传客户端代码仓库
4个文件已添加
13个文件已修改
718 ■■■■■ 已修改文件
System/DailyQuest/DailyQuestModel.cs 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Equip/EquipModel.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Equip/EquipSlotBehaviour.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/New/BagWin.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/LoopAct/CycleHall/CycleHallMissionCell.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmBriefBehaviour.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmLevelUpBehaviour.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmMissionCell.cs 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmModel.cs 185 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmPromoteWin.cs 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmRecommandEquipWin.cs 189 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmUnlockEffectCell.cs 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmUnlockEffectCell.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmUnlockEffectWin.cs 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmUnlockEffectWin.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Core/TextEx.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/UIHelper.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/DailyQuest/DailyQuestModel.cs
@@ -1090,41 +1090,42 @@
            var config1 = DailyQuestConfig.Get(_lhs);
            var config2 = DailyQuestConfig.Get(_rhs);
            if (state1 == state2)
            {
                return config1.order < config2.order ? -1 : 1;
            }
            else
            {
                if (state1 == DailyQuestState.Completed)
                {
                    return 1;
                }
                else if (state2 == DailyQuestState.Completed)
                {
                    return -1;
                }
                else if (state1 == DailyQuestState.Locked)
                {
                    return 1;
                }
                else if (state2 == DailyQuestState.Locked)
                {
                    return -1;
                }
                else if (state1 == DailyQuestState.CanBuyTimes)
                {
                    return 1;
                }
                else if (state2 == DailyQuestState.CanBuyTimes)
                {
                    return -1;
                }
                else
                {
                    return config1.order < config2.order ? -1 : 1;
                }
            }
            return config1.order.CompareTo(config2.order);
            //if (state1 == state2)
            //{
            //    return config1.order < config2.order ? -1 : 1;
            //}
            //else
            //{
            //    if (state1 == DailyQuestState.Completed)
            //    {
            //        return 1;
            //    }
            //    else if (state2 == DailyQuestState.Completed)
            //    {
            //        return -1;
            //    }
            //    else if (state1 == DailyQuestState.Locked)
            //    {
            //        return 1;
            //    }
            //    else if (state2 == DailyQuestState.Locked)
            //    {
            //        return -1;
            //    }
            //    else if (state1 == DailyQuestState.CanBuyTimes)
            //    {
            //        return 1;
            //    }
            //    else if (state2 == DailyQuestState.CanBuyTimes)
            //    {
            //        return -1;
            //    }
            //    else
            //    {
            //        return config1.order < config2.order ? -1 : 1;
            //    }
            //}
        }
System/Equip/EquipModel.cs
@@ -334,13 +334,15 @@
            }
        }
        public bool HasSamePlaceCandidateEquip(Int2 equipPosition)
        public bool HasSamePlaceCandidateEquip(Int2 equipPosition, out string equipGuid)
        {
            equipGuid = string.Empty;
            for (int i = 0; i < candidateEquips.Count; i++)
            {
                var item = packModel.GetItemByGuid(candidateEquips[i].guid);
                if (item != null && item.config.LV == equipPosition.x && item.config.EquipPlace == equipPosition.y)
                {
                    equipGuid = candidateEquips[i].guid;
                    return true;
                }
            }
System/Equip/EquipSlotBehaviour.cs
@@ -140,13 +140,15 @@
        {
            if (slot.unLocked)
            {
                string betterEquipGuid;
                if (!string.IsNullOrEmpty(slot.equip.value))
                {
                    ItemTipUtility.Show(slot.equip.value);
                }
                else if (model.HasSamePlaceCandidateEquip(slot.equipPosition))
                else if (model.HasSamePlaceCandidateEquip(slot.equipPosition, out betterEquipGuid))
                {
                    model.RecommendCandidateEquip(slot.equipPosition);
                    //model.RecommendCandidateEquip(slot.equipPosition);
                    packModel.SetLookIndex(betterEquipGuid);
                }
                else
                {
System/KnapSack/New/BagWin.cs
@@ -143,10 +143,12 @@
                if (playerPack.lookLineIndex >= 4)
                {
                    _gridlineCtrl.JumpIndex(playerPack.lookLineIndex - 2);
                    _gridlineCtrl.m_Scorller.RefreshActiveCellViews();
                }
                else
                {
                    _gridlineCtrl.JumpIndex(playerPack.lookLineIndex);
                    _gridlineCtrl.m_Scorller.RefreshActiveCellViews();
                }
            }
System/LoopAct/CycleHall/CycleHallMissionCell.cs
@@ -1,3 +1,4 @@
using Spine.Unity;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
@@ -15,7 +16,7 @@
        [SerializeField] List<RotationTween> missionTweens = new List<RotationTween>();
        [SerializeField] Slider buyCountGiftSlider;
        [SerializeField] Text buyCountGiftSliderText;
        [SerializeField] SkeletonGraphic skeletonGraphic;
        int roundType;
        int tabType;
        int awardIndex;
@@ -67,6 +68,7 @@
                return;
            int state = model.GetAwardState(roundType, awardIndex);
            imgFinish.SetActive(state == 2);
            skeletonGraphic.SetActive(state == 1);
            txtTitle.text = Language.Get(StringUtility.Contact("CycleHallMissionTitle", "_", round.AwardType, "_", round.AwardTypeValue), awardInfo.NeedValue);
            buyCountGiftSlider.value = playerInfo.CurValue / (float)awardInfo.NeedValue;
            buyCountGiftSliderText.text = string.Format("{0}/{1}", playerInfo.CurValue, awardInfo.NeedValue);
System/Realm/RealmBriefBehaviour.cs
@@ -85,7 +85,11 @@
                unLockEffectBtn.RemoveAllListeners();
            }
            //unLockEffectShowAllBtn.AddListener();
            unLockEffectShowAllBtn.AddListener(() =>
                {
                    WindowCenter.Instance.Open<RealmUnlockEffectWin>();
                }
            );
            var missions = RealmLVUPTaskConfig.GetMissionIDs(PlayerDatas.Instance.baseData.realmLevel);
            for (int i = 0; i < missionObjs.Count; i++)
System/Realm/RealmLevelUpBehaviour.cs
@@ -45,10 +45,17 @@
        private void OnLevelUp()
        {
            int error;
            if (model.TryLevelUp(out error))
            bool hasBoss;
            bool hasAward;
            if (model.TryLevelUp(out error, out hasBoss, out hasAward))
            {
                CA523_tagCMRealmLVUp pak = new CA523_tagCMRealmLVUp();
                GameNetSystem.Instance.SendInfo(pak);
                ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("RealmBreakUP"), (bool isOk) => {
                    if (isOk)
                    {
                        CA523_tagCMRealmLVUp pak = new CA523_tagCMRealmLVUp();
                        GameNetSystem.Instance.SendInfo(pak);
                    }
                });
            }
            else
            {
@@ -71,6 +78,7 @@
            {
                case 101:
                    SysNotifyMgr.Instance.ShowTip("RealmMissionAward");
                    model.RequestAllAwards();
                    break;
                case 102:
                    SysNotifyMgr.Instance.ShowTip("RealmLevelUpError_1");
System/Realm/RealmMissionCell.cs
@@ -18,6 +18,7 @@
        [SerializeField] ItemCell itemCell;
        [SerializeField] Image awardStateImg;
        [SerializeField] Button receiveBtn;
        [SerializeField] UIEffect awardEffect;
        RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
@@ -33,6 +34,15 @@
            missionTabImg.SetSprite(StringUtility.Contact("RealmMissionTab", state));
            missionBGImg.SetSprite(StringUtility.Contact("RealmMissionBG", state));
            missionStateText.text = Language.Get(StringUtility.Contact("RealmMissionState", state));
            if (state == 1)
            {
                awardEffect.Play();
            }
            else
            {
                awardEffect.Stop();
            }
            int type = config.TaskType;
            int curValue = 0;
@@ -107,32 +117,24 @@
            receiveBtn.AddListener(() => {
                if (state == 1)
                {
                    CA504_tagCMPlayerGetReward pak = new CA504_tagCMPlayerGetReward();
                    pak.RewardType = 68;
                    pak.DataEx = (uint)missionID;
                    GameNetSystem.Instance.SendInfo(pak);
                    model.RequestAllAwards();
                }
                else if (state == 0)
                {
                    WindowCenter.Instance.Close<RealmWin>();
                    if (type == 5)
                    {
                        model.realmUpgrateNoEnoughReason = 2;
                        WindowCenter.Instance.Open<RealmRecommandEquipWin>();
                    }
                    else if (model.realMissionGuides.ContainsKey(type))
                    {
                        NewBieCenter.Instance.StartNewBieGuideEx(model.realMissionGuides[type]);
                    }
                    if (type == 4)
                    {
                        LimitedTimeLuxuryGiftModel.Instance.IsItemIdShow(23, RealmModel.BreakRealmPill, config.NeedValueList[0], 1, 0);
                        if (LimitedTimeLuxuryGiftModel.Instance.IsItemIdShow(23, RealmModel.BreakRealmPill, config.NeedValueList[0], 1, 0))
                            return;
                    }
                    model.RealMissionGuide(type, id);
                }
            });
        }
    }
}
System/Realm/RealmModel.cs
@@ -43,6 +43,7 @@
        public readonly Redpoint levelUpRedpoint = new Redpoint(114, 11401);
        public readonly Redpoint challengeRedpoint = new Redpoint(114, 11402);
        public readonly Redpoint missionRedpoint = new Redpoint(114, 11403);
        public readonly Redpoint towerRedpoint = new Redpoint(114, 11406);
        int m_SelectRealm = 0;
@@ -95,9 +96,8 @@
        EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
        EquipStarModel equipStarModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } }
        PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
        ActivitiesPushModel pushModel { get { return ModelCenter.Instance.GetModel<ActivitiesPushModel>(); } }
        TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
        DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
        SkyTowerModel skyTowerModel { get { return ModelCenter.Instance.GetModel<SkyTowerModel>(); } }
        public override void Init()
        {
@@ -106,6 +106,7 @@
            GlobalTimeEvent.Instance.secondEvent += PerSecond;
            packModel.refreshItemCountEvent += RefreshItemCountEvent;
            FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
            skyTowerModel.OnChallengeState += OnChallengeState;
            ParseConfig();
        }
@@ -131,8 +132,6 @@
            SysNotifyMgr.Instance.OnSystemNotifyEvent -= OnSystemNotifyEvent;
            SysNotifyMgr.Instance.OnSystemNotifyEvent += OnSystemNotifyEvent;
            RefreshRedpoint();
            TryPushRealmPoolMessage();
        }
        public override void UnInit()
@@ -142,14 +141,20 @@
            packModel.refreshItemCountEvent -= RefreshItemCountEvent;
            GlobalTimeEvent.Instance.secondEvent -= PerSecond;
            FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
            skyTowerModel.OnChallengeState -= OnChallengeState;
        }
        private void OnFuncStateChangeEvent(int id)
        {
            if (id == (int)FuncOpenEnum.Realm)
            {
                RefreshRedpoint();
                redpointDirty = true;
            }
        }
        void OnChallengeState()
        {
            redpointDirty = true;
        }
        private void PerSecond()
@@ -170,33 +175,24 @@
        void ParseConfig()
        {
            List<int> stages = new List<int>();
            m_RealmStages.Add(stages);
            var configs = RealmConfig.GetValues();
            realmMaxLevel = configs.Count - 1;
            foreach (var config in configs)
            realmMaxLevel = RealmConfig.GetKeys().Count - 1;
            for (int i = 1; i <= realmMaxLevel; i++)
            {
                if (config.Lv > realmMaxLevel)
                var config = RealmConfig.Get(i);
                if (config.Lv == config.LvLarge)
                {
                    break;
                    stages = new List<int>();
                    m_RealmStages.Add(stages);
                }
                stages.Add(config.Lv);
                if (config.Lv != 0)
                {
                    if (config.Lv == config.LvLarge)
                    {
                        stages = new List<int>();
                        m_RealmStages.Add(stages);
                    }
                    stages.Add(config.Lv);
                }
            }
            var funcConfig = FuncConfigConfig.Get("RealmExpTime");
            realmExpTime = int.Parse(funcConfig.Numerical1);
            funcConfig = FuncConfigConfig.Get("RealmMission");
            realMissionGuides = ConfigParse.ParseIntDict(funcConfig.Numerical1);
            realMissionGuides = ConfigParse.ParseIntArrayDict(funcConfig.Numerical1);
        }
@@ -257,7 +253,7 @@
            }
            if (!m_RecommandEquips[level].ContainsKey(job))
            {
                m_RecommandEquips[level].Add(job, new int[3]);
                m_RecommandEquips[level].Add(job, new int[8]);
            }
            for (int i = 0; i < EquipModel.equip8Places.Length; i++)
@@ -272,7 +268,7 @@
            equips = m_RecommandEquips[level][job];
            return false;
            return true;
        }
        //从任务条件获取
@@ -282,13 +278,15 @@
            //return m_RealmEquipConditions.TryGetValue(level, out equipCondition);
            return false;
        }
        //境界任务完成后才可以渡劫,否则点击渡劫按任务顺序做引导
        public bool TryLevelUp(out int error)
        // error: 小于100的错误码是任务类型用于引导等;101 任务奖励可领取未领取;102 等级不足;103 经验不足
        public bool TryLevelUp(out int error, out bool hasBoss, out bool hasAward)
        {
            error = 100; //小于100的错误码是任务引导
            var missions = RealmLVUPTaskConfig.GetMissionIDs(PlayerDatas.Instance.baseData.realmLevel);
            bool hasAward = false;  //是否有奖励可领取
            hasAward = false;  //是否有奖励可领取
            hasBoss = false;   //是否有BOSS任务
            for (int i = 0; i < missions.Count; i++)
            {
                int missionID = missions[i];
@@ -296,13 +294,23 @@
                if (state == 0)
                {
                    var id = RealmLVUPTaskConfig.GetID(PlayerDatas.Instance.baseData.realmLevel, missionID);
                    error = RealmLVUPTaskConfig.Get(id).TaskType;
                    return false;
                    var type = RealmLVUPTaskConfig.Get(id).TaskType;
                    if (error == 100)
                        error = type;
                    if (type == 6)
                    {
                        hasBoss = true;
                    }
                }
                if (state == 1)
                else if (state == 1)
                {
                    hasAward = true;
                }
            }
            if (error < 100)
            {
                return false;
            }
            if (hasAward)
@@ -428,6 +436,8 @@
            return notSatisfyPlaces.Count == 0;
        }
        // 装备条件是否满足 1 缺少装备 2 星级不足
        public bool SatisfyEquipCondition(RealmLVUPTaskConfig config, out int error)
        {
            error = 0;
@@ -449,7 +459,7 @@
                    {
                        if (itemModel.config.SuiteiD == 0)
                        {
                            error = 4;
                            error = 1;
                            return false;
                        }
                    }
@@ -457,7 +467,7 @@
                    {
                        if (itemModel.config.ItemColor < equipCondition.itemColor)
                        {
                            error = 4;
                            error = 1;
                            return false;
                        }
                    }
@@ -466,23 +476,17 @@
                    if (starLevel < equipCondition.starLevel)
                    {
                        error = 5;
                        error = 2;
                        return false;
                    }
                }
                else
                {
                    error = 4;
                    error = 1;
                    return false;
                }
            }
            return true;
        }
        public bool HasEquipCondition(int realmLevel)
        {
            //return m_RealmEquipConditions.ContainsKey(realmLevel);
            return false;
        }
@@ -595,11 +599,6 @@
            return false;
        }
        public void SendLevelUpRealm()
        {
            CA523_tagCMRealmLVUp pak = new CA523_tagCMRealmLVUp();
            GameNetSystem.Instance.SendInfo(pak);
        }
        public void TryPushRealmPoolMessage()
        {
@@ -617,7 +616,7 @@
            }
            RealmMissionRefreshEvent?.Invoke();
            RefreshRedpoint();
            redpointDirty = true;
        }
        public void ReceivePackage(HA327_tagMCRealmExpInfo package)
@@ -630,9 +629,7 @@
            {
                realmExpRefresh();
            }
            //RefreshRealmPoolRedpoint();
            TryPushRealmPoolMessage();
        }
        private void OnStageLoadFinish()
@@ -673,7 +670,7 @@
        {
            if (dataType == PlayerDataType.RealmLevel
                || dataType == PlayerDataType.LV
                || dataType == PlayerDataType.FightPoint)
                || dataType == PlayerDataType.TotalExp)
            {
                redpointDirty = true;
            }
@@ -706,18 +703,17 @@
        private void RefreshItemCountEvent(PackType packType, int arg2, int itemId)
        {
            //if (packType == PackType.Item)
            //{
            //    var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
            //    if (config != null && config.NeedGood == itemId)
            //    {
            //        redpointDirty = true;
            //    }
            //}
            //if (packType == PackType.Equip)
            //{
            //    redpointDirty = true;
            //}
            if (packType == PackType.Item)
            {
                if (BreakRealmPill == itemId)
                {
                    redpointDirty = true;
                }
            }
            if (packType == PackType.Equip)
            {
                redpointDirty = true;
            }
        }
        IEnumerator Co_TryOpenRealmWin()
@@ -747,31 +743,40 @@
        void RefreshRedpoint()
        {
            var levelUpable = false;
            levelUpRedpoint.state = RedPointState.None;
            towerRedpoint.state = RedPointState.None;
            challengeRedpoint.state = RedPointState.None;
            missionRedpoint.state = RedPointState.None;
            if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Realm))
            if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Realm))
                return;
            var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
            if (realmLevel < realmMaxLevel)
            {
                var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
                if (realmLevel < realmMaxLevel)
                int error;
                bool hasBoss;
                bool hasAward;
                if (TryLevelUp(out error, out hasBoss, out hasAward))
                {
                    int error;
                    if (TryLevelUp(out error))
                    {
                        levelUpable = true;
                    }
                    levelUpRedpoint.state = RedPointState.Simple;
                }
                if (GetErrorOfChallenge() == 0)
                if (hasAward)
                {
                    towerRedpoint.state = RedPointState.Simple;
                    missionRedpoint.state = RedPointState.Simple;
                }
                if (hasBoss)
                {
                    challengeRedpoint.state = RedPointState.Simple;
                }
            }
            levelUpRedpoint.state = levelUpable ? RedPointState.Simple : RedPointState.None;
            if (GetErrorOfChallenge() == 0)
            {
                towerRedpoint.state = RedPointState.Simple;
            }
        }
@@ -839,7 +844,7 @@
            {
                selectFloorID = passedFloor;
            }
            RefreshRedpoint();
            redpointDirty = true;
            OnTowerPassEvent?.Invoke();
        }
@@ -858,7 +863,7 @@
        Dictionary<int, int> taskValues = new Dictionary<int, int>();
        public const int BreakRealmPill = 4501; //破境丹ID
        public RealmLVUPTaskConfig equipNeedConfig;
        public Dictionary<int, int> realMissionGuides = new Dictionary<int, int>();
        public Dictionary<int, int[]> realMissionGuides = new Dictionary<int, int[]>();
        public event Action RealmMissionRefreshEvent;
        //public uint TaskAwardState;    //进阶任务领奖状态;按任务ID二进制位存储是否已领取
@@ -927,19 +932,35 @@
        }
        public void RealMissionGuide(int type)
        public void RealMissionGuide(int type, int id = 0)
        {
            if (type != 6)
            if (type != 5 && type != 6)
                WindowCenter.Instance.Close<RealmWin>();
            if (type == 5)
            {
                realmUpgrateNoEnoughReason = 2;
                WindowCenter.Instance.Open<RealmRecommandEquipWin>();
                WindowCenter.Instance.Open<RealmRecommandEquipWin>(false, id);
            }
            else if (realMissionGuides.ContainsKey(type))
            {
                NewBieCenter.Instance.StartNewBieGuideEx(realMissionGuides[type]);
                NewBieCenter.Instance.StartNewBieGuideEx(realMissionGuides[type][0]);
            }
        }
        public void RequestAllAwards()
        {
            var missisons = RealmLVUPTaskConfig.GetMissionIDs(PlayerDatas.Instance.baseData.realmLevel);
            for (int i = 0; i < missisons.Count; i++)
            {
                var state = GetMissionState(PlayerDatas.Instance.baseData.realmLevel, missisons[i]);
                if (state == 1)
                {
                    CA504_tagCMPlayerGetReward pak = new CA504_tagCMPlayerGetReward();
                    pak.RewardType = 68;
                    pak.DataEx = (uint)missisons[i];
                    GameNetSystem.Instance.SendInfo(pak);
                }
            }
        }
System/Realm/RealmPromoteWin.cs
@@ -22,8 +22,10 @@
        [SerializeField] Text m_SkillName;
        [SerializeField] Text m_SkillText;
        [SerializeField] Image m_RealmIcon;
        [SerializeField] Image m_beforeRealmIcon;
        [SerializeField] UIEffect m_Effect;
        [SerializeField] Button m_Close;
        [SerializeField] Text unLockEquip;
        [SerializeField] Transform m_CloseRemind;
@@ -121,33 +123,43 @@
                    m_Propertys[i].DisplayRealm(property, currentConfig.AddAttrNum[i] - propertys[property], currentConfig.AddAttrNum[i]);
                }
            }
            m_ReikiPoint.text = string.Empty;
            m_ReikiText.text = string.Empty;
            m_SkillName.text = string.Empty;
            m_SkillText.text = string.Empty;
            unLockEquip.SetActive(false);
            m_SkillText.SetActive(false);
            m_ReikiText.SetActive(false);
            if (currentConfig.AddFreePoint != 0)
            {
                m_ReikiText.SetActive(true);
                m_ReikiPoint.text = currentConfig.AddFreePoint.ToString();
                m_ReikiText.text = Language.Get("Z2007");
            }
            var config = RealmConfig.Get(realmLevel);
            if (config.LearnSkillIDInfo.Count > 0)
            else if (currentConfig.LearnSkillIDInfo.Count > 0)
            {
                var array = config.LearnSkillIDInfo[PlayerDatas.Instance.baseData.Job];
                m_SkillText.SetActive(true);
                var array = currentConfig.LearnSkillIDInfo[PlayerDatas.Instance.baseData.Job];
                var skillConfig = SkillConfig.Get(array[0]);
                m_SkillName.text = skillConfig.SkillName;
                m_SkillText.text = Language.Get("Z2008");
            }
            else if (currentConfig.EquipLV > 0)
            {
                unLockEquip.SetActive(true);
                unLockEquip.text = Language.Get("MountPanel_UnlockBtn_1") + Language.Get("RealmEquipName", currentConfig.NameEx);
            }
            
            m_RealmIcon.SetSprite(currentConfig.Img);
            m_beforeRealmIcon.SetSprite(lastConfig.Img);
            var effectId = model.GetRealmCoverEffect(realmLevel);
            m_Effect.StopImediatly();
            m_Effect.effect = effectId;
            m_Effect.Play();
        }
    }
System/Realm/RealmRecommandEquipWin.cs
@@ -14,19 +14,18 @@
    public class RealmRecommandEquipWin : Window
    {
        [SerializeField] ItemCell[] m_Items;
        [SerializeField] Button m_Goto;
        [SerializeField] Button m_GetWays;
        [SerializeField] Button m_Close;
        [SerializeField] ScrollRect m_Scroller;
        [SerializeField] HorizontalLayoutGroup m_Layout;
        [SerializeField] Text m_InfoText;
        [SerializeField] Text m_WayText;
        [SerializeField] RichText[] m_EquipTexts;
        [SerializeField] Button[] m_EquipGetWay;
        [SerializeField] Button m_Close;
        RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
        PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
        EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
        EquipStarModel equipStarModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } }
        RealmLevelUpEquipCondition equipCondition;
        List<int> notSatisfyPlaces = new List<int>();
        #region Built-in
        protected override void BindController()
@@ -35,18 +34,15 @@
        protected override void AddListeners()
        {
            m_Goto.AddListener(Goto);
            m_GetWays.AddListener(OnGetWay);
            m_Close.AddListener(CloseClick);
            for (int i = 0; i < m_EquipGetWay.Length; i++)
            {
                m_EquipGetWay[i].AddListener(OnGetWay);
            }
        }
        protected override void OnPreOpen()
        {
        }
        protected override void OnActived()
        {
            base.OnActived();
            Display();
        }
@@ -56,7 +52,6 @@
        protected override void OnPreClose()
        {
            model.realmUpgrateNoEnoughReason = 0;
        }
        protected override void OnAfterClose()
@@ -66,53 +61,78 @@
        void Display()
        {
            m_InfoText.text = Language.Get(model.realmUpgrateNoEnoughReason == 2 ? "realmEquipNotEnouth2" : "realmEquipNotEnouth1");
            m_WayText.text = Language.Get(model.realmUpgrateNoEnoughReason == 2 ? "gotoEquipStar" : "GetItem_1");
            var config = RealmLVUPTaskConfig.Get(functionOrder);
            var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
            List<int> notSatisfyPlaces;
            int[] recommandEquips;
            if (!model.SatisfyEquipCondition(model.equipNeedConfig, out notSatisfyPlaces)
                && model.TryGetRecommandEquips(realmLevel, PlayerDatas.Instance.baseData.Job, model.equipNeedConfig.NeedValueList[3], out recommandEquips))
            equipCondition = new RealmLevelUpEquipCondition()
            {
                for (int i = 0; i < m_Items.Length; i++)
                level = config.NeedValueList[0],
                starLevel = config.NeedValueList[1],
                isSuit = config.NeedValueList[2] == 1,
                itemColor = config.NeedValueList[3],
            };
            var equipSet = equipModel.GetEquipSet(equipCondition.level);
            var realmConfig = RealmConfig.Get(equipSet.realm);
            notSatisfyPlaces = new List<int>();
            model.SatisfyEquipCondition(model.equipNeedConfig, out notSatisfyPlaces);
            if (!equipCondition.isSuit)
            {
                var colorName = UIHelper.GetColorNameByItemColor(equipCondition.itemColor);
                m_InfoText.text = Language.Get("RealmNeedEquipCondition_1", realmConfig.NameEx, colorName, equipCondition.starLevel, 8)
                    + " (" + Language.Get("BlessedLand036", 8 - notSatisfyPlaces.Count, 8) + ")";
            }
            else
            {
                m_InfoText.text = Language.Get("RealmNeedEquipCondition_2", realmConfig.NameEx, equipCondition.starLevel, 8)
                    + " (" + Language.Get("BlessedLand036", 8 - notSatisfyPlaces.Count, 8) + ")";
            }
            int[] recommandEquips;
            model.TryGetRecommandEquips(equipCondition.level, PlayerDatas.Instance.baseData.Job, model.equipNeedConfig.NeedValueList[3], out recommandEquips);
            for (int i = 0; i < m_EquipTexts.Length; i++)
            {
                int place = i + 1;
                int equipState = 0; // 0 完成 1. 没有装备引导获得途径 2. 背包中有更好的装备引导穿戴 3.引导升星
                int curStarLevel = 0;
                int targetStarLevel = equipCondition.starLevel;
                var equipGuid = equipModel.GetEquip(new Int2(equipCondition.level, place));
                var itemModel = packModel.GetItemByGuid(equipGuid);
                if (itemModel != null)
                {
                    if (i < notSatisfyPlaces.Count && notSatisfyPlaces[i] <= recommandEquips.Length)
                    if (equipCondition.isSuit)
                    {
                        m_Items[i].SetActive(true);
                        var place = notSatisfyPlaces[i];
                        var itemData = new ItemCellModel(recommandEquips[place - 1], true, 1);
                        m_Items[i].Init(itemData);
                        m_Items[i].button.SetListener(() =>
                        if (itemModel.config.SuiteiD == 0)
                        {
                            ItemTipUtility.Show(recommandEquips[place - 1]);
                        });
                            equipState = 1;
                        }
                    }
                    else
                    {
                        m_Items[i].SetActive(false);
                        if (itemModel.config.ItemColor < equipCondition.itemColor)
                        {
                            equipState = 1;
                        }
                    }
                    curStarLevel = equipStarModel.GetEquipStarLevel(new Int2(equipCondition.level, place));
                    if (curStarLevel < targetStarLevel)
                    {
                        equipState = 3;
                    }
                }
            }
            m_Scroller.horizontalNormalizedPosition = 0f;
            m_Scroller.enabled = notSatisfyPlaces.Count > 4;
            m_Layout.childAlignment = notSatisfyPlaces.Count > 4 ? TextAnchor.MiddleLeft : TextAnchor.MiddleCenter;
            if (notSatisfyPlaces.Count < 4)
            {
                m_Layout.transform.localPosition = m_Layout.transform.localPosition.SetX(0);
            }
            if (model.realmUpgrateNoEnoughReason != 2)
            {
                var existBetterEquip = false;
                RealmLevelUpEquipCondition equipCondition;
                model.TryGetRealmEquipCondition(realmLevel, out equipCondition);
                for (int i = 0; i < notSatisfyPlaces.Count; i++)
                else
                {
                    var place = notSatisfyPlaces[i];
                    equipState = 1;
                }
                //查找背包中是否有更好的装备
                if (equipState == 1)
                {
                    var items = packModel.GetItems(PackType.Item, new SinglePack.FilterParams()
                    {
                        levels = new List<int>() { equipCondition.level },
@@ -123,53 +143,60 @@
                    {
                        foreach (var item in items)
                        {
                            if (equipCondition.isSuit && item.config.SuiteiD > 0)
                            if ((equipCondition.isSuit && item.config.SuiteiD > 0) ||
                                (!equipCondition.isSuit && item.config.ItemColor >= equipCondition.itemColor))
                            {
                                existBetterEquip = true;
                                break;
                            }
                            if (!equipCondition.isSuit && item.config.ItemColor >= equipCondition.itemColor)
                            {
                                existBetterEquip = true;
                                equipState = 2;
                                break;
                            }
                        }
                    }
                    if (existBetterEquip)
                    {
                        break;
                    }
                }
                m_Goto.SetActive(existBetterEquip);
                m_GetWays.SetActive(!existBetterEquip);
                var itemConfig = ItemConfig.Get(recommandEquips[i]);
                string suffix = string.Empty;
                if (equipState == 0)
                {
                    suffix = StringUtility.Contact("(", Language.Get("TaskWin_Btn_Finish"), ")");
                    m_EquipGetWay[i].RemoveAllListeners();
                }
                else if (equipState == 1)
                {
                    suffix = StringUtility.Contact("<color=#ff0000><a>", Language.Get("HolidayXianXiaMJLotterynWin__1"), "</a></color>");
                    m_EquipGetWay[i].AddListener(OnGetWay);
                }
                else if (equipState == 2)
                {
                    suffix = StringUtility.Contact("<color=#ff0000><a>", Language.Get("RealmRecommandEquipWin__2"), "</a></color>");
                    m_EquipGetWay[i].AddListener(() => {
                        Goto(2);
                    });
                }
                else if (equipState == 3)
                {
                    suffix = StringUtility.Contact("<color=#ff0000><a>", Language.Get("gotoEquipStar"), "</a></color>");
                    m_EquipGetWay[i].AddListener(() => {
                        Goto(1);
                    });
                }
                string equipName = StringUtility.Contact(itemConfig.ItemName, " ",
                    Language.Get("EquipStarLevel", Language.Get("BlessedLand036", curStarLevel, targetStarLevel)), " ", suffix);
                m_EquipTexts[i].text = UIHelper.AppendColor(notSatisfyPlaces.Contains(place) ? TextColType.Gray : TextColType.Green, equipName, true);
            }
            else
            {
                m_Goto.SetActive(true); //装备升星
                m_GetWays.SetActive(false);
            }
        }
        private void OnGetWay()
        {
            var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
            RealmLevelUpEquipCondition equipCondition;
            model.TryGetRealmEquipCondition(realmLevel, out equipCondition);
            List<int> notSatisfyPlaces;
            model.SatisfyEquipCondition(model.equipNeedConfig, out notSatisfyPlaces);
            var config = EquipControlConfig.Get(equipCondition.level, notSatisfyPlaces[0]);
            RealmRecommandEquipGetWayWin.equipGetWays.Clear();
            RealmRecommandEquipGetWayWin.equipGetWays.AddRange(config.getWays);
            WindowCenter.Instance.Open<RealmRecommandEquipGetWayWin>();
        }
        private void Goto()
        private void Goto(int state)
        {
            var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
            RealmLevelUpEquipCondition equipCondition;
            model.TryGetRealmEquipCondition(realmLevel, out equipCondition);
            if (model.realmUpgrateNoEnoughReason != 2)
            if (state == 2)
            {
                equipModel.SelectSet(equipCondition.level);
                WindowCenter.Instance.Open<KnapSackWin>(false, 0);
@@ -177,12 +204,14 @@
            else 
            {
                equipStarModel.jumpEquipPos = new Int2(equipCondition.level, 1);
                equipStarModel.jumpEquipPos = new Int2(equipCondition.level, notSatisfyPlaces[0]);
                WindowCenter.Instance.Open<EquipFrameWin>(false, 1);
            }
            CloseImmediately();
            WindowCenter.Instance.Close<RealmWin>();
        }
    }
}
System/Realm/RealmUnlockEffectCell.cs
New file
@@ -0,0 +1,61 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Thursday, November 09, 2017
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
namespace vnxbqy.UI
{
    public class RealmUnlockEffectCell : CellView
    {
        [SerializeField] TextEx realNameText;
        [SerializeField] RichText unLockEffect;
        [SerializeField] Button unLockEffectBtn;
        public void Display(int realm)
        {
            var config = RealmConfig.Get(realm);
            realNameText.text = PlayerDatas.Instance.baseData.realmLevel >= realm ? UIHelper.GetRealmName(realm) : UIHelper.AppendColor(TextColType.Gray, config.Name);
            unLockEffect.colorType = PlayerDatas.Instance.baseData.realmLevel >= realm ? RichText.ColorType.Dark : RichText.ColorType.Bright;
            string showText = "";
            if (config.LearnSkillIDInfo.Count > 0)
            {
                var skillID = config.LearnSkillIDInfo[PlayerDatas.Instance.baseData.Job][0];
                var skillConfig = SkillConfig.Get(skillID);
                showText = Language.Get("RealmUnLockSkill", skillConfig.SkillName);
                unLockEffect.text = PlayerDatas.Instance.baseData.realmLevel >= realm ? showText : UIHelper.AppendColor(TextColType.Gray, showText);
                unLockEffectBtn.SetListener(() => {
                    SkillDetails.ShowSkillDetails(skillID, SkillDetails.SkillSourceType.PlayerSkill, skillConfig.FightPower);
                });
            }
            else if (config.AddFreePoint > 0)
            {
                showText = Language.Get("RealmUnLockLG", config.AddFreePoint);
                unLockEffect.text = PlayerDatas.Instance.baseData.realmLevel >= realm ? showText : UIHelper.AppendColor(TextColType.Gray, showText);
                unLockEffectBtn.RemoveAllListeners();
            }
            else if (config.EquipLV > 0)
            {
                showText = Language.Get("RealmUnLockEquip", Language.Get("RealmEquipName", config.NameEx));
                unLockEffect.text = PlayerDatas.Instance.baseData.realmLevel >= realm ? showText : UIHelper.AppendColor(TextColType.Gray, showText);
                unLockEffectBtn.SetListener(() =>
                {
                    WindowCenter.Instance.Open<RealmEquipPreviewWin>(false, config.EquipLV);
                });
            }
        }
    }
}
System/Realm/RealmUnlockEffectCell.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8bd77305b77be8e4c8e97cbe4d2da7d8
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/Realm/RealmUnlockEffectWin.cs
New file
@@ -0,0 +1,68 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Thursday, March 14, 2019
//--------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace vnxbqy.UI
{
    public class RealmUnlockEffectWin : Window
    {
        [SerializeField] Button m_Confirm;
        [SerializeField] ScrollerController m_Scroller;
        #region Built-in
        protected override void BindController()
        {
        }
        protected override void AddListeners()
        {
            m_Confirm.AddListener(CloseClick);
        }
        protected override void OnPreOpen()
        {
            m_Scroller.OnRefreshCell += OnRefreshCell;
            var count = RealmConfig.GetKeys().Count;
            m_Scroller.Refresh();
            for (int i = 1; i < count; i++)
            {
                m_Scroller.AddCell(ScrollerDataType.Header, i);
            }
            m_Scroller.Restart();
            m_Scroller.JumpIndex(PlayerDatas.Instance.baseData.realmLevel - 5);
        }
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
        {
            m_Scroller.OnRefreshCell -= OnRefreshCell;
        }
        protected override void OnAfterClose()
        {
        }
        #endregion
        private void OnRefreshCell(ScrollerDataType type, CellView cell)
        {
            var cellView = cell as RealmUnlockEffectCell;
            cellView.Display(cell.index);
        }
    }
}
System/Realm/RealmUnlockEffectWin.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 511d58b064e99324685651ad60f02163
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
UI/Core/TextEx.cs
@@ -36,10 +36,32 @@
            if (m_ColorType != value)
            {
                m_ColorType = value;
                this.color = UIHelper.GetUIColor(value);
                if (m_ColorType == TextColType.None)
                    return;
                this.color = UIHelper.GetUIColor(value, bgColorType == BackGroundColorType.Bright);
            }
        }
    }
    [SerializeField]
    private BackGroundColorType m_BGColorType = BackGroundColorType.Dark;
    public BackGroundColorType bgColorType
    {
        get { return m_BGColorType; }
        set {
            m_BGColorType = value;
            if (m_ColorType == TextColType.None)
                return;
            this.color = UIHelper.GetUIColor(colorType, m_BGColorType == BackGroundColorType.Bright);
        }
    }
    public enum BackGroundColorType
    {
        Dark,
        Bright,
    }
    protected override void Awake()
    {
@@ -63,7 +85,7 @@
        if (colorType != TextColType.None)
        {
            this.color = UIHelper.GetUIColor(colorType);
            this.color = UIHelper.GetUIColor(colorType, bgColorType == BackGroundColorType.Bright);
        }
    }
Utility/UIHelper.cs
@@ -592,7 +592,7 @@
        {
            case TextColType.None:
            case TextColType.White:
                return bright ? s_BrightWhiteColor : s_DarkWhiteColor;
                return bright ? s_BrightWhiteColor : s_DarkWhiteColor;  // s_BrightWhiteColor 是亮底灰色
            case TextColType.Blue:
                return bright ? s_BrightBlueColor : s_DarkBlueColor;
            case TextColType.Purple: