| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Sunday, December 24, 2017 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | using System.Collections.Generic; |
| | | using Snxxz.UI; |
| | | //关于飞鞋任务 |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class FlyingShoesTask : MonoBehaviour |
| | | { |
| | | [SerializeField] GameObject m_ImgSelected;//选中条 |
| | | [SerializeField] Button m_DeliveryButton;//传送符按钮 |
| | | [SerializeField] RichText m_TitleText;//标题 |
| | | [SerializeField] RichText m_ContentText;//内容 |
| | | [SerializeField] Button m_FlyingShoesTaskButton; |
| | | [SerializeField] UIEffect m_Uieffect; |
| | | [SerializeField] Transform m_parent; |
| | | [SerializeField] UIEffect m_ProgressEffect; |
| | | |
| | | private List<int> MainlineTaskType = new List<int>();//主线类型 |
| | | private List<string> MainlineTaskTypekey = new List<string>();//主线任务类型key |
| | | |
| | | private List<int> SideQuestsType = new List<int>();//支线类型 |
| | | private List<string> SideQuestsTypeKey = new List<string>();//支线任务类型Key |
| | | |
| | | private List<int> BountyMissionsType = new List<int>();//赏金 |
| | | private List<string> BountyMissionsTypeKey = new List<string>();//赏金任务类型key |
| | | |
| | | private List<int> FairyAuMissionType = new List<int>();//仙盟任务 |
| | | private List<string> FairyAuMissionTypeKey = new List<string>();//仙盟任务Key |
| | | |
| | | private List<int> TranscriptTask = new List<int>();//赏金副本 |
| | | |
| | | private List<int> DemonMissionTypeList = new List<int>();//魔族 |
| | | private List<string> DemonMissionTypeListKey = new List<string>();//魔族 |
| | | |
| | | private Dictionary<int, int> FabaoDic = new Dictionary<int, int>(); |
| | | |
| | | PlayerTaskDatas m_TaskModel; |
| | | PlayerTaskDatas taskmodel { get { return m_TaskModel ?? (m_TaskModel = ModelCenter.Instance.GetModel<PlayerTaskDatas>()); } } |
| | | PlayerPackModel _playerPack; |
| | | PlayerPackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); } } |
| | | PlayerMainDate m_MainModel; |
| | | PlayerMainDate mainModel { get { return m_MainModel ?? (m_MainModel = ModelCenter.Instance.GetModel<PlayerMainDate>()); } } |
| | | TreasureModel m_treasureModel; |
| | | TreasureModel treasureModel { get { return m_treasureModel ?? (m_treasureModel = ModelCenter.Instance.GetModel<TreasureModel>()); } } |
| | | CoinTaskTipModel m_CoinTaskTip; |
| | | CoinTaskTipModel coinTaskTip { get { return m_CoinTaskTip ?? (m_CoinTaskTip = ModelCenter.Instance.GetModel<CoinTaskTipModel>()); } } |
| | | |
| | | private Dictionary<int, int> RunTaskCnt1 = new Dictionary<int, int>();//关于跑环环数的记录1 |
| | | private Dictionary<int, int> RunTaskCnt2 = new Dictionary<int, int>();//关于跑环环数的记录2 |
| | | private bool IsKaJiBool = false;//是否为卡级任务 |
| | | private int Task_ID = 0;//获取任务ID |
| | | |
| | | private int progressRef = -1; |
| | | |
| | | private void Awake() |
| | | { |
| | | m_DeliveryButton.RemoveAllListeners(); |
| | | m_DeliveryButton.AddListener(OnClickDeliveryButton); |
| | | } |
| | | |
| | | private void OnEnable() |
| | | { |
| | | |
| | | } |
| | | |
| | | private void Start() |
| | | { |
| | | m_FlyingShoesTaskButton.AddListener(OnClickTaskButton); |
| | | } |
| | | public GameObject ImgSelected |
| | | { |
| | | get { return m_ImgSelected; } |
| | | set { m_ImgSelected = value; } |
| | | } |
| | | |
| | | public Button DeliveryButton |
| | | { |
| | | get { return m_DeliveryButton; } |
| | | set { m_DeliveryButton = value; } |
| | | } |
| | | |
| | | public RichText TitleText |
| | | { |
| | | get { return m_TitleText; } |
| | | set { m_TitleText = value; } |
| | | } |
| | | public RichText ContentText |
| | | { |
| | | get { return m_ContentText; } |
| | | set { m_ContentText = value; } |
| | | } |
| | | |
| | | public UIEffect UIEffect |
| | | { |
| | | get { return m_Uieffect; } |
| | | set { m_Uieffect = value; } |
| | | |
| | | } |
| | | public Button FlyingShoesTaskButton1 |
| | | { |
| | | get { return m_FlyingShoesTaskButton; } |
| | | set { m_FlyingShoesTaskButton = value; } |
| | | } |
| | | |
| | | private void OnClickTaskButton() |
| | | { |
| | | mainModel.IsSelfMotionTask = false; |
| | | for (int i = 0; i < m_parent.childCount; i++) |
| | | { |
| | | m_parent.GetChild(i).GetComponent<FlyingShoesTask>().ImgSelected.SetActive(false); |
| | | } |
| | | m_ImgSelected.SetActive(true); |
| | | |
| | | taskmodel.GetNowTaskID = Task_ID; |
| | | switch ((int)taskmodel.GetTaskStatus(Task_ID)) |
| | | { |
| | | case -5: |
| | | case 0: |
| | | DropItemManager.StopMissionPickup = true;//主动停止拾取物品 |
| | | if (PlayerDatas.Instance.extersion.bossState == 1) |
| | | { |
| | | string strNpc = string.Empty; |
| | | strNpc = ContentText.GetHrefMessage("movenpc"); |
| | | int npcId = 0; |
| | | int mapID = PlayerDatas.Instance.baseData.MapID; |
| | | if (int.TryParse(strNpc, out npcId)) |
| | | { |
| | | var npcConfig = ConfigManager.Instance.GetAllValues<mapnpcConfig>(); |
| | | foreach (var value in npcConfig) |
| | | { |
| | | if (value.NPCID == npcId && value.MapID != mapID) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("Task_Transfer1"); |
| | | return; |
| | | } |
| | | } |
| | | var MonsterConfig = ConfigManager.Instance.GetTemplate<MonsterRefreshPointConfig>(npcId); |
| | | if (MonsterConfig != null && MonsterConfig.MapId != mapID) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("Task_Transfer1"); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | ContentText.ExcuteHref(); |
| | | OpenPanel(Task_ID); |
| | | break; |
| | | case 1: |
| | | |
| | | if (FabaoDic.ContainsKey(Task_ID)) |
| | | { |
| | | var _treasureId = FabaoDic[Task_ID]; |
| | | var treasureConfig = ConfigManager.Instance.GetTemplate<TreasureConfig>(_treasureId); |
| | | treasureModel.currentCategory = (TreasureCategory)treasureConfig.Category; |
| | | WindowCenter.Instance.Close<MainInterfaceWin>(); |
| | | var _unlockTreasure = treasureModel.GetTreasureUnlockShow(treasureModel.currentCategory); |
| | | if (_unlockTreasure != 0) |
| | | { |
| | | treasureModel.treasureGotoId = _unlockTreasure; |
| | | WindowCenter.Instance.Open<TreasureSelectWin>(); |
| | | } |
| | | else |
| | | { |
| | | treasureModel.selectedTreasure = _treasureId; |
| | | treasureModel.openFromTaskId = Task_ID; |
| | | WindowCenter.Instance.Open<TreasureLevelUpWin>(); |
| | | } |
| | | return; |
| | | } |
| | | |
| | | var tasklistconfig = ConfigManager.Instance.GetTemplate<TaskListConfig>(Task_ID); |
| | | if (tasklistconfig != null) |
| | | { |
| | | var _treasureId = tasklistconfig.FabaoID; |
| | | var treasureConfig = ConfigManager.Instance.GetTemplate<TreasureConfig>(_treasureId); |
| | | treasureModel.currentCategory = (TreasureCategory)treasureConfig.Category; |
| | | WindowCenter.Instance.Close<MainInterfaceWin>(); |
| | | var _unlockTreasure = treasureModel.GetTreasureUnlockShow(treasureModel.currentCategory); |
| | | if (_unlockTreasure != 0) |
| | | { |
| | | treasureModel.treasureGotoId = _unlockTreasure; |
| | | WindowCenter.Instance.Open<TreasureSelectWin>(); |
| | | } |
| | | else |
| | | { |
| | | treasureModel.selectedTreasure = _treasureId; |
| | | treasureModel.openFromTaskId = Task_ID; |
| | | WindowCenter.Instance.Open<TreasureLevelUpWin>(); |
| | | } |
| | | } |
| | | break; |
| | | case 2: |
| | | WindowCenter.Instance.Open<HoistingWin>(); |
| | | break; |
| | | case 3: |
| | | taskmodel.CompletionOfTask(Task_ID); |
| | | break; |
| | | default: |
| | | break; |
| | | |
| | | } |
| | | } |
| | | private void OnClickDeliveryButton()//传送符 |
| | | { |
| | | mainModel.FlyShoseTaskID = Task_ID; |
| | | string _FlyID = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("TransportPay").Numerical1; |
| | | int itemNumber = playerPack.GetItemCountByID(PackType.rptItem, int.Parse(_FlyID));//获取飞鞋的数量 |
| | | mainModel.IsSelfMotionTask = false; |
| | | if (ModelCenter.Instance.GetModel<VipModel>().GetVipPrivilegeCnt(VipPrivilegeType.FreeTransfer) > 0) |
| | | { |
| | | m_ContentText.ExcuteHref(1); |
| | | return; |
| | | } |
| | | if (itemNumber > 0) |
| | | { |
| | | m_ContentText.ExcuteHref(1); |
| | | } |
| | | else |
| | | { |
| | | if (mainModel.IsFlyShoseBool) |
| | | { |
| | | int NeedMoney = (int)UIHelper.GetMoneyCnt(1) + (int)UIHelper.GetMoneyCnt(2); |
| | | if (NeedMoney >= 1) |
| | | { |
| | | m_ContentText.ExcuteHref(1); |
| | | } |
| | | else |
| | | { |
| | | WindowCenter.Instance.Open<RechargeTipWin>(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | FlyShoseConfirmwin.useEnvironment = FlyShoseConfirmwin.UseEnvironment.Task; |
| | | WindowCenter.Instance.Open<FlyShoseConfirmwin>(); |
| | | } |
| | | |
| | | //SysNotifyMgr.Instance.ShowTip("Z_NoFlyItem"); |
| | | } |
| | | |
| | | } |
| | | public void FlyingShoes_Task(int TaskID) |
| | | { |
| | | Task_ID = TaskID; |
| | | TypeAssignment(); |
| | | if (TaskID == taskmodel.GetNowTaskID) |
| | | { |
| | | m_ImgSelected.SetActive(true); |
| | | for (int i = 0; i < m_parent.childCount; i++) |
| | | { |
| | | int taskID1 = m_parent.GetChild(i).GetComponent<TaskType>().TaskID; |
| | | if (TaskID != taskID1) |
| | | { |
| | | m_parent.GetChild(i).GetComponent<FlyingShoesTask>().ImgSelected.SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | m_DeliveryButton.gameObject.SetActive(true); |
| | | if (!taskmodel.allMissionDict.ContainsKey(TaskID)) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | if ((int)taskmodel.GetTaskStatus(TaskID) > 0) |
| | | { |
| | | m_DeliveryButton.gameObject.SetActive(false); |
| | | IsKaJiBool = true; |
| | | } |
| | | else |
| | | { |
| | | IsKaJiBool = false; |
| | | } |
| | | |
| | | if (taskmodel.allMissionDict[TaskID].MissionState == 2) |
| | | { |
| | | m_TitleText.text = "<color=#109d06>" + TaskTitle(TaskID) + "</color>"; |
| | | } |
| | | else |
| | | { |
| | | m_TitleText.text = "<color=#feed28>" + TaskTitle(TaskID) + "</color>"; |
| | | } |
| | | if (TranscriptTask.Contains(TaskID)) |
| | | { |
| | | m_TitleText.text = "<color=#ec4bf6>" + TaskTitle(TaskID) + "</color>"; |
| | | } |
| | | string str = taskmodel.allMissionDict[TaskID].InforList; |
| | | var taskinfo = ConfigManager.Instance.GetTemplate<TASKINFOConfig>(str); |
| | | if (taskinfo != null) |
| | | { |
| | | m_ContentText.text = taskinfo.show_writing; |
| | | } |
| | | else |
| | | { |
| | | DesignDebug.LogError("任务表格PyTaskInfo配置缺失"); |
| | | return; |
| | | } |
| | | |
| | | bool isOPenTransferButton = HrefAnalysis.Inst.ContainsKey(taskinfo.show_writing, "flynpc"); |
| | | if (isOPenTransferButton && !IsKaJiBool) |
| | | { |
| | | m_DeliveryButton.gameObject.SetActive(true); |
| | | } |
| | | else |
| | | { |
| | | m_DeliveryButton.gameObject.SetActive(false); |
| | | } |
| | | |
| | | m_ContentText.raycastTarget = false; |
| | | |
| | | if (taskmodel._DicTaskInformation.ContainsKey(TaskID)) |
| | | { |
| | | Dictionary<string, string> SkillDic = new Dictionary<string, string>(); |
| | | SkillDic = taskmodel._DicTaskInformation[TaskID]; |
| | | string strA = "on_kill_" + TaskID.ToString(); |
| | | string strB = "get_byid_" + TaskID.ToString(); |
| | | if (SkillDic.ContainsKey(strA)) |
| | | { |
| | | var progress = 0; |
| | | int.TryParse(SkillDic[strA], out progress); |
| | | if (progressRef != -1 && progress != 0 && progressRef != progress) |
| | | { |
| | | m_ProgressEffect.Play(); |
| | | } |
| | | |
| | | progressRef = progress; |
| | | m_ContentText.SetReplaceInfo(SkillDic); |
| | | } |
| | | else if (SkillDic.ContainsKey(strB)) |
| | | { |
| | | var progress = 0; |
| | | int.TryParse(SkillDic[strB], out progress); |
| | | if (progressRef != -1 && progress != 0 && progressRef != progress) |
| | | { |
| | | m_ProgressEffect.Play(); |
| | | } |
| | | |
| | | progressRef = progress; |
| | | m_ContentText.SetReplaceInfo(SkillDic); |
| | | } |
| | | } |
| | | |
| | | if (taskmodel.BountyDic.ContainsKey(TaskID) || taskmodel.FairyAuDic.ContainsKey(TaskID)) |
| | | { |
| | | var config = ConfigManager.Instance.GetTemplate<TASKINFOConfig>(str); |
| | | if (config != null) |
| | | { |
| | | var progress = 0; |
| | | if (taskmodel.ReplaceDic.ContainsKey(TaskID) && taskmodel.ReplaceDic[TaskID].ContainsKey("kill_npc_id_cur_count")) |
| | | { |
| | | progress = taskmodel.ReplaceDic[TaskID]["kill_npc_id_cur_count"]; |
| | | if (progressRef != -1 && progress != 0 && progressRef != progress) |
| | | { |
| | | m_ProgressEffect.Play(); |
| | | } |
| | | |
| | | progressRef = progress; |
| | | } |
| | | |
| | | string strRichA = TaskAllocation.Instance.GetTaskInfo(config.show_writing, TaskID); |
| | | m_ContentText.text = strRichA; |
| | | } |
| | | else |
| | | { |
| | | DesignDebug.LogError("任务表格PyTaskInfo配置缺失"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | private string TaskTitle(int taskID) |
| | | { |
| | | var config = ConfigManager.Instance.GetTemplate<TASKINFOConfig>(taskmodel.allMissionDict[taskID].Name); |
| | | if (config == null) |
| | | { |
| | | DesignDebug.LogError("任务表格PyTaskInfo配置缺失"); |
| | | return null; |
| | | } |
| | | string taskName = config.show_writing; |
| | | |
| | | if (taskmodel.allMissionDict[taskID].Type == 15) |
| | | { |
| | | string str = string.Format(Language.Get("Z1800"), taskName); |
| | | return str; |
| | | } |
| | | else if (MainlineTaskType.Contains(taskmodel.allMissionDict[taskID].Type)) |
| | | { |
| | | int Index = MainlineTaskType.IndexOf(taskmodel.allMissionDict[taskID].Type); |
| | | string str = string.Format(Language.Get(MainlineTaskTypekey[Index]), taskName); |
| | | return str; |
| | | } |
| | | else if (taskmodel.allMissionDict[taskID].Type == 3) |
| | | { |
| | | string str = string.Format(Language.Get("Demon_Text"), taskName); |
| | | return str; |
| | | } |
| | | else if (SideQuestsType.Contains(taskmodel.allMissionDict[taskID].Type)) |
| | | { |
| | | int Index = SideQuestsType.IndexOf(taskmodel.allMissionDict[taskID].Type); |
| | | string str = string.Format(Language.Get(SideQuestsTypeKey[Index]), taskName); |
| | | return str; |
| | | } |
| | | else if (BountyMissionsType.Contains(taskmodel.allMissionDict[taskID].Type)) |
| | | { |
| | | int Index = BountyMissionsType.IndexOf(taskmodel.allMissionDict[taskID].Type); |
| | | int cylinderNumber = TaskAllocation.Instance.ForRingNumber() + 1; |
| | | string str = string.Empty; |
| | | if (cylinderNumber > RunTaskCnt2[7]) |
| | | { |
| | | str = string.Format(Language.Get(BountyMissionsTypeKey[Index]), taskName); |
| | | } |
| | | else |
| | | { |
| | | str = string.Format(Language.Get(BountyMissionsTypeKey[Index]), taskName) + cylinderNumber + "/" + RunTaskCnt2[7]; |
| | | } |
| | | |
| | | return str; |
| | | } |
| | | else if (FairyAuMissionType.Contains(taskmodel.allMissionDict[taskID].Type)) |
| | | { |
| | | int Index = FairyAuMissionType.IndexOf(taskmodel.allMissionDict[taskID].Type); |
| | | int cylinderNumber = TaskAllocation.Instance.FairyAuNumber() + 1; |
| | | string str = string.Empty; |
| | | if (cylinderNumber > RunTaskCnt2[12]) |
| | | { |
| | | str = string.Format(Language.Get(FairyAuMissionTypeKey[Index]), taskName); |
| | | } |
| | | else |
| | | { |
| | | str = string.Format(Language.Get(FairyAuMissionTypeKey[Index]), taskName) + cylinderNumber + "/" + RunTaskCnt2[12]; |
| | | } |
| | | |
| | | return str; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | void TypeAssignment() |
| | | { |
| | | if (MainlineTaskType.Count == 0) |
| | | { |
| | | var RunTaskCntStr = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("RunTaskCnt"); |
| | | RunTaskCnt1 = ConfigParse.GetDic<int, int>(RunTaskCntStr.Numerical1); |
| | | RunTaskCnt2 = ConfigParse.GetDic<int, int>(RunTaskCntStr.Numerical2); |
| | | |
| | | var MainlineTaskTypeList = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("MainlineTaskType"); |
| | | int[] strMainlineTaskType = ConfigParse.GetMultipleStr<int>(MainlineTaskTypeList.Numerical1);//主线 |
| | | string[] strMainlineTaskType1 = ConfigParse.GetMultipleStr(MainlineTaskTypeList.Numerical2);//主线 |
| | | for (int i = 0; i < strMainlineTaskType.Length; i++) |
| | | { |
| | | MainlineTaskType.Add(strMainlineTaskType[i]); |
| | | MainlineTaskTypekey.Add(strMainlineTaskType1[i]); |
| | | } |
| | | |
| | | var SideQuestsTypeList = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("SideQuestsType"); |
| | | int[] strSideQuestsType = ConfigParse.GetMultipleStr<int>(SideQuestsTypeList.Numerical1);//支线 |
| | | string[] strSideQuestsType1 = ConfigParse.GetMultipleStr(SideQuestsTypeList.Numerical2);//支线 |
| | | for (int i = 0; i < strSideQuestsType.Length; i++) |
| | | { |
| | | SideQuestsType.Add(strSideQuestsType[i]); |
| | | SideQuestsTypeKey.Add(strSideQuestsType1[i]); |
| | | } |
| | | |
| | | var BountyMissionsTypeList = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("BountyMissionsType"); |
| | | int[] strBountyMissionsType = ConfigParse.GetMultipleStr<int>(BountyMissionsTypeList.Numerical1);//赏金 |
| | | string[] strBountyMissionsType1 = ConfigParse.GetMultipleStr(BountyMissionsTypeList.Numerical2);//赏金 |
| | | for (int i = 0; i < strBountyMissionsType.Length; i++) |
| | | { |
| | | BountyMissionsType.Add(strBountyMissionsType[i]); |
| | | BountyMissionsTypeKey.Add(strBountyMissionsType1[i]); |
| | | } |
| | | |
| | | var FairyAuMissionTypeList = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("FairyAuMissionType"); |
| | | int[] strFairyAuMissionType = ConfigParse.GetMultipleStr<int>(FairyAuMissionTypeList.Numerical1);//仙盟 |
| | | string[] strFairyAuMissionType1 = ConfigParse.GetMultipleStr(FairyAuMissionTypeList.Numerical2);//仙盟 |
| | | for (int i = 0; i < strFairyAuMissionType.Length; i++) |
| | | { |
| | | FairyAuMissionType.Add(strFairyAuMissionType[i]); |
| | | FairyAuMissionTypeKey.Add(strFairyAuMissionType1[i]); |
| | | } |
| | | int[] strTranscript = ConfigParse.GetMultipleStr<int>(ConfigManager.Instance.GetTemplate<FuncConfigConfig>("FBTaskColor").Numerical1);//赏金副本 |
| | | for (int i = 0; i < strTranscript.Length; i++) |
| | | { |
| | | TranscriptTask.Add(strTranscript[i]); |
| | | } |
| | | var DemonMissionTypeList1 = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("DemonMissionType"); |
| | | int[] DemonMissionType = ConfigParse.GetMultipleStr<int>(DemonMissionTypeList1.Numerical1);//魔族法宝 |
| | | string[] DemonMissionType1 = ConfigParse.GetMultipleStr(DemonMissionTypeList1.Numerical2);//魔族法宝 |
| | | for (int i = 0; i < DemonMissionType.Length; i++) |
| | | { |
| | | DemonMissionTypeList.Add(DemonMissionType[i]); |
| | | DemonMissionTypeListKey.Add(DemonMissionType1[i]); |
| | | } |
| | | } |
| | | if (FabaoDic.Count == 0) |
| | | { |
| | | FabaoDic = ConfigParse.GetDic<int, int>(ConfigManager.Instance.GetTemplate<FuncConfigConfig>("MozhuTaskID").Numerical1); |
| | | } |
| | | } |
| | | |
| | | |
| | | void OpenPanel(int _taskID)//赏金面板 |
| | | { |
| | | if (taskmodel.BountyDic.ContainsKey(_taskID)) |
| | | { |
| | | int bountyNumber = TaskAllocation.Instance.ForRingNumber(); |
| | | if (bountyNumber == 10 && !WindowCenter.Instance.CheckOpen<TaskWin>()) |
| | | { |
| | | if (coinTaskTip.IsPopup) |
| | | { |
| | | coinTaskTip.IsPopup = false; |
| | | } |
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.BountyInterface); |
| | | } |
| | | } |
| | | if (taskmodel.FairyAuDic.ContainsKey(_taskID)) |
| | | { |
| | | int FairyNumber = TaskAllocation.Instance.FairyAuNumber(); |
| | | if (FairyNumber == 10 && !WindowCenter.Instance.CheckOpen<FairyWearWin>()) |
| | | { |
| | | WindowCenter.Instance.CloseImmediately<MainInterfaceWin>(); |
| | | WindowCenter.Instance.Open<FairyAuTaskWin>(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Sunday, December 24, 2017
|
| | | //--------------------------------------------------------
|
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using UnityEngine.UI;
|
| | | using TableConfig;
|
| | | using System.Collections.Generic;
|
| | | using Snxxz.UI;
|
| | | //关于飞鞋任务
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class FlyingShoesTask : MonoBehaviour
|
| | | {
|
| | | [SerializeField] GameObject m_ImgSelected;//选中条
|
| | | [SerializeField] Button m_DeliveryButton;//传送符按钮
|
| | | [SerializeField] RichText m_TitleText;//标题
|
| | | [SerializeField] RichText m_ContentText;//内容
|
| | | [SerializeField] Button m_FlyingShoesTaskButton;
|
| | | [SerializeField] UIEffect m_Uieffect;
|
| | | [SerializeField] Transform m_parent;
|
| | | [SerializeField] UIEffect m_ProgressEffect;
|
| | |
|
| | | private List<int> MainlineTaskType = new List<int>();//主线类型 |
| | | private List<string> MainlineTaskTypekey = new List<string>();//主线任务类型key
|
| | |
|
| | | private List<int> SideQuestsType = new List<int>();//支线类型
|
| | | private List<string> SideQuestsTypeKey = new List<string>();//支线任务类型Key
|
| | |
|
| | | private List<int> BountyMissionsType = new List<int>();//赏金
|
| | | private List<string> BountyMissionsTypeKey = new List<string>();//赏金任务类型key
|
| | |
|
| | | private List<int> FairyAuMissionType = new List<int>();//仙盟任务
|
| | | private List<string> FairyAuMissionTypeKey = new List<string>();//仙盟任务Key
|
| | |
|
| | | private List<int> TranscriptTask = new List<int>();//赏金副本
|
| | |
|
| | | private List<int> DemonMissionTypeList = new List<int>();//魔族 |
| | | private List<string> DemonMissionTypeListKey = new List<string>();//魔族 |
| | |
|
| | | private Dictionary<int, int> FabaoDic = new Dictionary<int, int>();
|
| | |
|
| | | PlayerTaskDatas m_TaskModel;
|
| | | PlayerTaskDatas taskmodel { get { return m_TaskModel ?? (m_TaskModel = ModelCenter.Instance.GetModel<PlayerTaskDatas>()); } }
|
| | | PlayerPackModel _playerPack;
|
| | | PlayerPackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); } }
|
| | | PlayerMainDate m_MainModel;
|
| | | PlayerMainDate mainModel { get { return m_MainModel ?? (m_MainModel = ModelCenter.Instance.GetModel<PlayerMainDate>()); } }
|
| | | TreasureModel m_treasureModel;
|
| | | TreasureModel treasureModel { get { return m_treasureModel ?? (m_treasureModel = ModelCenter.Instance.GetModel<TreasureModel>()); } }
|
| | | CoinTaskTipModel m_CoinTaskTip;
|
| | | CoinTaskTipModel coinTaskTip { get { return m_CoinTaskTip ?? (m_CoinTaskTip = ModelCenter.Instance.GetModel<CoinTaskTipModel>()); } }
|
| | |
|
| | | private Dictionary<int, int> RunTaskCnt1 = new Dictionary<int, int>();//关于跑环环数的记录1
|
| | | private Dictionary<int, int> RunTaskCnt2 = new Dictionary<int, int>();//关于跑环环数的记录2
|
| | | private bool IsKaJiBool = false;//是否为卡级任务
|
| | | private int Task_ID = 0;//获取任务ID
|
| | |
|
| | | private int progressRef = -1;
|
| | |
|
| | | private void Awake()
|
| | | {
|
| | | m_DeliveryButton.RemoveAllListeners();
|
| | | m_DeliveryButton.AddListener(OnClickDeliveryButton);
|
| | | }
|
| | |
|
| | | private void OnEnable()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | private void Start()
|
| | | {
|
| | | m_FlyingShoesTaskButton.AddListener(OnClickTaskButton);
|
| | | }
|
| | | public GameObject ImgSelected
|
| | | {
|
| | | get { return m_ImgSelected; }
|
| | | set { m_ImgSelected = value; }
|
| | | }
|
| | |
|
| | | public Button DeliveryButton
|
| | | {
|
| | | get { return m_DeliveryButton; }
|
| | | set { m_DeliveryButton = value; }
|
| | | }
|
| | |
|
| | | public RichText TitleText
|
| | | {
|
| | | get { return m_TitleText; }
|
| | | set { m_TitleText = value; }
|
| | | }
|
| | | public RichText ContentText
|
| | | {
|
| | | get { return m_ContentText; }
|
| | | set { m_ContentText = value; }
|
| | | }
|
| | |
|
| | | public UIEffect UIEffect
|
| | | {
|
| | | get { return m_Uieffect; }
|
| | | set { m_Uieffect = value; }
|
| | |
|
| | | }
|
| | | public Button FlyingShoesTaskButton1
|
| | | {
|
| | | get { return m_FlyingShoesTaskButton; }
|
| | | set { m_FlyingShoesTaskButton = value; }
|
| | | }
|
| | |
|
| | | private void OnClickTaskButton()
|
| | | {
|
| | | mainModel.IsSelfMotionTask = false;
|
| | | for (int i = 0; i < m_parent.childCount; i++)
|
| | | {
|
| | | m_parent.GetChild(i).GetComponent<FlyingShoesTask>().ImgSelected.SetActive(false);
|
| | | }
|
| | | m_ImgSelected.SetActive(true);
|
| | |
|
| | | taskmodel.GetNowTaskID = Task_ID;
|
| | | switch ((int)taskmodel.GetTaskStatus(Task_ID))
|
| | | {
|
| | | case -5:
|
| | | case 0:
|
| | | DropItemManager.StopMissionPickup = true;//主动停止拾取物品
|
| | | if (PlayerDatas.Instance.extersion.bossState == 1)
|
| | | {
|
| | | string strNpc = string.Empty;
|
| | | strNpc = ContentText.GetHrefMessage("movenpc");
|
| | | int npcId = 0;
|
| | | int mapID = PlayerDatas.Instance.baseData.MapID;
|
| | | if (int.TryParse(strNpc, out npcId))
|
| | | {
|
| | | var npcConfig = ConfigManager.Instance.GetAllValues<mapnpcConfig>();
|
| | | foreach (var value in npcConfig)
|
| | | {
|
| | | if (value.NPCID == npcId && value.MapID != mapID)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("Task_Transfer1");
|
| | | return;
|
| | | }
|
| | | }
|
| | | var MonsterConfig = ConfigManager.Instance.GetTemplate<MonsterRefreshPointConfig>(npcId);
|
| | | if (MonsterConfig != null && MonsterConfig.MapId != mapID)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("Task_Transfer1");
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | | ContentText.ExcuteHref();
|
| | | OpenPanel(Task_ID);
|
| | | break;
|
| | | case 1:
|
| | |
|
| | | if (FabaoDic.ContainsKey(Task_ID))
|
| | | {
|
| | | var _treasureId = FabaoDic[Task_ID];
|
| | | var treasureConfig = ConfigManager.Instance.GetTemplate<TreasureConfig>(_treasureId);
|
| | | treasureModel.currentCategory = (TreasureCategory)treasureConfig.Category;
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | var _unlockTreasure = treasureModel.GetTreasureUnlockShow(treasureModel.currentCategory);
|
| | | if (_unlockTreasure != 0)
|
| | | {
|
| | | treasureModel.treasureGotoId = _unlockTreasure;
|
| | | WindowCenter.Instance.Open<TreasureSelectWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | treasureModel.selectedTreasure = _treasureId;
|
| | | treasureModel.openFromTaskId = Task_ID;
|
| | | WindowCenter.Instance.Open<TreasureLevelUpWin>();
|
| | | }
|
| | | return;
|
| | | }
|
| | |
|
| | | var tasklistconfig = ConfigManager.Instance.GetTemplate<TaskListConfig>(Task_ID);
|
| | | if (tasklistconfig != null)
|
| | | {
|
| | | var _treasureId = tasklistconfig.FabaoID;
|
| | | var treasureConfig = ConfigManager.Instance.GetTemplate<TreasureConfig>(_treasureId);
|
| | | treasureModel.currentCategory = (TreasureCategory)treasureConfig.Category;
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | var _unlockTreasure = treasureModel.GetTreasureUnlockShow(treasureModel.currentCategory);
|
| | | if (_unlockTreasure != 0)
|
| | | {
|
| | | treasureModel.treasureGotoId = _unlockTreasure;
|
| | | WindowCenter.Instance.Open<TreasureSelectWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | treasureModel.selectedTreasure = _treasureId;
|
| | | treasureModel.openFromTaskId = Task_ID;
|
| | | WindowCenter.Instance.Open<TreasureLevelUpWin>();
|
| | | }
|
| | | }
|
| | | break;
|
| | | case 2:
|
| | | WindowCenter.Instance.Open<HoistingWin>();
|
| | | break;
|
| | | case 3:
|
| | | taskmodel.CompletionOfTask(Task_ID);
|
| | | break;
|
| | | default:
|
| | | break;
|
| | |
|
| | | }
|
| | | }
|
| | | private void OnClickDeliveryButton()//传送符
|
| | | {
|
| | | mainModel.FlyShoseTaskID = Task_ID;
|
| | | string _FlyID = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("TransportPay").Numerical1;
|
| | | int itemNumber = playerPack.GetItemCountByID(PackType.rptItem, int.Parse(_FlyID));//获取飞鞋的数量
|
| | | mainModel.IsSelfMotionTask = false;
|
| | | if (ModelCenter.Instance.GetModel<VipModel>().GetVipPrivilegeCnt(VipPrivilegeType.FreeTransfer) > 0)
|
| | | {
|
| | | m_ContentText.ExcuteHref(1);
|
| | | return;
|
| | | }
|
| | | if (itemNumber > 0)
|
| | | {
|
| | | m_ContentText.ExcuteHref(1);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (mainModel.IsFlyShoseBool)
|
| | | {
|
| | | int NeedMoney = (int)UIHelper.GetMoneyCnt(1) + (int)UIHelper.GetMoneyCnt(2);
|
| | | if (NeedMoney >= 1)
|
| | | {
|
| | | m_ContentText.ExcuteHref(1);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | FlyShoseConfirmwin.useEnvironment = FlyShoseConfirmwin.UseEnvironment.Task;
|
| | | WindowCenter.Instance.Open<FlyShoseConfirmwin>();
|
| | | }
|
| | |
|
| | | //SysNotifyMgr.Instance.ShowTip("Z_NoFlyItem");
|
| | | }
|
| | |
|
| | | }
|
| | | public void FlyingShoes_Task(int TaskID)
|
| | | {
|
| | | Task_ID = TaskID;
|
| | | TypeAssignment();
|
| | | if (TaskID == taskmodel.GetNowTaskID)
|
| | | {
|
| | | m_ImgSelected.SetActive(true);
|
| | | for (int i = 0; i < m_parent.childCount; i++)
|
| | | {
|
| | | int taskID1 = m_parent.GetChild(i).GetComponent<TaskType>().TaskID;
|
| | | if (TaskID != taskID1)
|
| | | {
|
| | | m_parent.GetChild(i).GetComponent<FlyingShoesTask>().ImgSelected.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | m_DeliveryButton.gameObject.SetActive(true);
|
| | | if (!taskmodel.allMissionDict.ContainsKey(TaskID))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if ((int)taskmodel.GetTaskStatus(TaskID) > 0)
|
| | | {
|
| | | m_DeliveryButton.gameObject.SetActive(false);
|
| | | IsKaJiBool = true;
|
| | | }
|
| | | else
|
| | | {
|
| | | IsKaJiBool = false;
|
| | | }
|
| | |
|
| | | if (taskmodel.allMissionDict[TaskID].MissionState == 2)
|
| | | {
|
| | | m_TitleText.text = "<color=#109d06>" + TaskTitle(TaskID) + "</color>";
|
| | | }
|
| | | else
|
| | | {
|
| | | m_TitleText.text = "<color=#feed28>" + TaskTitle(TaskID) + "</color>";
|
| | | }
|
| | | if (TranscriptTask.Contains(TaskID))
|
| | | {
|
| | | m_TitleText.text = "<color=#ec4bf6>" + TaskTitle(TaskID) + "</color>";
|
| | | }
|
| | | string str = taskmodel.allMissionDict[TaskID].InforList;
|
| | | var taskinfo = ConfigManager.Instance.GetTemplate<TASKINFOConfig>(str);
|
| | | if (taskinfo != null)
|
| | | {
|
| | | m_ContentText.text = taskinfo.show_writing;
|
| | | }
|
| | | else
|
| | | {
|
| | | DebugEx.LogError("任务表格PyTaskInfo配置缺失");
|
| | | return;
|
| | | }
|
| | |
|
| | | bool isOPenTransferButton = HrefAnalysis.Inst.ContainsKey(taskinfo.show_writing, "flynpc");
|
| | | if (isOPenTransferButton && !IsKaJiBool)
|
| | | {
|
| | | m_DeliveryButton.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_DeliveryButton.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | m_ContentText.raycastTarget = false;
|
| | |
|
| | | if (taskmodel._DicTaskInformation.ContainsKey(TaskID))
|
| | | {
|
| | | Dictionary<string, string> SkillDic = new Dictionary<string, string>();
|
| | | SkillDic = taskmodel._DicTaskInformation[TaskID];
|
| | | string strA = "on_kill_" + TaskID.ToString();
|
| | | string strB = "get_byid_" + TaskID.ToString();
|
| | | if (SkillDic.ContainsKey(strA))
|
| | | {
|
| | | var progress = 0;
|
| | | int.TryParse(SkillDic[strA], out progress);
|
| | | if (progressRef != -1 && progress != 0 && progressRef != progress)
|
| | | {
|
| | | m_ProgressEffect.Play();
|
| | | }
|
| | |
|
| | | progressRef = progress;
|
| | | m_ContentText.SetReplaceInfo(SkillDic);
|
| | | }
|
| | | else if (SkillDic.ContainsKey(strB))
|
| | | {
|
| | | var progress = 0;
|
| | | int.TryParse(SkillDic[strB], out progress);
|
| | | if (progressRef != -1 && progress != 0 && progressRef != progress)
|
| | | {
|
| | | m_ProgressEffect.Play();
|
| | | }
|
| | |
|
| | | progressRef = progress;
|
| | | m_ContentText.SetReplaceInfo(SkillDic);
|
| | | }
|
| | | }
|
| | |
|
| | | if (taskmodel.BountyDic.ContainsKey(TaskID) || taskmodel.FairyAuDic.ContainsKey(TaskID))
|
| | | {
|
| | | var config = ConfigManager.Instance.GetTemplate<TASKINFOConfig>(str);
|
| | | if (config != null)
|
| | | {
|
| | | var progress = 0;
|
| | | if (taskmodel.ReplaceDic.ContainsKey(TaskID) && taskmodel.ReplaceDic[TaskID].ContainsKey("kill_npc_id_cur_count"))
|
| | | {
|
| | | progress = taskmodel.ReplaceDic[TaskID]["kill_npc_id_cur_count"];
|
| | | if (progressRef != -1 && progress != 0 && progressRef != progress)
|
| | | {
|
| | | m_ProgressEffect.Play();
|
| | | }
|
| | |
|
| | | progressRef = progress;
|
| | | }
|
| | |
|
| | | string strRichA = TaskAllocation.Instance.GetTaskInfo(config.show_writing, TaskID);
|
| | | m_ContentText.text = strRichA;
|
| | | }
|
| | | else
|
| | | {
|
| | | DebugEx.LogError("任务表格PyTaskInfo配置缺失");
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | private string TaskTitle(int taskID)
|
| | | {
|
| | | var config = ConfigManager.Instance.GetTemplate<TASKINFOConfig>(taskmodel.allMissionDict[taskID].Name);
|
| | | if (config == null)
|
| | | {
|
| | | DebugEx.LogError("任务表格PyTaskInfo配置缺失");
|
| | | return null;
|
| | | }
|
| | | string taskName = config.show_writing;
|
| | |
|
| | | if (taskmodel.allMissionDict[taskID].Type == 15)
|
| | | {
|
| | | string str = string.Format(Language.Get("Z1800"), taskName);
|
| | | return str;
|
| | | }
|
| | | else if (MainlineTaskType.Contains(taskmodel.allMissionDict[taskID].Type))
|
| | | {
|
| | | int Index = MainlineTaskType.IndexOf(taskmodel.allMissionDict[taskID].Type);
|
| | | string str = string.Format(Language.Get(MainlineTaskTypekey[Index]), taskName);
|
| | | return str;
|
| | | }
|
| | | else if (taskmodel.allMissionDict[taskID].Type == 3)
|
| | | {
|
| | | string str = string.Format(Language.Get("Demon_Text"), taskName);
|
| | | return str;
|
| | | }
|
| | | else if (SideQuestsType.Contains(taskmodel.allMissionDict[taskID].Type))
|
| | | {
|
| | | int Index = SideQuestsType.IndexOf(taskmodel.allMissionDict[taskID].Type);
|
| | | string str = string.Format(Language.Get(SideQuestsTypeKey[Index]), taskName);
|
| | | return str;
|
| | | }
|
| | | else if (BountyMissionsType.Contains(taskmodel.allMissionDict[taskID].Type))
|
| | | {
|
| | | int Index = BountyMissionsType.IndexOf(taskmodel.allMissionDict[taskID].Type);
|
| | | int cylinderNumber = TaskAllocation.Instance.ForRingNumber() + 1;
|
| | | string str = string.Empty;
|
| | | if (cylinderNumber > RunTaskCnt2[7])
|
| | | {
|
| | | str = string.Format(Language.Get(BountyMissionsTypeKey[Index]), taskName);
|
| | | }
|
| | | else
|
| | | {
|
| | | str = string.Format(Language.Get(BountyMissionsTypeKey[Index]), taskName) + cylinderNumber + "/" + RunTaskCnt2[7];
|
| | | }
|
| | |
|
| | | return str;
|
| | | }
|
| | | else if (FairyAuMissionType.Contains(taskmodel.allMissionDict[taskID].Type))
|
| | | {
|
| | | int Index = FairyAuMissionType.IndexOf(taskmodel.allMissionDict[taskID].Type);
|
| | | int cylinderNumber = TaskAllocation.Instance.FairyAuNumber() + 1;
|
| | | string str = string.Empty;
|
| | | if (cylinderNumber > RunTaskCnt2[12])
|
| | | {
|
| | | str = string.Format(Language.Get(FairyAuMissionTypeKey[Index]), taskName);
|
| | | }
|
| | | else
|
| | | {
|
| | | str = string.Format(Language.Get(FairyAuMissionTypeKey[Index]), taskName) + cylinderNumber + "/" + RunTaskCnt2[12];
|
| | | }
|
| | |
|
| | | return str;
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | void TypeAssignment()
|
| | | {
|
| | | if (MainlineTaskType.Count == 0)
|
| | | {
|
| | | var RunTaskCntStr = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("RunTaskCnt");
|
| | | RunTaskCnt1 = ConfigParse.GetDic<int, int>(RunTaskCntStr.Numerical1);
|
| | | RunTaskCnt2 = ConfigParse.GetDic<int, int>(RunTaskCntStr.Numerical2);
|
| | |
|
| | | var MainlineTaskTypeList = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("MainlineTaskType");
|
| | | int[] strMainlineTaskType = ConfigParse.GetMultipleStr<int>(MainlineTaskTypeList.Numerical1);//主线 |
| | | string[] strMainlineTaskType1 = ConfigParse.GetMultipleStr(MainlineTaskTypeList.Numerical2);//主线 |
| | | for (int i = 0; i < strMainlineTaskType.Length; i++)
|
| | | {
|
| | | MainlineTaskType.Add(strMainlineTaskType[i]);
|
| | | MainlineTaskTypekey.Add(strMainlineTaskType1[i]);
|
| | | }
|
| | |
|
| | | var SideQuestsTypeList = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("SideQuestsType");
|
| | | int[] strSideQuestsType = ConfigParse.GetMultipleStr<int>(SideQuestsTypeList.Numerical1);//支线 |
| | | string[] strSideQuestsType1 = ConfigParse.GetMultipleStr(SideQuestsTypeList.Numerical2);//支线 |
| | | for (int i = 0; i < strSideQuestsType.Length; i++)
|
| | | {
|
| | | SideQuestsType.Add(strSideQuestsType[i]);
|
| | | SideQuestsTypeKey.Add(strSideQuestsType1[i]);
|
| | | }
|
| | |
|
| | | var BountyMissionsTypeList = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("BountyMissionsType");
|
| | | int[] strBountyMissionsType = ConfigParse.GetMultipleStr<int>(BountyMissionsTypeList.Numerical1);//赏金 |
| | | string[] strBountyMissionsType1 = ConfigParse.GetMultipleStr(BountyMissionsTypeList.Numerical2);//赏金 |
| | | for (int i = 0; i < strBountyMissionsType.Length; i++)
|
| | | {
|
| | | BountyMissionsType.Add(strBountyMissionsType[i]);
|
| | | BountyMissionsTypeKey.Add(strBountyMissionsType1[i]);
|
| | | }
|
| | |
|
| | | var FairyAuMissionTypeList = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("FairyAuMissionType");
|
| | | int[] strFairyAuMissionType = ConfigParse.GetMultipleStr<int>(FairyAuMissionTypeList.Numerical1);//仙盟
|
| | | string[] strFairyAuMissionType1 = ConfigParse.GetMultipleStr(FairyAuMissionTypeList.Numerical2);//仙盟
|
| | | for (int i = 0; i < strFairyAuMissionType.Length; i++)
|
| | | {
|
| | | FairyAuMissionType.Add(strFairyAuMissionType[i]);
|
| | | FairyAuMissionTypeKey.Add(strFairyAuMissionType1[i]);
|
| | | }
|
| | | int[] strTranscript = ConfigParse.GetMultipleStr<int>(ConfigManager.Instance.GetTemplate<FuncConfigConfig>("FBTaskColor").Numerical1);//赏金副本
|
| | | for (int i = 0; i < strTranscript.Length; i++)
|
| | | {
|
| | | TranscriptTask.Add(strTranscript[i]);
|
| | | }
|
| | | var DemonMissionTypeList1 = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("DemonMissionType");
|
| | | int[] DemonMissionType = ConfigParse.GetMultipleStr<int>(DemonMissionTypeList1.Numerical1);//魔族法宝
|
| | | string[] DemonMissionType1 = ConfigParse.GetMultipleStr(DemonMissionTypeList1.Numerical2);//魔族法宝
|
| | | for (int i = 0; i < DemonMissionType.Length; i++)
|
| | | {
|
| | | DemonMissionTypeList.Add(DemonMissionType[i]);
|
| | | DemonMissionTypeListKey.Add(DemonMissionType1[i]);
|
| | | }
|
| | | }
|
| | | if (FabaoDic.Count == 0)
|
| | | {
|
| | | FabaoDic = ConfigParse.GetDic<int, int>(ConfigManager.Instance.GetTemplate<FuncConfigConfig>("MozhuTaskID").Numerical1);
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | void OpenPanel(int _taskID)//赏金面板
|
| | | {
|
| | | if (taskmodel.BountyDic.ContainsKey(_taskID))
|
| | | {
|
| | | int bountyNumber = TaskAllocation.Instance.ForRingNumber();
|
| | | if (bountyNumber == 10 && !WindowCenter.Instance.CheckOpen<TaskWin>())
|
| | | {
|
| | | if (coinTaskTip.IsPopup)
|
| | | {
|
| | | coinTaskTip.IsPopup = false;
|
| | | }
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.BountyInterface);
|
| | | }
|
| | | }
|
| | | if (taskmodel.FairyAuDic.ContainsKey(_taskID))
|
| | | {
|
| | | int FairyNumber = TaskAllocation.Instance.FairyAuNumber();
|
| | | if (FairyNumber == 10 && !WindowCenter.Instance.CheckOpen<FairyWearWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<FairyAuTaskWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|