From 5275b448b2995aa911d615ea62b229625eb14aec Mon Sep 17 00:00:00 2001
From: Client_PangDeRong <593317293@qq.com>
Date: 星期三, 19 九月 2018 15:59:51 +0800
Subject: [PATCH] 1857 从新增材料tips跳转到商城购买完材料后,关闭商城回到合成界面后,回归默认
---
System/Compose/New/ComposeEquipWin.cs | 67 ++++++++++++++++++++++++---------
1 files changed, 48 insertions(+), 19 deletions(-)
diff --git a/System/Compose/New/ComposeEquipWin.cs b/System/Compose/New/ComposeEquipWin.cs
index 470e8c6..79bfc4f 100644
--- a/System/Compose/New/ComposeEquipWin.cs
+++ b/System/Compose/New/ComposeEquipWin.cs
@@ -114,14 +114,38 @@
UIEventTrigger.Get(helpBtn.gameObject).OnUp = OnDownUp;
successRate = 0;
firstTypeDict = composeWinModel.GetFirstTypeModel((int)ComposeFuncType.Equip);
- CreateCell();
- if(curSecondType == 0)
+
+ bool isJumpTo = false;
+ if (composeWinModel.secondType != 0)
{
- RefreshUI(null);
+ isJumpTo = true;
+ curSecondType = composeWinModel.secondType;
+ curThirdType = composeWinModel.thirdType;
+ secondTypeDict = composeWinModel.GetSecondTypeModel((int)ComposeFuncType.Equip, composeWinModel.secondType);
+ OnClickSecondType(curSecondType,curThirdType);
+ composeWinModel.ResetJumpToModel();
}
+
+ CreateCell();
if (compoundModel != null)
{
RefreshUI(compoundModel);
+ if (isJumpTo)
+ {
+ isJumpTo = false;
+ if (!composeWinModel.IsEnoughFixedMat(compoundModel) || !composeWinModel.IsEnoughUnfixedMat(compoundModel))
+ {
+ MessageWin.Inst.ShowFixedTip(Language.Get("Compose101"));
+ }
+ else if (!composeWinModel.IsEnoughMoney(compoundModel))
+ {
+ MessageWin.Inst.ShowFixedTip(Language.Get("Z1011"));
+ }
+ }
+ }
+ else
+ {
+ RefreshUI(null);
}
}
@@ -182,7 +206,7 @@
if (secondTypeDict != null)
{
if (secondTypeDict.Count >= 1 && curSecondType != 0
- && curThirdType == 1)
+ && curThirdType >= 1)
{
int remain = curSecondType - firstTypeDict.Count;
if(remain > 0)
@@ -254,30 +278,35 @@
}
}
- private void OnClickSecondType(int secondType)
+ private void OnClickSecondType(int secondType,int _thirdType = 0)
{
curSecondType = secondType;
secondTypeDict = composeWinModel.GetSecondTypeModel((int)ComposeFuncType.Equip, curSecondType);
-
- foreach (var thirdType in secondTypeDict.Keys)
+ if(_thirdType == 0)
{
- if (thirdType != 0)
+ foreach (var thirdType in secondTypeDict.Keys)
{
-
- if (preSecondType == curSecondType)
+ if (thirdType != 0)
{
- curSecondType = 0;
- preSecondType = 0;
+ if (preSecondType == curSecondType)
+ {
+ curSecondType = 0;
+ preSecondType = 0;
+ }
+ curThirdType = thirdType;
}
- curThirdType = thirdType;
+ else
+ {
+ curThirdType = 0;
+ }
+ break;
}
- else
- {
- curThirdType = 0;
- }
- break;
}
-
+ else
+ {
+ curThirdType = _thirdType;
+ }
+
if (preSecondType != curSecondType)
{
preSecondType = curSecondType;
--
Gitblit v1.8.0