|
@@ -11,7 +11,7 @@ namespace GFGGame
|
|
|
{
|
|
|
private UI_CombTaskUI _ui;
|
|
|
private List<TaskCfg> _cfgs;
|
|
|
- private int taskType = TaskType.Daily;
|
|
|
+ private int funcType = TaskType.Daily;
|
|
|
|
|
|
public override void Dispose()
|
|
|
{
|
|
@@ -75,7 +75,7 @@ namespace GFGGame
|
|
|
{
|
|
|
var taskIds = (List<int>)eventContext.data;
|
|
|
if (taskIds.Select(taskId => TaskCfgArray.Instance.GetCfg(taskId)).Where(taskCfg => taskCfg != null)
|
|
|
- .Any(taskCfg => taskCfg.taskType == taskType))
|
|
|
+ .Any(taskCfg => taskCfg.funcType == funcType))
|
|
|
{
|
|
|
UpdateTask();
|
|
|
}
|
|
@@ -86,14 +86,14 @@ namespace GFGGame
|
|
|
var taskId = (int)eventContext.data;
|
|
|
var taskCfg = TaskCfgArray.Instance.GetCfg(taskId);
|
|
|
if (taskCfg == null) return;
|
|
|
- if (taskCfg.taskType != taskType) return;
|
|
|
+ if (taskCfg.funcType != funcType) return;
|
|
|
UpdateTask();
|
|
|
}
|
|
|
|
|
|
//切换任务类型
|
|
|
private void OnCtrlChange()
|
|
|
{
|
|
|
- taskType = _ui.m_c1.selectedIndex switch
|
|
|
+ funcType = _ui.m_c1.selectedIndex switch
|
|
|
{
|
|
|
0 =>
|
|
|
//每日任务
|
|
@@ -101,7 +101,7 @@ namespace GFGGame
|
|
|
1 =>
|
|
|
//织造任务
|
|
|
TaskType.BattlePass,
|
|
|
- _ => taskType
|
|
|
+ _ => funcType
|
|
|
};
|
|
|
//更新任务列表
|
|
|
UpdateTask();
|
|
@@ -149,7 +149,7 @@ namespace GFGGame
|
|
|
//更新任务列表
|
|
|
private void UpdateTask()
|
|
|
{
|
|
|
- _cfgs = TaskDataManager.Instance.GetTaskCfgs(taskType);
|
|
|
+ _cfgs = TaskDataManager.Instance.GetTaskCfgs(funcType);
|
|
|
_ui.m_TaskList.numItems = _cfgs.Count;
|
|
|
RedDotController.Instance.SetComRedDot(_ui.m_btnDailyTask,
|
|
|
TaskDataManager.Instance.CheckTaskRewardCanGet(TaskType.Daily));
|
|
@@ -184,7 +184,7 @@ namespace GFGGame
|
|
|
item.m_listTaskReward.data = reward;
|
|
|
item.m_listTaskReward.numItems = reward.Length;
|
|
|
var isBuy = BattlePassTaskDataManager.Instance.GetIsBuy();
|
|
|
- bool canGet = item.m_c1.selectedIndex == 1 && (taskType != TaskType.BattlePass || taskType == TaskType.BattlePass && isBuy);
|
|
|
+ bool canGet = item.m_c1.selectedIndex == 1 && (funcType != TaskType.BattlePass || funcType == TaskType.BattlePass && isBuy);
|
|
|
RedDotController.Instance.SetComRedDot(item.m_GetRewardBt, canGet);
|
|
|
UI_TaskListItem.ProxyEnd();
|
|
|
}
|
|
@@ -203,7 +203,7 @@ namespace GFGGame
|
|
|
private async void OnBtnGetClick(EventContext context)
|
|
|
{
|
|
|
if (!(context.sender is GObject btnGet)) return;
|
|
|
- if (taskType == TaskType.BattlePass)
|
|
|
+ if (funcType == TaskType.BattlePass)
|
|
|
{
|
|
|
//检查通行证是否开启
|
|
|
var isBuy = BattlePassTaskDataManager.Instance.GetIsBuy();
|
|
@@ -237,7 +237,7 @@ namespace GFGGame
|
|
|
private async void OnBtnGetAllClick()
|
|
|
{
|
|
|
//通用任务一键领奖
|
|
|
- if (taskType == TaskType.BattlePass)
|
|
|
+ if (funcType == TaskType.BattlePass)
|
|
|
{
|
|
|
//检查通行证是否开启
|
|
|
var isBuy = BattlePassTaskDataManager.Instance.GetIsBuy();
|
|
@@ -247,7 +247,7 @@ namespace GFGGame
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- var result = await TaskSProxy.GetAllTaskBonus(taskType);
|
|
|
+ var result = await TaskSProxy.GetAllTaskBonus(funcType);
|
|
|
if (!result) return;
|
|
|
UpdateLivenessProcess();
|
|
|
UpdateTask();
|