| using System.Collections;  | 
| using System.Collections.Generic;  | 
| using UnityEngine;  | 
| namespace vnxbqy.UI  | 
| {  | 
|     public class TaskFeedbackModel : Model  | 
|     {  | 
|         Dictionary<int, TaskFeedback> m_TaskFeedbacks = new Dictionary<int, TaskFeedback>();  | 
|   | 
|         public readonly List<int> taskFeedbackFuncs = new List<int>();  | 
|   | 
|         public static Vector3 s_ClickPosition = Vector3.zero;  | 
|   | 
|         ReikiRootModel reikiRootModel { get { return ModelCenter.Instance.GetModel<ReikiRootModel>(); } }  | 
|         PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }  | 
|         TaskModel taskModel { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }  | 
|         TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }  | 
|         AlchemyModel alchemyModel { get { return ModelCenter.Instance.GetModel<AlchemyModel>(); } }  | 
|         EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }  | 
|         EquipStrengthModel equipStrengthModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } }  | 
|         TreasureSkillModel treasureSkillModel { get { return ModelCenter.Instance.GetModel<TreasureSkillModel>(); } }  | 
|   | 
|         public override void Init()  | 
|         {  | 
|             ParseConfig();  | 
|         }  | 
|   | 
|         public override void UnInit()  | 
|         {  | 
|         }  | 
|   | 
|         void ParseConfig()  | 
|         {  | 
|             var configs = TaskFeedbackConfig.GetValues();  | 
|             foreach (var config in configs)  | 
|             {  | 
|                 if (config.type == 100)  | 
|                 {  | 
|                     continue;  | 
|                 }  | 
|   | 
|                 var feedback = new TaskFeedback()  | 
|                 {  | 
|                     taskId = config.taskId,  | 
|                     type = (TaskFeedbackType)config.type,  | 
|                 };  | 
|   | 
|                 switch (feedback.type)  | 
|                 {  | 
|                     case TaskFeedbackType.SideTask:  | 
|                     case TaskFeedbackType.FightPowerSideTask:  | 
|                         {  | 
|                             var array = LitJson.JsonMapper.ToObject<int[][]>(config.sideTasks);  | 
|                             if (array != null)  | 
|                             {  | 
|                                 List<int[]> sideTasks = new List<int[]>(array.Length);  | 
|                                 for (int i = 0; i < array.Length; i++)  | 
|                                 {  | 
|                                     sideTasks.Add(array[i]);  | 
|                                 }  | 
|                                 feedback.sideTasks = sideTasks;  | 
|                             }  | 
|                         }  | 
|                         break;  | 
|                     case TaskFeedbackType.Equip:  | 
|                         {  | 
|                             var array = LitJson.JsonMapper.ToObject<int[]>(config.equips);  | 
|                             feedback.equipCondition = array;  | 
|                         }  | 
|                         break;  | 
|                     case TaskFeedbackType.ItemCount:  | 
|                         {  | 
|                             var array = LitJson.JsonMapper.ToObject<int[][]>(config.items);  | 
|                             if (array != null)  | 
|                             {  | 
|                                 List<Item> items = new List<Item>();  | 
|                                 for (int i = 0; i < array.Length; i++)  | 
|                                 {  | 
|                                     items.Add(new Item()  | 
|                                     {  | 
|                                         id = array[i][0],  | 
|                                         count = array[i][1],  | 
|                                     });  | 
|                                 }  | 
|                                 feedback.items = items;  | 
|                             }  | 
|                         }  | 
|                         break;  | 
|                     case TaskFeedbackType.SkyTowerFightPoint:  | 
|                         {  | 
|                             if (!string.IsNullOrEmpty(config.reikiRoot))  | 
|                             {  | 
|                                 var point = 0;  | 
|                                 int.TryParse(config.reikiRoot, out point);  | 
|                                 feedback.totalPoints = point;  | 
|                             }  | 
|                         }  | 
|                         break;  | 
|                     case TaskFeedbackType.ReikiPoint:  | 
|                         {  | 
|                             if (!string.IsNullOrEmpty(config.reikiRoot))  | 
|                             {  | 
|                                 var json = LitJson.JsonMapper.ToObject(config.reikiRoot);  | 
|                                 feedback.reikiRoots = new Dictionary<int, List<int[]>>();  | 
|                                 foreach (var jobKey in json.Keys)  | 
|                                 {  | 
|                                     var job = int.Parse(jobKey);  | 
|                                     var intArray = LitJson.JsonMapper.ToObject<int[][]>(json[jobKey].ToJson());  | 
|                                     feedback.reikiRoots.Add(job, new List<int[]>());  | 
|                                     for (int i = 0; i < intArray.Length; i++)  | 
|                                     {  | 
|                                         feedback.reikiRoots[job].Add(intArray[i]);  | 
|                                     }  | 
|                                 }  | 
|                             }  | 
|                         }  | 
|                         break;  | 
|                 }  | 
|   | 
|                 if (!string.IsNullOrEmpty(config.failFuncs))  | 
|                 {  | 
|                     var funcArray = LitJson.JsonMapper.ToObject<int[][]>(config.failFuncs);  | 
|                     if (funcArray != null)  | 
|                     {  | 
|                         List<int[]> failFuncs = new List<int[]>(funcArray.Length);  | 
|                         for (int i = 0; i < funcArray.Length; i++)  | 
|                         {  | 
|                             failFuncs.Add(funcArray[i]);  | 
|                         }  | 
|                         feedback.failFuns = failFuncs;  | 
|                     }  | 
|                 }  | 
|   | 
|                 m_TaskFeedbacks.Add(config.taskId, feedback);  | 
|             }  | 
|         }  | 
|   | 
|         public bool TryGetTaskFeedback(int taskId, out TaskFeedback feedback)  | 
|         {  | 
|             return m_TaskFeedbacks.TryGetValue(taskId, out feedback);  | 
|         }  | 
|   | 
|         public void ExecuteTaskFeedback(int taskId)  | 
|         {  | 
|             if (NewBieCenter.Instance.inGuiding)  | 
|             {  | 
|                 return;  | 
|             }  | 
|   | 
|             if (!WindowCenter.Instance.IsOpen<MainInterfaceWin>() && taskId != 3110)  | 
|             {  | 
|                 //特殊写死3110限制105级开启宗门试炼 触发提示逻辑,如后续不需要,请果断删除  | 
|                 return;  | 
|             }  | 
|   | 
|             TaskFeedback feedback;  | 
|             if (TryGetTaskFeedback(taskId, out feedback))  | 
|             {  | 
|                 var config = TaskFeedbackConfig.Get(taskId);  | 
|   | 
|                 switch (feedback.type)  | 
|                 {  | 
|                     case TaskFeedbackType.FightPower:  | 
|                     case TaskFeedbackType.Copper:  | 
|                     case TaskFeedbackType.ReikiPoint:  | 
|                     case TaskFeedbackType.Guide:  | 
|                     case TaskFeedbackType.Equip:  | 
|                     case TaskFeedbackType.ItemCount:  | 
|                     case TaskFeedbackType.SkyTowerFightPoint:  | 
|                     case TaskFeedbackType.DemonTreasure:  | 
|                     case TaskFeedbackType.AlchemyItem:  | 
|                     case TaskFeedbackType.HasFairy:  | 
|                         {  | 
|                             int condition = 0;  | 
|                             if (IsSatisfyCondition(feedback, out condition))  | 
|                             {  | 
|                                 ExecuteSuccFeedback(taskId);  | 
|                             }  | 
|                             else  | 
|                             {  | 
|                                 if (config.remind != null && config.remind.Length > 0)  | 
|                                 {  | 
|                                     var index = Mathf.Min(condition, config.remind.Length - 1);  | 
|                                     SysNotifyMgr.Instance.ShowTip(config.remind[index]);  | 
|                                 }  | 
|                                 if (feedback.failFuns != null)  | 
|                                 {  | 
|                                     var index = Mathf.Min(condition, feedback.failFuns.Count - 1);  | 
|                                     var funcTitle = index < config.funcTitles.Length ? config.funcTitles[index] : string.Empty;  | 
|                                     List<int> succFuncs;  | 
|                                     if (TryGetSatisfyConditionFuncs(feedback.failFuns[index], out succFuncs))  | 
|                                     {  | 
|                                         taskFeedbackFuncs.Clear();  | 
|                                         if (config.onlyOneFunc != null &&  | 
|                                             index < config.onlyOneFunc.Length && config.onlyOneFunc[index] == 1)  | 
|                                         {  | 
|                                             taskFeedbackFuncs.Add(succFuncs[0]);  | 
|                                         }  | 
|                                         else  | 
|                                         {  | 
|                                             taskFeedbackFuncs.AddRange(succFuncs);  | 
|                                         }  | 
|                                         TaskFeedbackFuncWin.funcTitle = funcTitle;  | 
|                                         WindowCenter.Instance.Open<TaskFeedbackFuncWin>();  | 
|                                     }  | 
|                                 }  | 
|                             }  | 
|                         }  | 
|                         break;  | 
|                     case TaskFeedbackType.SideTask:  | 
|                         {  | 
|                             int condition = 0;  | 
|                             if (IsSatisfyCondition(feedback, out condition))  | 
|                             {  | 
|                                 ExecuteSuccFeedback(taskId);  | 
|                             }  | 
|                             else  | 
|                             {  | 
|                                 if (config.remind != null && config.remind.Length > 0)  | 
|                                 {  | 
|                                     var taskIndex = feedback.IndexOfSideTasks(condition);  | 
|                                     var index = Mathf.Min(taskIndex, config.remind.Length - 1);  | 
|                                     SysNotifyMgr.Instance.ShowTip(config.remind[index]);  | 
|                                 }  | 
|                                 if (feedback.failFuns != null)  | 
|                                 {  | 
|                                     var taskIndex = feedback.IndexOfSideTasks(condition);  | 
|                                     var index = Mathf.Min(taskIndex, feedback.failFuns.Count - 1);  | 
|                                     var funcTitle = index < config.funcTitles.Length ? config.funcTitles[index] : string.Empty;  | 
|                                     List<int> succFuncs;  | 
|                                     if (TryGetSatisfyConditionFuncs(feedback.failFuns[index], out succFuncs))  | 
|                                     {  | 
|                                         taskFeedbackFuncs.Clear();  | 
|                                         if (config.onlyOneFunc != null &&  | 
|                                             index < config.onlyOneFunc.Length && config.onlyOneFunc[index] == 1)  | 
|                                         {  | 
|                                             taskFeedbackFuncs.Add(succFuncs[0]);  | 
|                                         }  | 
|                                         else  | 
|                                         {  | 
|                                             taskFeedbackFuncs.AddRange(succFuncs);  | 
|                                         }  | 
|                                         TaskFeedbackFuncWin.funcTitle = funcTitle;  | 
|                                         WindowCenter.Instance.Open<TaskFeedbackFuncWin>();  | 
|                                     }  | 
|                                 }  | 
|                             }  | 
|                         }  | 
|                         break;  | 
|                     case TaskFeedbackType.FightPowerSideTask:  | 
|                         {  | 
|                             int condition = 0;  | 
|                             if (IsSatisfyCondition(feedback, out condition))  | 
|                             {  | 
|                                 ExecuteSuccFeedback(taskId);  | 
|                             }  | 
|                             else  | 
|                             {  | 
|                                 if (config.remind != null && config.remind.Length > 0)  | 
|                                 {  | 
|                                     var index = Mathf.Min(condition, config.remind.Length - 1);  | 
|                                     SysNotifyMgr.Instance.ShowTip(config.remind[index]);  | 
|                                 }  | 
|                                 if (feedback.failFuns != null)  | 
|                                 {  | 
|                                     var sideTaskId = 0;  | 
|                                     IsSatisfySideTask(feedback.sideTasks, out sideTaskId);  | 
|                                     var taskIndex = feedback.IndexOfSideTasks(sideTaskId);  | 
|                                     var index = Mathf.Min(taskIndex, feedback.failFuns.Count - 1);  | 
|                                     var funcTitle = index < config.funcTitles.Length ? config.funcTitles[index] : string.Empty;  | 
|                                     List<int> succFuncs;  | 
|                                     if (TryGetSatisfyConditionFuncs(feedback.failFuns[index], out succFuncs))  | 
|                                     {  | 
|                                         taskFeedbackFuncs.Clear();  | 
|                                         if (config.onlyOneFunc != null &&  | 
|                                             index < config.onlyOneFunc.Length && config.onlyOneFunc[index] == 1)  | 
|                                         {  | 
|                                             taskFeedbackFuncs.Add(succFuncs[0]);  | 
|                                         }  | 
|                                         else  | 
|                                         {  | 
|                                             taskFeedbackFuncs.AddRange(succFuncs);  | 
|                                         }  | 
|                                         TaskFeedbackFuncWin.funcTitle = funcTitle;  | 
|                                         WindowCenter.Instance.Open<TaskFeedbackFuncWin>();  | 
|                                     }  | 
|                                 }  | 
|                             }  | 
|                         }  | 
|                         break;  | 
|                     case TaskFeedbackType.OnekeyHangUp:  | 
|                         {  | 
|                             OnekeyHangUp();  | 
|                         }  | 
|                         break;  | 
|                 }  | 
|             }  | 
|         }  | 
|   | 
|         public void OnekeyHangUp()  | 
|         {  | 
|   | 
|             var mapModel = ModelCenter.Instance.GetModel<MapModel>();  | 
|             var point = mapModel.GetRecommendHangPoint();  | 
|             var config = MapEventPointConfig.Get(point);  | 
|   | 
|             var mapId = MapUtility.GetMapId(config.DataMapID, config.LineId);  | 
|             MapTransferUtility.Instance.MissionFlyTo(mapId, config.NPCID, MapTransferType.WorldTransport);  | 
|         }  | 
|   | 
|         public void ExecuteSuccFeedback(int id)  | 
|         {  | 
|             var config = TaskFeedbackConfig.Get(id);  | 
|             var guide = config.succGuide;  | 
|             if (guide != 0 && !NewBieCenter.Instance.IsGuideCompleted(guide))  | 
|             {  | 
|                 ExecuteGuide(guide);  | 
|             }  | 
|             else  | 
|             {  | 
|                 if (config.jump != 0)  | 
|                 {  | 
|                     WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)config.jump);  | 
|                 }  | 
|             }  | 
|         }  | 
|   | 
|         public void ExecuteGuide(int id)  | 
|         {  | 
|             if (id == 0)  | 
|             {  | 
|                 return;  | 
|             }  | 
|             var config = GuideConfig.Get(id);  | 
|             if (config == null)  | 
|             {  | 
|                 DebugEx.LogFormat("引导<color=#ff0000>{0}</color>未添加", id);  | 
|                 return;  | 
|             }  | 
|             switch ((GuideType)config.Type)  | 
|             {  | 
|                 case GuideType.Functional:  | 
|                     if (FunctionalGuideCenter.Instance.ExistUnderwayGuide(id))  | 
|                     {  | 
|                         FunctionalGuideCenter.Instance.RemoveGuide(id);  | 
|                         NewBieCenter.Instance.ResetGuide(id);  | 
|                         SnxxzGame.Instance.StartCoroutine(_ExecuteGuide(id));  | 
|                     }  | 
|                     else  | 
|                     {  | 
|                         FunctionalGuideCenter.Instance.StartGuide(id);  | 
|                     }  | 
|                     break;  | 
|                 default:  | 
|                     NewBieCenter.Instance.StartNewBieGuideEx(id);  | 
|                     break;  | 
|             }  | 
|         }  | 
|   | 
|         IEnumerator _ExecuteGuide(int id)  | 
|         {  | 
|             yield return null;  | 
|             FunctionalGuideCenter.Instance.StartGuide(id);  | 
|         }  | 
|   | 
|         public bool IsSatisfyCondition(TaskFeedback feedback, out int condition)  | 
|         {  | 
|             var config = TaskFeedbackConfig.Get(feedback.taskId);  | 
|             condition = 0;  | 
|             switch (feedback.type)  | 
|             {  | 
|                 case TaskFeedbackType.FightPower:  | 
|                     return PlayerDatas.Instance.baseData.FightPoint >= (ulong)config.condition;  | 
|                 case TaskFeedbackType.SideTask:  | 
|                     return IsSatisfySideTask(feedback.sideTasks, out condition);  | 
|                 case TaskFeedbackType.ReikiPoint:  | 
|                     {  | 
|                         if (reikiRootModel.GetReikiRootTotalPointWithFree() < config.condition)  | 
|                         {  | 
|                             return false;  | 
|                         }  | 
|                         if (feedback.reikiRoots != null)  | 
|                         {  | 
|                             var job = PlayerDatas.Instance.baseData.Job;  | 
|                             var reikiRoots = feedback.reikiRoots[job];  | 
|                             foreach (var reikiRoot in reikiRoots)  | 
|                             {  | 
|                                 if (reikiRootModel.GetReikiRootPoint(reikiRoot[0]) < reikiRoot[1])  | 
|                                 {  | 
|                                     condition = 1;  | 
|                                     return false;  | 
|                                 }  | 
|                             }  | 
|                         }  | 
|                     }  | 
|                     return true;  | 
|                 case TaskFeedbackType.Equip:  | 
|                     {  | 
|                         var items = packModel.GetItems(PackType.Item, new SinglePack.FilterParams()  | 
|                         {  | 
|                             levels = new List<int>() { feedback.equipCondition[0] },  | 
|                             qualitys = new List<int>() { feedback.equipCondition[1] },  | 
|                             equipTypes = EquipModel.realmEquipTypes,  | 
|                             jobs = new List<int>() { PlayerDatas.Instance.baseData.Job },  | 
|                         });  | 
|                         return items != null && items.Count > 0;  | 
|                     }  | 
|                 case TaskFeedbackType.Copper:  | 
|                     return PlayerDatas.Instance.baseData.allCopper >= (ulong)config.condition;  | 
|                 case TaskFeedbackType.Guide:  | 
|                     return true;  | 
|                 case TaskFeedbackType.FightPowerSideTask:  | 
|                     return PlayerDatas.Instance.baseData.FightPoint >= (ulong)config.condition;  | 
|                 case TaskFeedbackType.ItemCount:  | 
|                     {  | 
|                         if (feedback.items != null)  | 
|                         {  | 
|                             foreach (var item in feedback.items)  | 
|                             {  | 
|                                 if (packModel.GetItemCountByID(PackType.Item, item.id) < item.count)  | 
|                                 {  | 
|                                     return false;  | 
|                                 }  | 
|                             }  | 
|                         }  | 
|                         return true;  | 
|                     }  | 
|                 case TaskFeedbackType.AlchemyItem:  | 
|                     {  | 
|                         if (!alchemyModel.IsGraspRecipe(config.condition))  | 
|                         {  | 
|                             var error = 0;  | 
|                             if (alchemyModel.TryLearn(config.condition, out error))  | 
|                             {  | 
|                                 return true;  | 
|                             }  | 
|                             return false;  | 
|                         }  | 
|                         Item material;  | 
|                         return alchemyModel.GetStoveState(config.condition) != 0  | 
|                             || alchemyModel.IsAlchemyEnoughMaterial(config.condition, out material);  | 
|                     }  | 
|                 case TaskFeedbackType.SkyTowerFightPoint:  | 
|                     {  | 
|                         var skyTowerConfig = SkyTowerConfig.Get(config.condition);  | 
|                         if (skyTowerConfig != null)  | 
|                         {  | 
|                             if (feedback.totalPoints > 0 && PlayerDatas.Instance.baseData.FightPoint < (ulong)NPCExConfig.Get(skyTowerConfig.bossId).SuppressFightPower)  | 
|                             {  | 
|                                 condition = reikiRootModel.GetReikiRootTotalPointWithFree() >= feedback.totalPoints ? 0 : 1;  | 
|                                 return false;  | 
|                             }  | 
|                             else  | 
|                             {  | 
|                                 return PlayerDatas.Instance.baseData.FightPoint >= (ulong)NPCExConfig.Get(skyTowerConfig.bossId).SuppressFightPower;  | 
|                             }  | 
|                         }  | 
|                     }  | 
|                     break;  | 
|                 case TaskFeedbackType.DemonTreasure:  | 
|                     {  | 
|                         TreasureDungeon treasureDungeon;  | 
|                         if (treasureModel.TryGetTreasureDungeon(config.condition, out treasureDungeon))  | 
|                         {  | 
|                             var dungeonInfo = treasureDungeon.Get(treasureDungeon.currentLevel + 1);  | 
|                             if (!dungeonInfo.Equals(default(TreasureDungeonInfo)))  | 
|                             {  | 
|                                 return (int)UIHelper.GetPropertyValue(PropertyType.DEF) >= dungeonInfo.defense;  | 
|                             }  | 
|                             return true;  | 
|                         }  | 
|                     }  | 
|                     break;  | 
|                 case TaskFeedbackType.HasFairy:  | 
|                     {  | 
|                         return PlayerDatas.Instance.baseData.FamilyId > 0;  | 
|                     }  | 
|             }  | 
|             return false;  | 
|         }  | 
|   | 
|         public bool IsSatisfySideTask(List<int[]> sideTasks, out int condition)  | 
|         {  | 
|             condition = 0;  | 
|             foreach (var taskId in taskModel.SideQuestsDic.Keys)  | 
|             {  | 
|                 for (int i = 0; i < sideTasks.Count; i++)  | 
|                 {  | 
|                     if (taskId >= sideTasks[i][0]  | 
|                         && taskId <= sideTasks[i][1])  | 
|                     {  | 
|                         condition = taskId;  | 
|                         return false;  | 
|                     }  | 
|                 }  | 
|             }  | 
|             return true;  | 
|         }  | 
|   | 
|         public bool TryGetSatisfyConditionFuncs(int[] funcs, out List<int> succFuncs)  | 
|         {  | 
|             succFuncs = null;  | 
|             if (funcs != null && funcs.Length > 0)  | 
|             {  | 
|                 succFuncs = new List<int>();  | 
|                 for (int i = 0; i < funcs.Length; i++)  | 
|                 {  | 
|                     if (IsSatisfyFuncConfition(funcs[i]))  | 
|                     {  | 
|                         succFuncs.Add(funcs[i]);  | 
|                     }  | 
|                 }  | 
|                 return succFuncs.Count > 0;  | 
|             }  | 
|             return false;  | 
|         }  | 
|   | 
|         public bool IsSatisfyFuncConfition(int func)  | 
|         {  | 
|             var config = TaskFeedbackFuncConfig.Get(func);  | 
|             if (config != null)  | 
|             {  | 
|                 switch (config.type)  | 
|                 {  | 
|                     case 1:  | 
|                         foreach (var item in config.itemCondition)  | 
|                         {  | 
|                             var count = packModel.GetItemCountByID(PackType.Item, item.x);  | 
|                             if (count < item.y)  | 
|                             {  | 
|                                 return false;  | 
|                             }  | 
|                         }  | 
|                         return true;  | 
|                     case 2:  | 
|                         return reikiRootModel.freePoint > 0;  | 
|                     case 3:  | 
|                         foreach (var equipSet in equipModel.GetUnLockedEquipSets())  | 
|                         {  | 
|                             if (equipModel.ExistBetterEquip(equipSet, EquipModel.realmEquipTypes))  | 
|                             {  | 
|                                 return true;  | 
|                             }  | 
|                         }  | 
|                         return false;  | 
|                     case 4:  | 
|                         MissionDetailDates taskData;  | 
|                         if (taskModel.TryGetTaskData(config.condition, out taskData))  | 
|                         {  | 
|                             return taskData.MissionState != 3;  | 
|                         }  | 
|                         return false;  | 
|                     case 5:  | 
|                         return equipStrengthModel.ExistAnySatisfyStrengh();  | 
|                     case 6:  | 
|                         if (!alchemyModel.IsGraspRecipe(config.condition))  | 
|                         {  | 
|                             var error = 0;  | 
|                             if (alchemyModel.TryLearn(config.condition, out error))  | 
|                             {  | 
|                                 return true;  | 
|                             }  | 
|                             return false;  | 
|                         }  | 
|                         Item material;  | 
|                         return alchemyModel.GetStoveState(config.condition) != 0  | 
|                             || alchemyModel.IsAlchemyEnoughMaterial(config.condition, out material);  | 
|                     case 7:  | 
|                         {  | 
|                             foreach (var funcId in config.excludeFuncs)  | 
|                             {  | 
|                                 if (funcId == func)  | 
|                                 {  | 
|                                     continue;  | 
|                                 }  | 
|                                 if (IsSatisfyFuncConfition(funcId))  | 
|                                 {  | 
|                                     return false;  | 
|                                 }  | 
|                             }  | 
|                             return true;  | 
|                         }  | 
|                     case 10:  | 
|                         {  | 
|                             if (config.expertSkills != null)  | 
|                             {  | 
|                                 foreach (var skill in config.expertSkills)  | 
|                                 {  | 
|                                     if (treasureSkillModel.IsSatisfyLevelUpSkill(skill.x, skill.y, skill.z))  | 
|                                     {  | 
|                                         return true;  | 
|                                     }  | 
|                                 }  | 
|                             }  | 
|                             return false;  | 
|                         }  | 
|                     case 11:  | 
|                         {  | 
|                             if (config.condition != 0)  | 
|                             {  | 
|                                 Treasure treasure;  | 
|                                 if (treasureModel.TryGetTreasure(config.condition, out treasure)  | 
|                                     && treasure.state != TreasureState.Collected)  | 
|                                 {  | 
|                                     return true;  | 
|                                 }  | 
|                             }  | 
|                         }  | 
|                         return false;  | 
|                     default:  | 
|                         return true;  | 
|                 }  | 
|             }  | 
|             return false;  | 
|         }  | 
|     }  | 
|   | 
|     public struct TaskFeedback  | 
|     {  | 
|         public int taskId;  | 
|         public TaskFeedbackType type;  | 
|         public List<int[]> sideTasks;  | 
|         public int[] equipCondition;  | 
|         public List<Item> items;  | 
|         public Dictionary<int, List<int[]>> reikiRoots;  | 
|         public List<int[]> failFuns;  | 
|         public int totalPoints;  | 
|   | 
|         public int IndexOfSideTasks(int taskId)  | 
|         {  | 
|             var index = 0;  | 
|             for (int i = 0; i < sideTasks.Count; i++)  | 
|             {  | 
|                 if (taskId >= sideTasks[i][0]  | 
|                    && taskId <= sideTasks[i][1])  | 
|                 {  | 
|                     index += taskId - sideTasks[i][0];  | 
|                     break;  | 
|                 }  | 
|                 index += (sideTasks[i][1] - sideTasks[i][0] + 1);  | 
|             }  | 
|             return index;  | 
|         }  | 
|     }  | 
|   | 
|     public enum TaskFeedbackType  | 
|     {  | 
|         FightPower = 1,  | 
|         SideTask = 2,  | 
|         ReikiPoint = 3,  | 
|         Equip = 4,  | 
|         Copper = 5,  | 
|         Guide = 6,  | 
|         FightPowerSideTask = 7,  | 
|         ItemCount = 8,  | 
|         SkyTowerFightPoint = 9,  | 
|         DemonTreasure = 10,  | 
|         AlchemyItem = 11,  | 
|         HasFairy = 12,  | 
|         OnekeyHangUp = 13,  | 
|         //后续IL开发添加预设  | 
|         default1,  | 
|         default2,  | 
|         default3,  | 
|         default4,  | 
|         default5,  | 
|         default6,  | 
|         default7,  | 
|         default8,  | 
|         default9,  | 
|         default10,  | 
|     }  | 
| }  | 
|   |