少年修仙传客户端代码仓库
hch
2024-12-18 bb4acba476c5a651b24f3c4fe44677db3265087a
0312 新境界山寨提交
9个文件已修改
2个文件已添加
722 ■■■■■ 已修改文件
Core/GameEngine/Model/Config/RealmConfig.cs 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/RealmLVUPTaskConfig.cs 224 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/RealmLVUPTaskConfig.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LogicProject/System/ArenaActivity/ArenaModel.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LogicProject/System/MapLevelMode/MapLevelCell.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LogicProject/System/MapLevelMode/MapLevelSelectWin.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmAnimationBehaviour.cs 114 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmHeartMagicBehaviour.cs 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmLevelUpBehaviour.cs 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmModel.cs 182 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Common/UI3DModelFactory.cs 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/RealmConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:           Fish
//    [  Date ]:           2024年5月17日
//    [  Date ]:           2024年12月16日
//--------------------------------------------------------
using System.Collections.Generic;
@@ -16,13 +16,9 @@
    public readonly int Lv;
    public readonly int LvLarge;
    public readonly string Name;
    public readonly int NeedLV;
    public readonly int NeedGood;
    public readonly int NeedNum;
    public readonly int[] NeedEquip;
    public readonly int LVMax;
    public readonly int[] AddAttrType;
    public readonly int[] AddAttrNum;
    public readonly int BossID;
    public readonly long expRate;
    public readonly long expLimit;
    public readonly string Img;
@@ -52,33 +48,15 @@
            Name = tables[2];
            int.TryParse(tables[3],out NeedLV);
            int.TryParse(tables[3],out LVMax);
            int.TryParse(tables[4],out NeedGood);
            int.TryParse(tables[5],out NeedNum);
            if (tables[6].Contains("["))
            if (tables[4].Contains("["))
            {
                NeedEquip = JsonMapper.ToObject<int[]>(tables[6]);
                AddAttrType = JsonMapper.ToObject<int[]>(tables[4]);
            }
            else
            {
                string[] NeedEquipStringArray = tables[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                NeedEquip = new int[NeedEquipStringArray.Length];
                for (int i=0;i<NeedEquipStringArray.Length;i++)
                {
                     int.TryParse(NeedEquipStringArray[i],out NeedEquip[i]);
                }
            }
            if (tables[7].Contains("["))
            {
                AddAttrType = JsonMapper.ToObject<int[]>(tables[7]);
            }
            else
            {
                string[] AddAttrTypeStringArray = tables[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                string[] AddAttrTypeStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                AddAttrType = new int[AddAttrTypeStringArray.Length];
                for (int i=0;i<AddAttrTypeStringArray.Length;i++)
                {
@@ -86,13 +64,13 @@
                }
            }
            if (tables[8].Contains("["))
            if (tables[5].Contains("["))
            {
                AddAttrNum = JsonMapper.ToObject<int[]>(tables[8]);
                AddAttrNum = JsonMapper.ToObject<int[]>(tables[5]);
            }
            else
            {
                string[] AddAttrNumStringArray = tables[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                string[] AddAttrNumStringArray = tables[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                AddAttrNum = new int[AddAttrNumStringArray.Length];
                for (int i=0;i<AddAttrNumStringArray.Length;i++)
                {
@@ -100,31 +78,29 @@
                }
            }
            int.TryParse(tables[9],out BossID);
            long.TryParse(tables[6],out expRate);
            long.TryParse(tables[10],out expRate);
            long.TryParse(tables[7],out expLimit);
            long.TryParse(tables[11],out expLimit);
            Img = tables[8];
            Img = tables[12];
            int.TryParse(tables[9],out Quality);
            int.TryParse(tables[13],out Quality);
            int.TryParse(tables[10],out FightPower);
            int.TryParse(tables[14],out FightPower);
            equipNameIcon = tables[11];
            equipNameIcon = tables[15];
            equips = tables[12];
            equips = tables[16];
            int.TryParse(tables[13],out effectId);
            int.TryParse(tables[17],out effectId);
            int.TryParse(tables[14],out requireIconEffect);
            int.TryParse(tables[18],out requireIconEffect);
            recommandEquips = tables[15];
            recommandEquips = tables[19];
            LearnSkillIDInfo = tables[16];
            LearnSkillIDInfo = tables[20];
            int.TryParse(tables[21],out AddFreePoint);
            int.TryParse(tables[17],out AddFreePoint);
        }
        catch (Exception ex)
        {
Core/GameEngine/Model/Config/RealmLVUPTaskConfig.cs
New file
@@ -0,0 +1,224 @@
//--------------------------------------------------------
//    [Author]:           Fish
//    [  Date ]:           2024年12月16日
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
using LitJson;
public partial class RealmLVUPTaskConfig
{
    public readonly int Lv;
    public readonly int TaskID;
    public readonly int TaskType;
    public readonly int[] NeedValueList;
    public readonly string AwardItemList;
    public RealmLVUPTaskConfig()
    {
    }
    public RealmLVUPTaskConfig(string input)
    {
        try
        {
            var tables = input.Split('\t');
            int.TryParse(tables[0],out Lv);
            int.TryParse(tables[1],out TaskID);
            int.TryParse(tables[2],out TaskType);
            if (tables[3].Contains("["))
            {
                NeedValueList = JsonMapper.ToObject<int[]>(tables[3]);
            }
            else
            {
                string[] NeedValueListStringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                NeedValueList = new int[NeedValueListStringArray.Length];
                for (int i=0;i<NeedValueListStringArray.Length;i++)
                {
                     int.TryParse(NeedValueListStringArray[i],out NeedValueList[i]);
                }
            }
            AwardItemList = tables[4];
        }
        catch (Exception ex)
        {
            DebugEx.Log(ex);
        }
    }
    static Dictionary<string, RealmLVUPTaskConfig> configs = new Dictionary<string, RealmLVUPTaskConfig>();
    public static RealmLVUPTaskConfig Get(string id)
    {
        if (!inited)
        {
            Debug.LogError("RealmLVUPTaskConfig 还未完成初始化。");
            return null;
        }
        if (configs.ContainsKey(id))
        {
            return configs[id];
        }
        RealmLVUPTaskConfig config = null;
        if (rawDatas.ContainsKey(id))
        {
            config = configs[id] = new RealmLVUPTaskConfig(rawDatas[id]);
            rawDatas.Remove(id);
        }
        return config;
    }
    public static RealmLVUPTaskConfig Get(int id)
    {
        return Get(id.ToString());
    }
    public static List<string> GetKeys()
    {
        var keys = new List<string>();
        keys.AddRange(configs.Keys);
        keys.AddRange(rawDatas.Keys);
        return keys;
    }
    public static List<RealmLVUPTaskConfig> GetValues()
    {
        var values = new List<RealmLVUPTaskConfig>();
        values.AddRange(configs.Values);
        var keys = new List<string>(rawDatas.Keys);
        for (int i = 0; i < keys.Count; i++)
        {
            values.Add(Get(keys[i]));
        }
        return values;
    }
    public static bool Has(string id)
    {
        return configs.ContainsKey(id) || rawDatas.ContainsKey(id);
    }
    public static bool Has(int id)
    {
        return Has(id.ToString());
    }
    public static bool inited { get; private set; }
    protected static Dictionary<string, string> rawDatas = new Dictionary<string, string>();
    public static void Init(bool sync=false)
    {
        inited = false;
        var path = string.Empty;
        if (AssetSource.refdataFromEditor)
        {
            path = ResourcesPath.CONFIG_FODLER +"/RealmLVUPTask.txt";
        }
        else
        {
            path = AssetVersionUtility.GetAssetFilePath("config/RealmLVUPTask.txt");
        }
        configs.Clear();
        var tempConfig = new RealmLVUPTaskConfig();
        var preParse = tempConfig is IConfigPostProcess;
        if (sync)
        {
            var lines = File.ReadAllLines(path);
            if (!preParse)
            {
                rawDatas = new Dictionary<string, string>(lines.Length - 3);
            }
            for (int i = 3; i < lines.Length; i++)
            {
                try
                {
                    var line = lines[i];
                    var index = line.IndexOf("\t");
                    if (index == -1)
                    {
                        continue;
                    }
                    var id = line.Substring(0, index);
                    if (preParse)
                    {
                        var config = new RealmLVUPTaskConfig(line);
                        configs[id] = config;
                        (config as IConfigPostProcess).OnConfigParseCompleted();
                    }
                    else
                    {
                        rawDatas[id] = line;
                    }
                }
                catch (System.Exception ex)
                {
                    Debug.LogError(ex);
                }
            }
            inited = true;
        }
        else
        {
            ThreadPool.QueueUserWorkItem((object _object) =>
            {
                var lines = File.ReadAllLines(path);
                if (!preParse)
                {
                    rawDatas = new Dictionary<string, string>(lines.Length - 3);
                }
                for (int i = 3; i < lines.Length; i++)
                {
                    try
                    {
                       var line = lines[i];
                        var index = line.IndexOf("\t");
                        if (index == -1)
                        {
                            continue;
                        }
                        var id = line.Substring(0, index);
                        if (preParse)
                        {
                            var config = new RealmLVUPTaskConfig(line);
                            configs[id] = config;
                            (config as IConfigPostProcess).OnConfigParseCompleted();
                        }
                        else
                        {
                            rawDatas[id] = line;
                        }
                    }
                    catch (System.Exception ex)
                    {
                        Debug.LogError(ex);
                    }
                }
                inited = true;
            });
        }
    }
}
Core/GameEngine/Model/Config/RealmLVUPTaskConfig.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d3975c0ae6f6c8d49a8f2792a0df7776
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
LogicProject/System/ArenaActivity/ArenaModel.cs
@@ -511,7 +511,7 @@
        for(int i = 0;i < 62;i++)
        {
            var realmConfig = RealmConfig.Get(i);
            if (realmConfig.NeedLV >= level)
            if (realmConfig.LVMax >= level)
            {
                lvLarge = realmConfig.LvLarge;
                break;
@@ -526,7 +526,7 @@
        for (int i = 0; i < 62; i++)
        {
            var realmConfig = RealmConfig.Get(i);
            if (realmConfig.NeedLV >= level)
            if (realmConfig.LVMax >= level)
            {
                lv = realmConfig.Lv;
                break;
LogicProject/System/MapLevelMode/MapLevelCell.cs
@@ -30,7 +30,7 @@
        if (index == 0)
        {
            //普通模式
            levelText.text = Language.Get("MapLevelSelect8", 1, nextConfig.NeedLV);
            //levelText.text = Language.Get("MapLevelSelect8", 1, nextConfig.NeedLV);
            realmImg.SetActiveIL(false);
            normalText.SetActiveIL(true);
        }
@@ -39,7 +39,7 @@
            realmImg.SetActiveIL(true);
            realmImg.SetSprite(RealmConfig.Get(realm).Img);
            normalText.SetActiveIL(false);
            levelText.text = Language.Get("MapLevelSelect8", RealmConfig.Get(realm - 1).NeedLV, nextConfig.NeedLV);
            //levelText.text = Language.Get("MapLevelSelect8", RealmConfig.Get(realm - 1).NeedLV, nextConfig.NeedLV);
        }
        selectButton.AddListener(() => {
LogicProject/System/MapLevelMode/MapLevelSelectWin.cs
@@ -89,7 +89,7 @@
        if (index == 0)
        {
            //普通模式
            info.text = Language.Get("MapLevelSelect2", 1, nextConfig.NeedLV);  //只处理低级的情况
            info.text = Language.Get("MapLevelSelect2", 1, nextConfig.LVMax);  //只处理低级的情况
            realmImg.SetActiveIL(false);
            normal.SetActiveIL(true);
        }
@@ -100,11 +100,11 @@
            normal.SetActiveIL(false);
            if (PlayerDatas.Instance.baseData.realmLevel >= realm && PlayerDatas.Instance.baseData.realmLevel < nextRealm)
            {
                info.text = Language.Get("MapLevelSelect1", RealmConfig.Get(realm - 1).NeedLV, nextConfig.NeedLV, curConfig.Name);
                info.text = Language.Get("MapLevelSelect1", RealmConfig.Get(realm - 1).LVMax, nextConfig.LVMax, curConfig.Name);
            }
            else if (PlayerDatas.Instance.baseData.realmLevel >= nextRealm)
            {
                info.text = Language.Get("MapLevelSelect2", RealmConfig.Get(realm - 1).NeedLV, nextConfig.NeedLV);
                info.text = Language.Get("MapLevelSelect2", RealmConfig.Get(realm - 1).LVMax, nextConfig.LVMax);
            }
            else
            {
System/Realm/RealmAnimationBehaviour.cs
@@ -103,75 +103,75 @@
        public void DisplayLevelUp(int index)
        {
            StartCoroutine(Co_DisplayLevelUp(index));
            //StartCoroutine(Co_DisplayLevelUp(index));
        }
        IEnumerator Co_DisplayLevelUp(int index)
        {
            if (index >= m_EffectLines.Length)
            {
                yield break;
            }
        //IEnumerator Co_DisplayLevelUp(int index)
        //{
        //    if (index >= m_EffectLines.Length)
        //    {
        //        yield break;
        //    }
            isPlayingAnimation = true;
        //    isPlayingAnimation = true;
            if (m_EffectBoss.IsPlaying)
            {
                if (m_EffectBase.target != null)
                {
                    var obj = m_EffectBase.target.transform.Find("GameObject/b/b (3)");
                    if (obj != null)
                    {
                        obj.SetActive(true);
                    }
                }
            }
            m_EffectBoss.StopImediatly();
        //    if (m_EffectBoss.IsPlaying)
        //    {
        //        if (m_EffectBase.target != null)
        //        {
        //            var obj = m_EffectBase.target.transform.Find("GameObject/b/b (3)");
        //            if (obj != null)
        //            {
        //                obj.SetActive(true);
        //            }
        //        }
        //    }
        //    m_EffectBoss.StopImediatly();
            StartLine(index);
        //    StartLine(index);
            
            m_EffectLevelUp.StopImediatly();
            var config = RealmConfig.Get(model.displayRealmLevel - 1);
            var levelUpEffectId = config.BossID != 0 ? 7037 : 7038;
            m_EffectLevelUp.effect = levelUpEffectId;
            m_EffectLevelUp.Play();
            var effectTime = config.BossID != 0 ? m_SpecialLevelUpEffectTime : m_NormalLevelUpEffectTime;
            if (config.BossID != 0)
            {
                yield return WaitingForSecondConst.GetWaitForSeconds(m_CoverChangeTime);
                if (onCoverChange != null)
                {
                    onCoverChange();
                }
                yield return WaitingForSecondConst.GetWaitForSeconds(effectTime - m_CoverChangeTime);
            }
            else
            {
                yield return WaitingForSecondConst.GetWaitForSeconds(effectTime);
            }
        //    m_EffectLevelUp.StopImediatly();
        //    var config = RealmConfig.Get(model.displayRealmLevel - 1);
        //    var levelUpEffectId = config.BossID != 0 ? 7037 : 7038;
        //    m_EffectLevelUp.effect = levelUpEffectId;
        //    m_EffectLevelUp.Play();
        //    var effectTime = config.BossID != 0 ? m_SpecialLevelUpEffectTime : m_NormalLevelUpEffectTime;
        //    if (config.BossID != 0)
        //    {
        //        yield return WaitingForSecondConst.GetWaitForSeconds(m_CoverChangeTime);
        //        if (onCoverChange != null)
        //        {
        //            onCoverChange();
        //        }
        //        yield return WaitingForSecondConst.GetWaitForSeconds(effectTime - m_CoverChangeTime);
        //    }
        //    else
        //    {
        //        yield return WaitingForSecondConst.GetWaitForSeconds(effectTime);
        //    }
            yield return WaitingForSecondConst.WaitMS500;
        //    yield return WaitingForSecondConst.WaitMS500;
            if (index == 3 && model.displayRealmLevel < model.realmMaxLevel)
            {
                StartRotate();
            }
        //    if (index == 3 && model.displayRealmLevel < model.realmMaxLevel)
        //    {
        //        StartRotate();
        //    }
            if (model.SatisfyChallengeBoss(model.displayRealmLevel))
            {
                StartBossEffectShow();
                model.SetBossEffectShow(model.displayRealmLevel);
                yield return WaitingForSecondConst.WaitMS3000;
            }
        //    if (model.SatisfyChallengeBoss(model.displayRealmLevel))
        //    {
        //        StartBossEffectShow();
        //        model.SetBossEffectShow(model.displayRealmLevel);
        //        yield return WaitingForSecondConst.WaitMS3000;
        //    }
            isPlayingAnimation = false;
        //    isPlayingAnimation = false;
            if (onLevelUpComplete != null)
            {
                onLevelUpComplete();
            }
        }
        //    if (onLevelUpComplete != null)
        //    {
        //        onLevelUpComplete();
        //    }
        //}
        RealmStageBehaviour GetRealmStageBeha(int index)
        {
System/Realm/RealmHeartMagicBehaviour.cs
@@ -46,8 +46,8 @@
            var label = UIHelper.AppendColor(satisfy ? TextColType.LightGreen : TextColType.Red, fightPower.ToString());
            m_FightPower.text = StringUtility.Contact(UIHelper.AppendColor(TextColType.LightGreen,
                Language.Get("RolePromoteBetterFight")), label, "/", config.FightPower);
            var npcConfig = NPCConfig.Get(config.BossID);
            m_BossName.text = npcConfig.charName;
            //var npcConfig = NPCConfig.Get(config.BossID);
            //m_BossName.text = npcConfig.charName;
        }
        IEnumerator Co_DisplayBoss()
@@ -58,28 +58,28 @@
        void DisplayBoss()
        {
            var config = RealmConfig.Get(realmLevel);
            m_RawBoss.SetActive(true);
            UI3DModelExhibition.Instance.ShowNPC(m_RawBoss, new UI3DNPCExhibitionData()
            {
                gray = false,
                isDialogue = false,
                npcId = config.BossID,
            });
        //    var config = RealmConfig.Get(realmLevel);
        //    m_RawBoss.SetActive(true);
        //    UI3DModelExhibition.Instance.ShowNPC(m_RawBoss, new UI3DNPCExhibitionData()
        //    {
        //        gray = false,
        //        isDialogue = false,
        //        npcId = config.BossID,
        //    });
            var npcConfig = NPCConfig.Get(config.BossID);
        //    var npcConfig = NPCConfig.Get(config.BossID);
            var npcModel = UI3DModelExhibition.Instance.NpcModelPet;
            if (npcModel != null)
            {
                var animator = npcModel.GetComponentInChildren<Animator>();
                if (animator != null)
                {
                    var runtimeController = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerRealmSuffix, npcConfig.MODE);
                    animator.runtimeAnimatorController = runtimeController;
                    animator.Play(State_EnterHash, 0);
                }
            }
        //    var npcModel = UI3DModelExhibition.Instance.NpcModelPet;
        //    if (npcModel != null)
        //    {
        //        var animator = npcModel.GetComponentInChildren<Animator>();
        //        if (animator != null)
        //        {
        //            var runtimeController = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerRealmSuffix, npcConfig.MODE);
        //            animator.runtimeAnimatorController = runtimeController;
        //            animator.Play(State_EnterHash, 0);
        //        }
        //    }
        }
        public void Dispose()
System/Realm/RealmLevelUpBehaviour.cs
@@ -40,7 +40,6 @@
            if (isNext)
            {
                DisplayCondition();
                DisplayCost();
            }
            else
            {
@@ -53,24 +52,14 @@
        {
            var config = RealmConfig.Get(realmLevel - 1);
            m_LevelCondition.DisplayLevel(realmLevel - 1);
            m_BossCondition.SetActive(config.BossID != 0);
            m_EquipCondition.SetActive(model.HasEquipCondition(realmLevel - 1));
            if (config.BossID != 0)
            {
                m_BossCondition.DisplayBoss(realmLevel - 1);
            }
            if (model.HasEquipCondition(realmLevel - 1))
            {
                m_EquipCondition.DisplayLevel(realmLevel - 1);
            }
        }
        public void DisplayCost()
        {
            var config = RealmConfig.Get(realmLevel - 1);
            m_ContainerCost.SetActive(config.NeedGood != 0 && config.NeedNum != 0);
            m_Item.SetItem(config.NeedGood, config.NeedNum);
        }
        private void OnLevelUp()
        {
@@ -78,7 +67,7 @@
            if (model.TryLevelUp(out error))
            {
                var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
                LimitedTimeLuxuryGiftModel.Instance.IsItemIdShow(23, config.NeedGood, config.NeedNum, 1, 0);
                //LimitedTimeLuxuryGiftModel.Instance.IsItemIdShow(23, config.NeedGood, config.NeedNum, 1, 0);
                CA523_tagCMRealmLVUp pak = new CA523_tagCMRealmLVUp();
                GameNetSystem.Instance.SendInfo(pak);
            }
@@ -100,8 +89,8 @@
                    SysNotifyMgr.Instance.ShowTip("RealmLevelUpError_2");
                    break;
                case 3:
                    var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
                    ItemTipUtility.Show(config.NeedGood);
                    //var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
                    //ItemTipUtility.Show(config.NeedGood);
                    break;
                case 4:
                    model.realmUpgrateNoEnoughReason = 1;
@@ -127,10 +116,10 @@
        public void DisplayLevel(int realmLevel)
        {
            var config = RealmConfig.Get(realmLevel);
            m_Condition.text = Language.Get("RealmConditionLevel", config.NeedLV);
            m_Condition.text = Language.Get("RealmConditionLevel", config.LVMax);
            var level = PlayerDatas.Instance.baseData.LV;
            var satisfy = level >= config.NeedLV;
            m_Progress.text = StringUtility.Contact(level, "/", config.NeedLV);
            var satisfy = level >= config.LVMax;
            m_Progress.text = StringUtility.Contact(level, "/", config.LVMax);
            m_Progress.color = satisfy ? UIHelper.s_LightGreen : UIHelper.s_DarkRedColor;
        }
System/Realm/RealmModel.cs
@@ -9,9 +9,9 @@
    {
        Dictionary<int, Dictionary<int, int>> m_RealmProperties = new Dictionary<int, Dictionary<int, int>>();
        Dictionary<int, Dictionary<int, int[]>> m_RealmPreviewEquips = new Dictionary<int, Dictionary<int, int[]>>();
        Dictionary<int, RealmLevelUpEquipCondition> m_RealmEquipConditions = new Dictionary<int, RealmLevelUpEquipCondition>();
        //Dictionary<int, RealmLevelUpEquipCondition> m_RealmEquipConditions = new Dictionary<int, RealmLevelUpEquipCondition>();
        Dictionary<int, Dictionary<int, int[]>> m_RecommandEquips = new Dictionary<int, Dictionary<int, int[]>>();
        List<List<int>> m_RealmStages = new List<List<int>>();
        //List<List<int>> m_RealmStages = new List<List<int>>();
        public int realmMaxLevel { get; private set; }
        public int realmPoolOpenLevel { get; private set; }
        public int realmEquipDisplayLevel { get; private set; }
@@ -228,36 +228,36 @@
        void ParseConfig()
        {
            realmMaxLevel = 0;
            List<int> stages = new List<int>();
            m_RealmStages.Add(stages);
            //List<int> stages = new List<int>();
            //m_RealmStages.Add(stages);
            var configs = RealmConfig.GetValues();
            foreach (var config in configs)
            {
                if (config.Lv > realmMaxLevel)
                {
                    realmMaxLevel = config.Lv;
                }
            //    if (config.Lv > realmMaxLevel)
            //    {
            //        realmMaxLevel = config.Lv;
            //    }
                if (config.AddAttrType != null && config.AddAttrType.Length > 0)
                {
                    Dictionary<int, int> dict = new Dictionary<int, int>();
                    for (int i = 0; i < config.AddAttrType.Length; i++)
                    {
                        dict.Add(config.AddAttrType[i], config.AddAttrNum[i]);
                    }
                    m_RealmProperties.Add(config.Lv, dict);
                }
            //    if (config.AddAttrType != null && config.AddAttrType.Length > 0)
            //    {
            //        Dictionary<int, int> dict = new Dictionary<int, int>();
            //        for (int i = 0; i < config.AddAttrType.Length; i++)
            //        {
            //            dict.Add(config.AddAttrType[i], config.AddAttrNum[i]);
            //        }
            //        m_RealmProperties.Add(config.Lv, dict);
            //    }
                if (config.Lv != 0)
                {
                    stages.Add(config.Lv);
            //    if (config.Lv != 0)
            //    {
            //        stages.Add(config.Lv);
                    if (config.BossID != 0)
                    {
                        stages = new List<int>();
                        m_RealmStages.Add(stages);
                    }
                }
            //        if (config.BossID != 0)
            //        {
            //            stages = new List<int>();
            //            m_RealmStages.Add(stages);
            //        }
            //    }
                if (!string.IsNullOrEmpty(config.equips))
                {
@@ -290,16 +290,16 @@
                    realmPoolOpenLevel = config.Lv;
                }
                if (config.NeedEquip != null && config.NeedEquip.Length > 1)
                {
                    m_RealmEquipConditions.Add(config.Lv, new RealmLevelUpEquipCondition()
                    {
                        level = config.NeedEquip[0],
                        starLevel = config.NeedEquip[1],
                        isSuit = config.NeedEquip[2] == 1,
                        itemColor = config.NeedEquip.Length > 3 ? config.NeedEquip[3] : 0,
                    });
                }
                //if (config.NeedEquip != null && config.NeedEquip.Length > 1)
                //{
                //    m_RealmEquipConditions.Add(config.Lv, new RealmLevelUpEquipCondition()
                //    {
                //        level = config.NeedEquip[0],
                //        starLevel = config.NeedEquip[1],
                //        isSuit = config.NeedEquip[2] == 1,
                //        itemColor = config.NeedEquip.Length > 3 ? config.NeedEquip[3] : 0,
                //    });
                //}
            }
            var funcConfig = FuncConfigConfig.Get("RealmExpTime");
@@ -319,11 +319,11 @@
        public bool TryGetRealmStages(int index, out List<int> stages)
        {
            stages = null;
            if (index < m_RealmStages.Count)
            {
                stages = m_RealmStages[index];
                return true;
            }
            //if (index < m_RealmStages.Count)
            //{
            //    stages = m_RealmStages[index];
            //    return true;
            //}
            return false;
        }
@@ -349,7 +349,9 @@
        public bool TryGetRealmEquipCondition(int level, out RealmLevelUpEquipCondition equipCondition)
        {
            return m_RealmEquipConditions.TryGetValue(level, out equipCondition);
            equipCondition = new RealmLevelUpEquipCondition();
            //return m_RealmEquipConditions.TryGetValue(level, out equipCondition);
            return false;
        }
        
        public bool TryLevelUp(out int error)
@@ -363,31 +365,31 @@
            }
            var config = RealmConfig.Get(realmLevel);
            
            if (PlayerDatas.Instance.baseData.LV < config.NeedLV)
            if (PlayerDatas.Instance.baseData.LV < config.LVMax)
            {
                error = 1;
                return false;
            }
            if (config.BossID != 0 && !isBossPass)
            {
                error = 2;
                return false;
            }
            //if (config.BossID != 0 && !isBossPass)
            //{
            //    error = 2;
            //    return false;
            //}
            int equipError = 0;
            if (!SatisfyEquipCondition(realmLevel, out equipError))
            {
                error = equipError;
                return false;
            }
            if (config.NeedGood != 0)
            {
                var count = packModel.GetItemCountByID(PackType.Item, config.NeedGood);
                if (count < config.NeedNum)
                {
                    error = 3;
                    return false;
                }
            }
            //if (config.NeedGood != 0)
            //{
            //    var count = packModel.GetItemCountByID(PackType.Item, config.NeedGood);
            //    if (count < config.NeedNum)
            //    {
            //        error = 3;
            //        return false;
            //    }
            //}
            return true;
        }
@@ -539,7 +541,8 @@
        public bool HasEquipCondition(int realmLevel)
        {
            return m_RealmEquipConditions.ContainsKey(realmLevel);
            //return m_RealmEquipConditions.ContainsKey(realmLevel);
            return false;
        }
        public int GetRealmStage(int realmLevel)
@@ -548,20 +551,21 @@
            {
                return 0;
            }
            for (int i = 0; i < m_RealmStages.Count; i++)
            {
                var stages = m_RealmStages[i];
                var index = stages.IndexOf(realmLevel);
                if (index != -1)
                {
                    if (stages.Count == 1)
                    {
                        return i - 1;
                    }
                    return i;
                }
            }
            return m_RealmStages.Count - 1;
            //for (int i = 0; i < m_RealmStages.Count; i++)
            //{
            //    var stages = m_RealmStages[i];
            //    var index = stages.IndexOf(realmLevel);
            //    if (index != -1)
            //    {
            //        if (stages.Count == 1)
            //        {
            //            return i - 1;
            //        }
            //        return i;
            //    }
            //}
            //return m_RealmStages.Count - 1;
            return 0;
        }
        public int GetRealmStageEffect(int realmLevel)
@@ -632,11 +636,11 @@
        public bool SatisfyChallengeBoss(int reamLevel)
        {
            var config = RealmConfig.Get(reamLevel);
            if (config != null)
            {
                return config.BossID != 0 && !isBossPass && PlayerDatas.Instance.baseData.LV >= config.NeedLV;
            }
            //var config = RealmConfig.Get(reamLevel);
            //if (config != null)
            //{
            //    return config.BossID != 0 && !isBossPass && PlayerDatas.Instance.baseData.LV >= config.NeedLV;
            //}
            return false;
        }
@@ -788,18 +792,18 @@
        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)
            //{
            //    var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
            //    if (config != null && config.NeedGood == itemId)
            //    {
            //        redpointDirty = true;
            //    }
            //}
            //if (packType == PackType.Equip)
            //{
            //    redpointDirty = true;
            //}
        }
        IEnumerator Co_TryOpenRealmWin()
UI/Common/UI3DModelFactory.cs
@@ -91,7 +91,7 @@
        var animator = model.GetComponent<Animator>();
        if (animator != null)
        {
            ResetRealmBossAnimator(id, animator);
            //ResetRealmBossAnimator(id, animator);
            animator.enabled = false;
        }
@@ -111,26 +111,26 @@
        }
    }
    private static void ResetRealmBossAnimator(int _id, Animator animator)
    {
        var configs = RealmConfig.GetValues();
        var index = configs.FindIndex((x) =>
        {
            return x.BossID == _id;
        });
        if (index != -1)
        {
            var npcConfig = NPCConfig.Get(_id);
            if (npcConfig != null)
            {
                var runtimeController = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, npcConfig.MODE);
                if (runtimeController != null)
                {
                    animator.runtimeAnimatorController = runtimeController;
                }
            }
        }
    }
    //private static void ResetRealmBossAnimator(int _id, Animator animator)
    //{
    //    var configs = RealmConfig.GetValues();
    //    var index = configs.FindIndex((x) =>
    //    {
    //        return x.BossID == _id;
    //    });
    //    if (index != -1)
    //    {
    //        var npcConfig = NPCConfig.Get(_id);
    //        if (npcConfig != null)
    //        {
    //            var runtimeController = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, npcConfig.MODE);
    //            if (runtimeController != null)
    //            {
    //                animator.runtimeAnimatorController = runtimeController;
    //            }
    //        }
    //    }
    //}
    public static GameObject LoadUIHorse(int id)
    {