|
@@ -206,41 +206,49 @@ namespace GFGGame
|
|
|
{
|
|
|
int normal = CimbingTowerCfgArray.Instance.dataArray[0].ClearanceLimit;
|
|
|
int vip = CimbingTowerCfgArray.Instance.dataArray[0].VipClearanceLimit;
|
|
|
- if (RoleDataManager.CheckIsMonthCardOpenByType(1) || RoleDataManager.CheckIsMonthCardOpenByType(1))
|
|
|
+ int canPassCount = 0;
|
|
|
+ int isPassCount = 0;
|
|
|
+ foreach (var item in FieldWorkDataManager.Instance.CimbingTowerLevelInfoList)
|
|
|
{
|
|
|
- int isPassCount = 0;
|
|
|
- foreach (var item in FieldWorkDataManager.Instance.CimbingTowerLevelInfoList)
|
|
|
- {
|
|
|
- if (item.Value.IsPass)
|
|
|
- {
|
|
|
- isPassCount++;
|
|
|
- }
|
|
|
- }
|
|
|
- if (isPassCount >= FieldWorkDataManager.Instance.MaxLevelId)
|
|
|
+ if (item.Value.IsPass)
|
|
|
{
|
|
|
- PromptController.Instance.ShowFloatTextPrompt("通关数量已超过最大可通关数量!");
|
|
|
- return;
|
|
|
+ isPassCount++;
|
|
|
}
|
|
|
}
|
|
|
+ if (RoleDataManager.CheckIsMonthCardOpenByType(1) || RoleDataManager.CheckIsMonthCardOpenByType(1))
|
|
|
+ {
|
|
|
+ canPassCount = vip;
|
|
|
+ }
|
|
|
else
|
|
|
{
|
|
|
- if(FieldWorkDataManager.Instance.MaxLevelId != 0)
|
|
|
+ canPassCount = normal;
|
|
|
+ }
|
|
|
+ if (isPassCount > canPassCount)
|
|
|
+ {
|
|
|
+ PromptController.Instance.ShowFloatTextPrompt("通关数量已超过最大可通关数量!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else if((isPassCount >= FieldWorkDataManager.Instance.MaxLevelId && FieldWorkDataManager.Instance.MaxLevelId < canPassCount))
|
|
|
+ {
|
|
|
+ PromptController.Instance.ShowFloatTextPrompt("通关数量已超过最大可通关数量!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (FieldWorkDataManager.Instance.MaxLevelId != 0)
|
|
|
+ {
|
|
|
+ AlertUI.Show("一键通关不消耗服装和词牌的使用次数,每周可使用一次,是否快速通关?")
|
|
|
+ .SetLeftButton(true, "否").SetRightButton(true, "是", async (object data) =>
|
|
|
{
|
|
|
- AlertUI.Show("一键通关不消耗服装和词牌的使用次数,每周可使用一次,是否快速通关?")
|
|
|
- .SetLeftButton(true, "否").SetRightButton(true, "是", async (object data) =>
|
|
|
+ bool result = await FieldWorkSproxy.ReqFieldWorkOneClickPass();
|
|
|
+ if (result)
|
|
|
{
|
|
|
- bool result = await FieldWorkSproxy.ReqFieldWorkOneClickPass();
|
|
|
- if (result)
|
|
|
- {
|
|
|
- UpdateLevel();
|
|
|
- PromptController.Instance.ShowFloatTextPrompt("一键通关成功!");
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- PromptController.Instance.ShowFloatTextPrompt("暂未满足通关要求,无法使用此功能!");
|
|
|
- }
|
|
|
+ UpdateLevel();
|
|
|
+ PromptController.Instance.ShowFloatTextPrompt("一键通关成功!");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ PromptController.Instance.ShowFloatTextPrompt("暂未满足通关要求,无法使用此功能!");
|
|
|
}
|
|
|
}
|
|
|
private void CheckGuide(object param)
|