| System/Vip/FairyJadeInvestmentItem.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Vip/FairyJadeInvestmentModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Vip/FairyJadeInvestmentWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/Vip/FairyJadeInvestmentItem.cs
@@ -77,7 +77,12 @@ } else { int IsReceive = fairyJadeInvestmentModel.InfoSeriors[indexID]; int IsReceive = 0; var dit = fairyJadeInvestmentModel.GetInfoSeriors(); if (dit.ContainsKey(indexID)) { IsReceive = dit[indexID]; } if (IsReceive == 0) { m_ReceiveAwardBtn.gameObject.SetActive(true); @@ -185,15 +190,26 @@ } else { if (fairyJadeInvestmentModel.InvestmentAmountDic.ContainsKey(fairyJadeInvestmentModel.SelectNumber)) int type = fairyJadeInvestmentModel.GetType(); if (fairyJadeInvestmentModel.InfoSeriorsTypeDic.ContainsKey(type)) { grade = fairyJadeInvestmentModel.InvestmentAmountDic[fairyJadeInvestmentModel.SelectNumber]; var _dit = fairyJadeInvestmentModel.InfoSeriorsTypeDic[type]; if (_dit.ContainsKey(fairyJadeInvestmentModel.SelectNumber)) { grade = _dit[fairyJadeInvestmentModel.SelectNumber]; } } } List<AwardItem> fairyJadeInvestmentItem = Dit[Lv].FairyJadeInvestmentItem.GetAwardItem(grade); int indexID = Dit[Lv].ID; int IsReceive = fairyJadeInvestmentModel.InfoSeriors[indexID]; int IsReceive = 0; var dit = fairyJadeInvestmentModel.GetInfoSeriors(); if (dit.ContainsKey(indexID)) { IsReceive = dit[indexID]; } for (int i = 0; i < m_Group.childCount; i++) { if (i < fairyJadeInvestmentItem.Count) @@ -257,11 +273,16 @@ { int ShowLineNumber = 0; foreach (var key in fairyJadeInvestmentModel.InvestmentAmountDic.Keys) int type = fairyJadeInvestmentModel.GetType(); if (fairyJadeInvestmentModel.InfoSeriorsTypeDic.ContainsKey(type)) { if (fairyJadeInvestmentModel.InvestmentAmountDic[key] == grade) var dit = fairyJadeInvestmentModel.InfoSeriorsTypeDic[type]; foreach (var key in dit.Keys) { ShowLineNumber = key; if (dit[key] == grade) { ShowLineNumber = key; } } } return ShowLineNumber; @@ -277,10 +298,15 @@ } else { if (fairyJadeInvestmentModel.InvestmentAmountDic.ContainsKey(fairyJadeInvestmentModel.SelectNumber)) int type = fairyJadeInvestmentModel.GetType(); if (fairyJadeInvestmentModel.InfoSeriorsTypeDic.ContainsKey(type)) { grade = fairyJadeInvestmentModel.InvestmentAmountDic[fairyJadeInvestmentModel.SelectNumber]; } var dit = fairyJadeInvestmentModel.InfoSeriorsTypeDic[type]; if (dit.ContainsKey(fairyJadeInvestmentModel.SelectNumber)) { grade = dit[fairyJadeInvestmentModel.SelectNumber]; } } } int GetFairyJade = 0; int _type = fairyJadeInvestmentModel.GetType(); @@ -312,9 +338,14 @@ } else { if (fairyJadeInvestmentModel.InvestmentAmountDic.ContainsKey(fairyJadeInvestmentModel.SelectNumber)) int type = fairyJadeInvestmentModel.GetType(); if (fairyJadeInvestmentModel.InfoSeriorsTypeDic.ContainsKey(type)) { grade = fairyJadeInvestmentModel.InvestmentAmountDic[fairyJadeInvestmentModel.SelectNumber]; var dit = fairyJadeInvestmentModel.InfoSeriorsTypeDic[type]; if (dit.ContainsKey(fairyJadeInvestmentModel.SelectNumber)) { grade = dit[fairyJadeInvestmentModel.SelectNumber]; } } } int ShowLinesNumber = ShowLines(grade); System/Vip/FairyJadeInvestmentModel.cs
@@ -27,10 +27,10 @@ { // public Dictionary<int, FairyJadeInvestmentClass> FairyJadeInvestmentDic = new Dictionary<int, FairyJadeInvestmentClass>();//等级(0-300级) public Dictionary<int, Dictionary<int, FairyJadeInvestmentClass>> FairyJadeInvestmentTypeDic = new Dictionary<int, Dictionary<int, FairyJadeInvestmentClass>>();//根据投资类型来存储奖励类型和金额(类型3,4,5); public Dictionary<int, int> InfoSeriors = new Dictionary<int, int>();//奖励领取信息//key为索引,Value(0,未领,其他值未领的钱数)等级(0-300级) // public Dictionary<int, int> InfoSeriors = new Dictionary<int, int>();//奖励领取信息//key为索引,Value(0,未领,其他值未领的钱数)等级(0-300级) public Dictionary<int, Dictionary<int, int>> InfoSeriorsTypeDic = new Dictionary<int, Dictionary<int, int>>();//根据类型存储奖励信息 public Dictionary<int, Dictionary<int, int>> InvestmentAmountTypeDic = new Dictionary<int, Dictionary<int, int>>();//根据类型获得投资金额 public Dictionary<int, int> InvestmentAmountDic = new Dictionary<int, int>();//投资金额 // public Dictionary<int, int> InvestmentAmountDic = new Dictionary<int, int>();//投资金额 public Dictionary<int, BinningClass> BinningDic = new Dictionary<int, BinningClass>();//根据类型获取各个类型投资的档位金额和分档 public static Action FairyJadeInfoSeriorsUpdate; // public int InvestGold = 0; // 投资额度 @@ -90,9 +90,10 @@ { if (InvestmentGrade == 4) { foreach (int key in InfoSeriors.Keys) var dit = GetInfoSeriors(); foreach (int key in dit.Keys) { if (InfoSeriors[key] != 4) if (dit[key] != 4) { isOpen = true; } @@ -137,9 +138,12 @@ // InvestGold = 0; SelectNumber = 0; RecordSelectNumberMax = 0; InvestmentAmountTypeDic.Clear(); InfoSeriorsTypeDic.Clear(); FairyJadeInvestmentTypeDic.Clear(); // FairyJadeInvestmentDic.Clear(); InvestmentAmountDic.Clear(); InfoSeriors.Clear(); // InvestmentAmountDic.Clear(); // InfoSeriors.Clear(); Assignment(); } @@ -154,6 +158,7 @@ PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting; FairyJadeInvestmentWin.FairyJadeInvestmentRedPointEvent -= FairyJadeInvestmentRedPoint; FairyJadeInvestmentWin.FairyJadeInvestmentRedPointEvent += FairyJadeInvestmentRedPoint; DebugEx.LogError(InfoSeriorsTypeDic); } private void FairyJadeInvestmentRedPoint() @@ -284,6 +289,7 @@ { dict[id] = 0; } InfoSeriorsTypeDic[type] = dict; } } @@ -420,14 +426,14 @@ { InvestmentAmountType(); SetBinning(); if (InvestmentAmountDic.Count <= 0) { InvestmentAmountDic.Add(VipInvestModel.GetInvestGold(3, 0), 1); InvestmentAmountDic.Add(VipInvestModel.GetInvestGold(3, 1), 2); InvestmentAmountDic.Add(VipInvestModel.GetInvestGold(3, 2), 3); InvestmentAmountDic.Add(VipInvestModel.GetInvestGold(3, 3), 4); RecordSelectNumberMax = VipInvestModel.GetInvestGold(3, 3); } //if (InvestmentAmountDic.Count <= 0) //{ // InvestmentAmountDic.Add(VipInvestModel.GetInvestGold(3, 0), 1); // InvestmentAmountDic.Add(VipInvestModel.GetInvestGold(3, 1), 2); // InvestmentAmountDic.Add(VipInvestModel.GetInvestGold(3, 2), 3); // InvestmentAmountDic.Add(VipInvestModel.GetInvestGold(3, 3), 4); // RecordSelectNumberMax = VipInvestModel.GetInvestGold(3, 3); //} } private void SetBinning() @@ -487,7 +493,12 @@ int indexID = Dit[key].ID; if (InvestmentGrade != 0) { int IsReceive = InfoSeriors[indexID]; var dit = GetInfoSeriors(); int IsReceive = 0; if (dit.ContainsKey(indexID)) { IsReceive = dit[indexID]; } if (IsReceive == 0) { redPointStre1.state = RedPointState.GetReward; @@ -592,9 +603,10 @@ bool isOpen = false; if (InvestmentGrade == 4) { foreach (int key in InfoSeriors.Keys) var dit = GetInfoSeriors(); foreach (int key in dit.Keys) { if (InfoSeriors[key] != 4) if (dit[key] != 4) { isOpen = true; } @@ -721,6 +733,16 @@ } return InvestGold; } public Dictionary<int, int> GetInfoSeriors() { Dictionary<int, int> dit = new Dictionary<int, int>(); int type = GetType(); if (InfoSeriorsTypeDic.ContainsKey(type)) { dit = InfoSeriorsTypeDic[type]; } return dit; } } System/Vip/FairyJadeInvestmentWin.cs
@@ -373,21 +373,40 @@ private void SetIconKeyImage() { var money = fairyJadeInvestmentModel.SelectNumber; if (fairyJadeInvestmentModel.InvestmentAmountDic.ContainsKey(money)) int ype = fairyJadeInvestmentModel.GetType(); if (fairyJadeInvestmentModel.InfoSeriorsTypeDic.ContainsKey(ype)) { var type = fairyJadeInvestmentModel.InvestmentAmountDic[money]; if (GearPositionList.Contains(type)) var dit = fairyJadeInvestmentModel.InfoSeriorsTypeDic[ype]; if (dit.ContainsKey(money)) { int Inedx = GearPositionList.IndexOf(type); m_Image1.SetSprite(IconList1[Inedx]); m_Image1.SetNativeSize(); m_Image2.SetSprite(IconList2[Inedx]); m_Image2.SetNativeSize(); m_Image3.SetSprite(IconList3[Inedx]); m_Image3.SetNativeSize(); var type = dit[money]; if (GearPositionList.Contains(type)) { int Inedx = GearPositionList.IndexOf(type); m_Image1.SetSprite(IconList1[Inedx]); m_Image1.SetNativeSize(); m_Image2.SetSprite(IconList2[Inedx]); m_Image2.SetNativeSize(); m_Image3.SetSprite(IconList3[Inedx]); m_Image3.SetNativeSize(); } } } //if (fairyJadeInvestmentModel.InvestmentAmountDic.ContainsKey(money)) //{ // var type = fairyJadeInvestmentModel.InvestmentAmountDic[money]; // if (GearPositionList.Contains(type)) // { // int Inedx = GearPositionList.IndexOf(type); // m_Image1.SetSprite(IconList1[Inedx]); // m_Image1.SetNativeSize(); // m_Image2.SetSprite(IconList2[Inedx]); // m_Image2.SetNativeSize(); // m_Image3.SetSprite(IconList3[Inedx]); // m_Image3.SetNativeSize(); // } //} } }