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); }
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); }
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); }
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); }