Exemplo n.º 1
0
        private bool InitMonsterPool(GM.DataCache.ConditionTask tasks)
        {
            if (tasks == null)
            {
                EB.Debug.LogError("InitMonsterPool: tasks is null");
                return(false);
            }

            mMonsterPool = new int[tasks.MonsterPoolLength];
            for (int i = 0; i < mMonsterPool.Length; ++i)
            {
                mMonsterPool[i] = int.Parse(tasks.GetMonsterPool(i).MonsterId);
            }
            return(true);
        }
Exemplo n.º 2
0
        private bool InitTasks(GM.DataCache.ConditionTask tasks)
        {
            if (tasks == null)
            {
                EB.Debug.LogError("InitTasks: tasks is null");
                return(false);
            }

            mTasks = new TaskTemplate[tasks.TasksLength];
            for (int i = 0; i < mTasks.Length; ++i)
            {
                mTasks[i] = ParseTask(tasks.GetTasks(i));
            }

            System.Array.Sort(mTasks, TaskTemplate.Comparer);
            return(true);
        }
Exemplo n.º 3
0
        private bool InitLimitedTimeGift(GM.DataCache.ConditionTask tasks)
        {
            if (tasks == null)
            {
                EB.Debug.LogError("InitLimitedTimeGift: LimitedTimeGift is null");
                return(false);
            }

            mLimitedTimeGiftList = new List <LimitedTimeGiftTemplate>();
            for (int i = 0; i < tasks.LimitedTimeGiftLength; ++i)
            {
                LimitedTimeGiftTemplate data = ParseLimitedTimeGift(tasks.GetLimitedTimeGift(i));
                if (data != null && !string.IsNullOrEmpty(data.ID))
                {
                    mLimitedTimeGiftList.Add(data);
                }
            }

            return(true);
        }
Exemplo n.º 4
0
        private bool InitBattlePass(GM.DataCache.ConditionTask tasks)
        {
            if (tasks == null)
            {
                EB.Debug.LogError("InitBattlePass: BattlePass is null");
                return(false);
            }

            mBattlePassDic = new Dictionary <int, BattlePassTemplate>();
            for (int i = 0; i < tasks.BattlePassLength; ++i)
            {
                BattlePassTemplate data = ParseBattlePass(tasks.GetBattlePass(i));
                if (data != null && data.id > 0)
                {
                    mBattlePassDic.Add(data.id, data);
                }
            }

            return(true);
        }