少年修仙传客户端代码仓库
client_linchunjie
2019-03-15 fe00e5af27aa1e7019d2a3eeb931fa8d70b4a02f
System/Dungeon/TrialDungeonModel.cs
@@ -7,16 +7,19 @@
namespace Snxxz.UI
{
    [XLua.LuaCallCSharp]
   public class TrialDungeonModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
    public class TrialDungeonModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
    {
        Dictionary<int, List<TrialExchangeConfig>> trialTokenExchangeDict = new Dictionary<int, List<TrialExchangeConfig>>();
        Dictionary<int, int> lineToTokenClassDict;
        Dictionary<int, Dictionary<int, Item[]>> trialRewardDict = new Dictionary<int, Dictionary<int, Item[]>>();
        Dictionary<int, int> trialDungeonPetHorseLevels = null;
        public Dictionary<int, List<int>> trialClassTokens = new Dictionary<int, List<int>>();
        public List<int> trialTokens = new List<int>();
        PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
        DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
        DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
        PetModel petModel { get { return ModelCenter.Instance.GetModel<PetModel>(); } }
        MountModel horseModel { get { return ModelCenter.Instance.GetModel<MountModel>(); } }
        public event Action SelectEquipClassEvent;
@@ -128,6 +131,9 @@
            {
                trialSweepGradeLimit = int.Parse(funcConfig.Numerical1);
            }
            funcConfig = FuncConfigConfig.Get("MunekadoLockLimit");
            trialDungeonPetHorseLevels = ConfigParse.GetDic<int, int>(funcConfig.Numerical2);
        }
        public override void UnInit()
@@ -390,6 +396,35 @@
            return config.exchangeItemID[0];
        }
        public int GetDungeonRequirePetHorseLevel(int lineId)
        {
            if (trialDungeonPetHorseLevels.ContainsKey(lineId))
            {
                return trialDungeonPetHorseLevels[lineId];
            }
            return 0;
        }
        public int GetPetHorseLevel()
        {
            var level = 0;
            if (petModel._DicPetBack != null)
            {
                foreach (var item in petModel._DicPetBack.Values)
                {
                    level += item.PetClass;
                }
            }
            if (horseModel._DicHorse != null)
            {
                foreach (var item in horseModel._DicHorse.Values)
                {
                    level += item.Lv;
                }
            }
            return level;
        }
        #region 红点
        void UpdateRedpoint()
        {