|
@@ -4,6 +4,7 @@ using System;
|
|
|
using System.Collections.Generic;
|
|
|
using UI.ActivityAfternoonTea;
|
|
|
using UI.Task;
|
|
|
+using Assets.Game.HotUpdate.Data;
|
|
|
using ET;
|
|
|
|
|
|
namespace GFGGame
|
|
@@ -106,7 +107,7 @@ namespace GFGGame
|
|
|
}
|
|
|
private async void OnClickRewardTIps()
|
|
|
{
|
|
|
- if (MiniGameDateManager.Instance.NpcInfoList[npcId].RewrdStatus == 1)
|
|
|
+ if (ActivityTeaDataManager.Instance.NpcInfoList[npcId].RewrdStatus == 1)
|
|
|
{
|
|
|
bool result = await ActivityTeaSProxy.ReqGetNPCVisitReward(activityId, npcId + 1);
|
|
|
if (!result) return;
|
|
@@ -122,7 +123,7 @@ namespace GFGGame
|
|
|
|
|
|
private void GetRewardState()
|
|
|
{
|
|
|
- foreach (NpcVisitProto t in MiniGameDateManager.Instance.NpcInfoList)
|
|
|
+ foreach (NpcVisitProto t in ActivityTeaDataManager.Instance.NpcInfoList)
|
|
|
{
|
|
|
if (t.NpcId == npcId + 1)
|
|
|
{
|
|
@@ -136,7 +137,7 @@ namespace GFGGame
|
|
|
case 1:
|
|
|
canGetReward = true;
|
|
|
_ui.m_gotReward.visible = false;
|
|
|
- RedDotController.Instance.SetComRedDot(_ui.m_taskIcon.target, MiniGameDateManager.Instance.NpcInfoList[npcId].RewrdStatus == 1);
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_taskIcon.target, ActivityTeaDataManager.Instance.NpcInfoList[npcId].RewrdStatus == 1);
|
|
|
break;
|
|
|
case 2:
|
|
|
canGetReward = false;
|
|
@@ -167,17 +168,17 @@ namespace GFGGame
|
|
|
item.m_txtDesc.text = TaskDataManager.Instance.GetTaskDesc(taskCfg.id);
|
|
|
item.m_txtCount.text =
|
|
|
$"{TaskDataManager.Instance.GetTaskProgressById(taskCfg.id)}/{taskCfg.GetTargetCount()}";
|
|
|
- if (item.m_GetRewardBt.data == null)
|
|
|
+ if (item.m_GetRewardBt.target.data == null)
|
|
|
{
|
|
|
- item.m_GetRewardBt.onClick.Add(OnBtnGetClick);
|
|
|
+ item.m_GetRewardBt.target.onClick.Add(OnBtnGetClick);
|
|
|
}
|
|
|
- item.m_GetRewardBt.data = taskCfg.id;
|
|
|
+ item.m_GetRewardBt.target.data = taskCfg.id;
|
|
|
|
|
|
- if (item.m_ComeBt.data == null)
|
|
|
+ if (item.m_ComeBt.target.data == null)
|
|
|
{
|
|
|
- item.m_ComeBt.onClick.Add(OnBtnGoClick);
|
|
|
+ item.m_ComeBt.target.onClick.Add(OnBtnGoClick);
|
|
|
}
|
|
|
- item.m_ComeBt.data = taskCfg;
|
|
|
+ item.m_ComeBt.target.data = taskCfg;
|
|
|
|
|
|
if (item.m_listTaskReward.data == null)
|
|
|
{
|
|
@@ -197,7 +198,7 @@ namespace GFGGame
|
|
|
if (!result) return;
|
|
|
bool res = await ActivityTeaSProxy.ReqGetNPCVisitInfo(activityId);
|
|
|
if (!res) return;
|
|
|
- RedDotController.Instance.SetComRedDot(_ui.m_taskIcon.target, MiniGameDateManager.Instance.NpcInfoList[npcId].RewrdStatus == 1);
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_taskIcon.target, ActivityTeaDataManager.Instance.NpcInfoList[npcId].RewrdStatus == 1);
|
|
|
_ui.m_taskList.numItems = ActivityVisitCfgArray.Instance.dataArray[npcId].taskIdArr.Length;
|
|
|
}
|
|
|
private void OnBtnGoClick(EventContext context)
|