From 0b6453d6bd3620eae8086da4c828e3b7cbc7c52d Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期二, 04 九月 2018 16:15:00 +0800
Subject: [PATCH] 3240 前端 主界面任务显示和自动选中逻辑修改
---
System/MainInterfacePanel/TaskListTip.cs | 47 +++++++++++++++++++----------------------------
1 files changed, 19 insertions(+), 28 deletions(-)
diff --git a/System/MainInterfacePanel/TaskListTip.cs b/System/MainInterfacePanel/TaskListTip.cs
index 37be57d..079668c 100644
--- a/System/MainInterfacePanel/TaskListTip.cs
+++ b/System/MainInterfacePanel/TaskListTip.cs
@@ -198,31 +198,9 @@
private void MainCardLevelChange(int _id)
{
- TaskScheduling();
- bool IsDefault = true;
- var State = taskmodel.GetTaskStatus(_id);
- if (State == PlayerTaskDatas.TaskStatus.CardLevel)
- {
- IsDefault = false;
- }
- if (IsDefault)
- {
- foreach (var key in taskmodel.MainTaskDic.Keys)
- {
- if (taskmodel.MainTaskDic[key].MissionState != 3)
- {
- taskmodel.GetNowTaskID = key;
- }
- }
- }
- else
- {
- if (_list.Count > 0)
- {
- taskmodel.GetNowTaskID = _list[0];
- }
- }
+ TaskScheduling();
TheTaskToGenerate();
+ TaskJump(_id);
}
private void SetLength()
@@ -350,11 +328,13 @@
void OnTaskToDelete(int _IdTask)//浠诲姟鐨勫垹闄�
{
var inDungeon = IsDungeon();
+ TaskScheduling();
if (WindowCenter.Instance.CheckOpen<MainInterfaceWin>() && !inDungeon)
{
- LodingDelTask(_IdTask);
+ TheTaskToGenerate();//浠诲姟鍒楄〃闇�瑕侀噸鏂版帓鍒楅噸鏂板埛鏂拌祴鍊�
+ // LodingDelTask(_IdTask);
}
- TaskScheduling();
+
}
@@ -442,9 +422,20 @@
return mapConfig != null && mapConfig.MapFBType != 0;
}
- private void TaskJump()
+ private void TaskJump(int TaskID=0)
{
- int type = _list.IndexOf(taskmodel.GetNowTaskID);
+ int type = 0;
+ if (TaskID == 0)
+ {
+ type= _list.IndexOf(taskmodel.GetNowTaskID);
+ }
+ else
+ {
+ if (_list.Contains(TaskID))
+ {
+ type = _list.IndexOf(TaskID);
+ }
+ }
if (_list.Count <= 2 || type <= 0)
{
m_ScrollRect.verticalNormalizedPosition = 1;
--
Gitblit v1.8.0