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/PlayerTaskDatas.cs | 74 +++++++++++++++++++++++++------------
1 files changed, 50 insertions(+), 24 deletions(-)
diff --git a/System/MainInterfacePanel/PlayerTaskDatas.cs b/System/MainInterfacePanel/PlayerTaskDatas.cs
index 112033a..8a82286 100644
--- a/System/MainInterfacePanel/PlayerTaskDatas.cs
+++ b/System/MainInterfacePanel/PlayerTaskDatas.cs
@@ -121,7 +121,7 @@
public int currentMission { get; private set; }
public int currentMissionState { get; private set; }
- public int GetNowTaskID { get; set; }
+ public int GetNowTaskID { get; set; }//鑾峰彇褰撳墠閫変腑鏉$殑浠诲姟ID
private bool AutomaticityBool = false;//鎺у埗鏄惁鑷姩杩涜鑷姩浠诲姟
private int retainTaskID = 0;
@@ -183,8 +183,12 @@
public void OnPlayerLoginOk()
{
+ GlobalTimeEvent.Instance.secondEvent -= secondEvent;
+ GlobalTimeEvent.Instance.secondEvent += secondEvent;
AutomaticityBool = true;
}
+
+
private void onStageLoadFinish()//鍦板浘鍒囨崲鏃惰皟鐢�
{
@@ -848,9 +852,14 @@
{
if (MainTaskDic.ContainsKey(_MissionId) && MainCardLevelChange != null && _DictValue == 0)
{
+
+ if (IsGetOnBool)
+ {
+ GetNowTaskID = _MissionId;
+ }
MainCardLevelChange(_MissionId);
+
}
-
}
}
else
@@ -864,9 +873,16 @@
{
CardLevelChange(_MissionId);
}
- if (MainTaskDic.ContainsKey(_MissionId) && MainCardLevelChange != null)
- {
- MainCardLevelChange(_MissionId);
+ if (MainTaskDic.ContainsKey(_MissionId))
+ {
+ if (IsGetOnBool)
+ {
+ GetNowTaskID = _MissionId;
+ }
+ if (MainCardLevelChange != null)
+ {
+ MainCardLevelChange(_MissionId);
+ }
}
}
}
@@ -986,15 +1002,6 @@
}
}
}
-
- //if (_NpcID == allMissionDict[key].LightList.NpcId)
- //{
- // if (allMissionDict[key].LightList.StateLight > Light)
- // {
- // Light = allMissionDict[key].LightList.StateLight;
- // }
-
- //}
}
return Light;
@@ -1013,7 +1020,6 @@
return;
}
}
-
}
if (FairyAuDic.Count != 0)
{
@@ -1027,8 +1033,6 @@
}
}
}
-
-
}
public void DailyBountyMove()//鏃ュ父璧忛噾浠诲姟
{
@@ -1043,7 +1047,6 @@
return;
}
}
-
}
if (BountyDic.Count != 0)
{
@@ -1057,7 +1060,6 @@
}
}
}
-
}
@@ -1080,7 +1082,6 @@
}
}
}
-
}
private int Autotasking(int taskID)
@@ -1144,7 +1145,6 @@
return;
}
}
-
}
else if (FairyAuDic.ContainsKey(_taskID))//浠欑洘浠诲姟
{
@@ -1248,7 +1248,6 @@
{
break;
}
-
if (MapTransferUtility.Instance.MapTransferDoType != MapTransferUtility.E_MapTransferDoType.None)
{
break;
@@ -1371,7 +1370,6 @@
GA_NpcFunc.SetNpcFuncVisible(Npcid, true);
}
}
-
}
}
@@ -1493,7 +1491,6 @@
{
return -1;
}
-
}
public int GetQuestState(int _taskId)
@@ -1507,5 +1504,34 @@
return -1;
}
}
+ //--------涓昏鐢ㄤ簬璁板綍浠诲姟鍒楄〃閫変腑鏉$殑鏅鸿兘鎬� 锛�-_-||锛�
+ public int GetOnTaskId = 0;
+ public bool IsGetOnBool = false;
+ private int NeedTime = 10;
+ private DateTime dateTimeA;
+ public void GetTaskGetOnNow(int TaskID, string DictKey)//璁板綍涓嬩俊鎭瓧鍏哥殑ID
+ {
+ string key1Str = "on_kill_" + TaskID;
+ string key2Str = "get_byid_" + TaskID;
+ if (TaskID > 1 && (key1Str== DictKey || key2Str== DictKey))
+ {
+ GetOnTaskId = TaskID;
+ dateTimeA =DateTime.Now;
+ }
+ }
+ private void secondEvent()
+ {
+ TimeSpan timeS =DateTime.Now- dateTimeA;
+ int timeSend = timeS.Seconds;
+ if (timeSend >= NeedTime)
+ {
+ IsGetOnBool = true;
+ GetOnTaskId = GetNowTaskID;//鑾峰彇褰撳墠閫変腑鐨処D
+ }
+ else
+ {
+ IsGetOnBool = false;
+ }
+ }
}
--
Gitblit v1.8.0