| Lua/Gen/FairyJadeInvestmentModelWrap.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/LoginAd/LoginAdModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Vip/FairyJadeInvestmentItem.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Vip/FairyJadeInvestmentModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Vip/FairyJadeInvestmentTipWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Vip/FairyJadeInvestmentWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Lua/Gen/FairyJadeInvestmentModelWrap.cs
@@ -21,49 +21,47 @@ { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(FairyJadeInvestmentModel); Utils.BeginObjectRegister(type, L, translator, 0, 12, 16, 13); Utils.BeginObjectRegister(type, L, translator, 0, 14, 14, 11); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBeforePlayerDataInitialize", _m_OnBeforePlayerDataInitialize); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnPlayerLoginOk", _m_OnPlayerLoginOk); Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); Utils.RegisterFunc(L, Utils.METHOD_IDX, "AssignmentType", _m_AssignmentType); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Assignment", _m_Assignment); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetInfoSeriors", _m_GetInfoSeriors); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SendInvestment", _m_SendInvestment); Utils.RegisterFunc(L, Utils.METHOD_IDX, "InvestmentMonthlyInvestment", _m_InvestmentMonthlyInvestment); Utils.RegisterFunc(L, Utils.METHOD_IDX, "InvestmentAmount", _m_InvestmentAmount); Utils.RegisterFunc(L, Utils.METHOD_IDX, "MessageNotification", _m_MessageNotification); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetType", _m_GetType); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetInvestmentGrade", _m_GetInvestmentGrade); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetInvestGold", _m_GetInvestGold); Utils.RegisterFunc(L, Utils.METHOD_IDX, "onStateUpate", _e_onStateUpate); Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsOpen", _g_get_IsOpen); Utils.RegisterFunc(L, Utils.GETTER_IDX, "priorityOpen", _g_get_priorityOpen); Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsAdvance", _g_get_IsAdvance); Utils.RegisterFunc(L, Utils.GETTER_IDX, "FairyJadeInvestmentDic", _g_get_FairyJadeInvestmentDic); Utils.RegisterFunc(L, Utils.GETTER_IDX, "FairyJadeInvestmentTypeDic", _g_get_FairyJadeInvestmentTypeDic); Utils.RegisterFunc(L, Utils.GETTER_IDX, "InfoSeriors", _g_get_InfoSeriors); Utils.RegisterFunc(L, Utils.GETTER_IDX, "InfoSeriorsTwo", _g_get_InfoSeriorsTwo); Utils.RegisterFunc(L, Utils.GETTER_IDX, "InvestmentAmountDic", _g_get_InvestmentAmountDic); Utils.RegisterFunc(L, Utils.GETTER_IDX, "InvestGold", _g_get_InvestGold); Utils.RegisterFunc(L, Utils.GETTER_IDX, "InvestmentGrade", _g_get_InvestmentGrade); Utils.RegisterFunc(L, Utils.GETTER_IDX, "InfoSeriorsTypeDic", _g_get_InfoSeriorsTypeDic); Utils.RegisterFunc(L, Utils.GETTER_IDX, "InvestmentAmountTypeDic", _g_get_InvestmentAmountTypeDic); Utils.RegisterFunc(L, Utils.GETTER_IDX, "BinningDic", _g_get_BinningDic); Utils.RegisterFunc(L, Utils.GETTER_IDX, "SelectNumber", _g_get_SelectNumber); Utils.RegisterFunc(L, Utils.GETTER_IDX, "RecordSelectNumberMax", _g_get_RecordSelectNumberMax); Utils.RegisterFunc(L, Utils.GETTER_IDX, "MultipleList", _g_get_MultipleList); Utils.RegisterFunc(L, Utils.GETTER_IDX, "BinningType", _g_get_BinningType); Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsRedpoint", _g_get_IsRedpoint); Utils.RegisterFunc(L, Utils.GETTER_IDX, "redPointStre1", _g_get_redPointStre1); Utils.RegisterFunc(L, Utils.GETTER_IDX, "JumpInedx", _g_get_JumpInedx); Utils.RegisterFunc(L, Utils.SETTER_IDX, "FairyJadeInvestmentDic", _s_set_FairyJadeInvestmentDic); Utils.RegisterFunc(L, Utils.SETTER_IDX, "FairyJadeInvestmentTypeDic", _s_set_FairyJadeInvestmentTypeDic); Utils.RegisterFunc(L, Utils.SETTER_IDX, "InfoSeriors", _s_set_InfoSeriors); Utils.RegisterFunc(L, Utils.SETTER_IDX, "InfoSeriorsTwo", _s_set_InfoSeriorsTwo); Utils.RegisterFunc(L, Utils.SETTER_IDX, "InvestmentAmountDic", _s_set_InvestmentAmountDic); Utils.RegisterFunc(L, Utils.SETTER_IDX, "InvestGold", _s_set_InvestGold); Utils.RegisterFunc(L, Utils.SETTER_IDX, "InvestmentGrade", _s_set_InvestmentGrade); Utils.RegisterFunc(L, Utils.SETTER_IDX, "FairyJadeInvestmentTypeDic", _s_set_FairyJadeInvestmentTypeDic); Utils.RegisterFunc(L, Utils.SETTER_IDX, "InfoSeriorsTypeDic", _s_set_InfoSeriorsTypeDic); Utils.RegisterFunc(L, Utils.SETTER_IDX, "InvestmentAmountTypeDic", _s_set_InvestmentAmountTypeDic); Utils.RegisterFunc(L, Utils.SETTER_IDX, "BinningDic", _s_set_BinningDic); Utils.RegisterFunc(L, Utils.SETTER_IDX, "SelectNumber", _s_set_SelectNumber); Utils.RegisterFunc(L, Utils.SETTER_IDX, "RecordSelectNumberMax", _s_set_RecordSelectNumberMax); Utils.RegisterFunc(L, Utils.SETTER_IDX, "MultipleList", _s_set_MultipleList); Utils.RegisterFunc(L, Utils.SETTER_IDX, "BinningType", _s_set_BinningType); Utils.RegisterFunc(L, Utils.SETTER_IDX, "IsRedpoint", _s_set_IsRedpoint); Utils.RegisterFunc(L, Utils.SETTER_IDX, "redPointStre1", _s_set_redPointStre1); Utils.RegisterFunc(L, Utils.SETTER_IDX, "JumpInedx", _s_set_JumpInedx); @@ -223,33 +221,6 @@ } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_AssignmentType(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.AssignmentType( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Assignment(RealStatePtr L) { try { @@ -287,7 +258,19 @@ FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); int gen_param_count = LuaAPI.lua_gettop(L); if(gen_param_count == 1) { System.Collections.Generic.Dictionary<int, int> gen_ret = gen_to_be_invoked.GetInfoSeriors( ); translator.Push(L, gen_ret); return 1; } if(gen_param_count == 2&& translator.Assignable<HA337_tagMCGoldInvestInfo>(L, 2)) { HA337_tagMCGoldInvestInfo _vNetData = (HA337_tagMCGoldInvestInfo)translator.GetObject(L, 2, typeof(HA337_tagMCGoldInvestInfo)); @@ -301,6 +284,8 @@ } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return LuaAPI.luaL_error(L, "invalid arguments to FairyJadeInvestmentModel.GetInfoSeriors!"); } @@ -416,6 +401,90 @@ } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetType(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); { int gen_ret = gen_to_be_invoked.GetType( ); LuaAPI.xlua_pushinteger(L, gen_ret); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetInvestmentGrade(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); { int gen_ret = gen_to_be_invoked.GetInvestmentGrade( ); LuaAPI.xlua_pushinteger(L, gen_ret); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetInvestGold(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); { int gen_ret = gen_to_be_invoked.GetInvestGold( ); LuaAPI.xlua_pushinteger(L, gen_ret); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } @@ -462,20 +531,6 @@ } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_FairyJadeInvestmentDic(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.FairyJadeInvestmentDic); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_FairyJadeInvestmentTypeDic(RealStatePtr L) { try { @@ -490,13 +545,13 @@ } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_InfoSeriors(RealStatePtr L) static int _g_get_InfoSeriorsTypeDic(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.InfoSeriors); translator.Push(L, gen_to_be_invoked.InfoSeriorsTypeDic); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } @@ -504,13 +559,13 @@ } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_InfoSeriorsTwo(RealStatePtr L) static int _g_get_InvestmentAmountTypeDic(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.InfoSeriorsTwo); translator.Push(L, gen_to_be_invoked.InvestmentAmountTypeDic); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } @@ -518,13 +573,13 @@ } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_InvestmentAmountDic(RealStatePtr L) static int _g_get_BinningDic(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.InvestmentAmountDic); translator.Push(L, gen_to_be_invoked.BinningDic); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } @@ -537,34 +592,6 @@ try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); translator.Push(L, FairyJadeInvestmentModel.FairyJadeInfoSeriorsUpdate); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_InvestGold(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.InvestGold); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_InvestmentGrade(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.InvestmentGrade); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } @@ -607,6 +634,20 @@ FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.MultipleList); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_BinningType(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.BinningType); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } @@ -658,21 +699,6 @@ [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_FairyJadeInvestmentDic(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); gen_to_be_invoked.FairyJadeInvestmentDic = (System.Collections.Generic.Dictionary<int, FairyJadeInvestmentClass>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<int, FairyJadeInvestmentClass>)); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_FairyJadeInvestmentTypeDic(RealStatePtr L) { try { @@ -688,13 +714,13 @@ } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_InfoSeriors(RealStatePtr L) static int _s_set_InfoSeriorsTypeDic(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); gen_to_be_invoked.InfoSeriors = (System.Collections.Generic.Dictionary<int, int>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<int, int>)); gen_to_be_invoked.InfoSeriorsTypeDic = (System.Collections.Generic.Dictionary<int, System.Collections.Generic.Dictionary<int, int>>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<int, System.Collections.Generic.Dictionary<int, int>>)); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); @@ -703,13 +729,13 @@ } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_InfoSeriorsTwo(RealStatePtr L) static int _s_set_InvestmentAmountTypeDic(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); gen_to_be_invoked.InfoSeriorsTwo = (System.Collections.Generic.Dictionary<int, int>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<int, int>)); gen_to_be_invoked.InvestmentAmountTypeDic = (System.Collections.Generic.Dictionary<int, System.Collections.Generic.Dictionary<int, int>>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<int, System.Collections.Generic.Dictionary<int, int>>)); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); @@ -718,13 +744,13 @@ } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_InvestmentAmountDic(RealStatePtr L) static int _s_set_BinningDic(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); gen_to_be_invoked.InvestmentAmountDic = (System.Collections.Generic.Dictionary<int, int>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<int, int>)); gen_to_be_invoked.BinningDic = (System.Collections.Generic.Dictionary<int, BinningClass>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<int, BinningClass>)); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); @@ -738,36 +764,6 @@ try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel.FairyJadeInfoSeriorsUpdate = translator.GetDelegate<System.Action>(L, 1); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_InvestGold(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); gen_to_be_invoked.InvestGold = LuaAPI.xlua_tointeger(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_InvestmentGrade(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); gen_to_be_invoked.InvestmentGrade = LuaAPI.xlua_tointeger(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); @@ -821,6 +817,21 @@ } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_BinningType(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyJadeInvestmentModel gen_to_be_invoked = (FairyJadeInvestmentModel)translator.FastGetCSObj(L, 1); gen_to_be_invoked.BinningType = LuaAPI.xlua_tointeger(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_IsRedpoint(RealStatePtr L) { try { System/LoginAd/LoginAdModel.cs
@@ -106,7 +106,8 @@ switch ((LoginAdCondition)config.condition[0]) { case LoginAdCondition.MoneyInvest: if (moneyInvestModel.InvestmentGrade > 0 || PlayerDatas.Instance.baseData.LV >= 300) int InvestmentGrade = moneyInvestModel.GetInvestmentGrade(); if (InvestmentGrade > 0 || PlayerDatas.Instance.baseData.LV >= 300) { continue; } System/Vip/FairyJadeInvestmentItem.cs
@@ -39,7 +39,13 @@ private void MoreThanGrade(int Lv)//超过等级 { if (fairyJadeInvestmentModel.FairyJadeInvestmentDic.ContainsKey(Lv)) int _type = fairyJadeInvestmentModel.BinningType; if (!fairyJadeInvestmentModel.FairyJadeInvestmentTypeDic.ContainsKey(_type)) { return; } var Dit = fairyJadeInvestmentModel.FairyJadeInvestmentTypeDic[_type]; if (Dit.ContainsKey(Lv)) { if (Lv <= 0) { @@ -59,8 +65,9 @@ m_Label_Text.gameObject.SetActive(false); } } int indexID = fairyJadeInvestmentModel.FairyJadeInvestmentDic[Lv].ID; if (fairyJadeInvestmentModel.InvestmentGrade == 0) int indexID = Dit[Lv].ID; int InvestmentGrade = fairyJadeInvestmentModel.GetInvestmentGrade(); if (InvestmentGrade == 0) { m_ReceiveAwardBtn.gameObject.SetActive(false); m_IsDrawImage.gameObject.SetActive(false); @@ -70,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); @@ -81,17 +93,18 @@ m_ReceiveAwardBtn.RemoveAllListeners(); m_ReceiveAwardBtn.AddListener(() => { fairyJadeInvestmentModel.SendInvestment(3, indexID); int type = fairyJadeInvestmentModel.BinningType; fairyJadeInvestmentModel.SendInvestment(type, indexID); }); } else { List<AwardItem> fairyJadeInvestmentItem = fairyJadeInvestmentModel.FairyJadeInvestmentDic[Lv].FairyJadeInvestmentItem.GetAwardItem(fairyJadeInvestmentModel.InvestmentGrade); List<AwardItem> fairyJadeInvestmentItem = Dit[Lv].FairyJadeInvestmentItem.GetAwardItem(InvestmentGrade); int AtPresentNumber = 0; if (IsReceive != 0) { List<AwardItem> fairyJadeInvestmentItemAdd = fairyJadeInvestmentModel.FairyJadeInvestmentDic[Lv].FairyJadeInvestmentItem.GetAwardItem(IsReceive); List<AwardItem> fairyJadeInvestmentItemAdd = Dit[Lv].FairyJadeInvestmentItem.GetAwardItem(IsReceive); AwardItem itemAdd = fairyJadeInvestmentItemAdd[0]; AtPresentNumber = itemAdd.item.count; } @@ -105,7 +118,8 @@ m_ReceiveAwardBtn.RemoveAllListeners(); m_ReceiveAwardBtn.AddListener(() => { fairyJadeInvestmentModel.SendInvestment(3, indexID); int type = fairyJadeInvestmentModel.BinningType; fairyJadeInvestmentModel.SendInvestment(type, indexID); }); } else @@ -124,7 +138,13 @@ private void BeforeTheClass(int Lv)//未到等级 { if (fairyJadeInvestmentModel.FairyJadeInvestmentDic.ContainsKey(Lv)) int _type = fairyJadeInvestmentModel.BinningType; if (!fairyJadeInvestmentModel.FairyJadeInvestmentTypeDic.ContainsKey(_type)) { return; } var Dit = fairyJadeInvestmentModel.FairyJadeInvestmentTypeDic[_type]; if (Dit.ContainsKey(Lv)) { if (Lv <= 0) { @@ -155,25 +175,42 @@ private void ItemCellAssignment(int Lv) { if (fairyJadeInvestmentModel.FairyJadeInvestmentDic.ContainsKey(Lv)) int _type = fairyJadeInvestmentModel.BinningType; if (!fairyJadeInvestmentModel.FairyJadeInvestmentTypeDic.ContainsKey(_type)) { return; } var Dit = fairyJadeInvestmentModel.FairyJadeInvestmentTypeDic[_type]; int InvestmentGrade = fairyJadeInvestmentModel.GetInvestmentGrade(); if (Dit.ContainsKey(Lv)) { int grade = 3; if (fairyJadeInvestmentModel.InvestmentGrade != 0) if (InvestmentGrade != 0) { grade = fairyJadeInvestmentModel.InvestmentGrade; grade = InvestmentGrade; } else { if (fairyJadeInvestmentModel.InvestmentAmountDic.ContainsKey(fairyJadeInvestmentModel.SelectNumber)) int type = fairyJadeInvestmentModel.BinningType; if (fairyJadeInvestmentModel.InvestmentAmountTypeDic.ContainsKey(type)) { grade = fairyJadeInvestmentModel.InvestmentAmountDic[fairyJadeInvestmentModel.SelectNumber]; var _dit = fairyJadeInvestmentModel.InvestmentAmountTypeDic[type]; if (_dit.ContainsKey(fairyJadeInvestmentModel.SelectNumber)) { grade = _dit[fairyJadeInvestmentModel.SelectNumber]; } } } List<AwardItem> fairyJadeInvestmentItem = fairyJadeInvestmentModel.FairyJadeInvestmentDic[Lv].FairyJadeInvestmentItem.GetAwardItem(grade); int indexID = fairyJadeInvestmentModel.FairyJadeInvestmentDic[Lv].ID; int IsReceive = fairyJadeInvestmentModel.InfoSeriors[indexID]; List<AwardItem> fairyJadeInvestmentItem = Dit[Lv].FairyJadeInvestmentItem.GetAwardItem(grade); int indexID = Dit[Lv].ID; 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) @@ -205,7 +242,7 @@ int AtPresentNumber = 0; if (IsReceive != 0) { List<AwardItem> fairyJadeInvestmentItemAdd = fairyJadeInvestmentModel.FairyJadeInvestmentDic[Lv].FairyJadeInvestmentItem.GetAwardItem(IsReceive); List<AwardItem> fairyJadeInvestmentItemAdd = Dit[Lv].FairyJadeInvestmentItem.GetAwardItem(IsReceive); AwardItem itemAdd = fairyJadeInvestmentItemAdd[i]; AtPresentNumber = itemAdd.item.count; } @@ -237,11 +274,16 @@ { int ShowLineNumber = 0; foreach (var key in fairyJadeInvestmentModel.InvestmentAmountDic.Keys) int type = fairyJadeInvestmentModel.BinningType; if (fairyJadeInvestmentModel.InvestmentAmountTypeDic.ContainsKey(type)) { if (fairyJadeInvestmentModel.InvestmentAmountDic[key] == grade) var dit = fairyJadeInvestmentModel.InvestmentAmountTypeDic[type]; foreach (var key in dit.Keys) { ShowLineNumber = key; if (dit[key] == grade) { ShowLineNumber = key; } } } return ShowLineNumber; @@ -250,23 +292,35 @@ private float InvestmentProportion(int Lv)//获取返回仙玉的比例 { int grade = 3; if (fairyJadeInvestmentModel.InvestmentGrade != 0) int InvestmentGrade = fairyJadeInvestmentModel.GetInvestmentGrade(); if (InvestmentGrade != 0) { grade = fairyJadeInvestmentModel.InvestmentGrade; grade = InvestmentGrade; } else { if (fairyJadeInvestmentModel.InvestmentAmountDic.ContainsKey(fairyJadeInvestmentModel.SelectNumber)) int type = fairyJadeInvestmentModel.BinningType; if (fairyJadeInvestmentModel.InvestmentAmountTypeDic.ContainsKey(type)) { grade = fairyJadeInvestmentModel.InvestmentAmountDic[fairyJadeInvestmentModel.SelectNumber]; } var dit = fairyJadeInvestmentModel.InvestmentAmountTypeDic[type]; if (dit.ContainsKey(fairyJadeInvestmentModel.SelectNumber)) { grade = dit[fairyJadeInvestmentModel.SelectNumber]; } } } int GetFairyJade = 0; foreach (var key in fairyJadeInvestmentModel.FairyJadeInvestmentDic.Keys) int _type = fairyJadeInvestmentModel.BinningType; if (!fairyJadeInvestmentModel.FairyJadeInvestmentTypeDic.ContainsKey(_type)) { return GetFairyJade; } var Dit = fairyJadeInvestmentModel.FairyJadeInvestmentTypeDic[_type]; foreach (var key in Dit.Keys) { if (key == Lv) { List<AwardItem> fairyJadeInvestmentItem = fairyJadeInvestmentModel.FairyJadeInvestmentDic[key].FairyJadeInvestmentItem.GetAwardItem(grade); List<AwardItem> fairyJadeInvestmentItem = Dit[key].FairyJadeInvestmentItem.GetAwardItem(grade); AwardItem item = fairyJadeInvestmentItem[0]; GetFairyJade = item.item.count; } @@ -278,24 +332,36 @@ private int RebateMultiple(int lv) { int grade = 3; if (fairyJadeInvestmentModel.InvestmentGrade != 0) int InvestmentGrade = fairyJadeInvestmentModel.GetInvestmentGrade(); if (InvestmentGrade != 0) { grade = fairyJadeInvestmentModel.InvestmentGrade; grade = InvestmentGrade; } else { if (fairyJadeInvestmentModel.InvestmentAmountDic.ContainsKey(fairyJadeInvestmentModel.SelectNumber)) int type = fairyJadeInvestmentModel.BinningType; if (fairyJadeInvestmentModel.InvestmentAmountTypeDic.ContainsKey(type)) { grade = fairyJadeInvestmentModel.InvestmentAmountDic[fairyJadeInvestmentModel.SelectNumber]; var dit = fairyJadeInvestmentModel.InvestmentAmountTypeDic[type]; if (dit.ContainsKey(fairyJadeInvestmentModel.SelectNumber)) { grade = dit[fairyJadeInvestmentModel.SelectNumber]; } } } int ShowLinesNumber = ShowLines(grade); int GetFairyJade = 0; foreach (var key in fairyJadeInvestmentModel.FairyJadeInvestmentDic.Keys) int _type = fairyJadeInvestmentModel.BinningType; if (!fairyJadeInvestmentModel.FairyJadeInvestmentTypeDic.ContainsKey(_type)) { return GetFairyJade; } var Dit = fairyJadeInvestmentModel.FairyJadeInvestmentTypeDic[_type]; foreach (var key in Dit.Keys) { if (key <= lv) { List<AwardItem> fairyJadeInvestmentItem = fairyJadeInvestmentModel.FairyJadeInvestmentDic[key].FairyJadeInvestmentItem.GetAwardItem(grade); List<AwardItem> fairyJadeInvestmentItem = Dit[key].FairyJadeInvestmentItem.GetAwardItem(grade); AwardItem item = fairyJadeInvestmentItem[0]; GetFairyJade += item.item.count; } @@ -308,8 +374,6 @@ } return GetValue; } } } System/Vip/FairyJadeInvestmentModel.cs
@@ -8,6 +8,12 @@ using Snxxz.UI; using System.Linq; //仙玉投资 public class BinningClass { public int Money;//金额 public int Binning;// } public class FairyJadeInvestmentClass { public int ID;//ID @@ -19,20 +25,17 @@ [XLua.LuaCallCSharp] public class FairyJadeInvestmentModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk, IOpenServerActivity { 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> InfoSeriorsTwo = new Dictionary<int, int>();//奖励领取信息//key为索引,Value(0,未领,其他值未领的钱数)等级(301-400) public Dictionary<int, int> InvestmentAmountDic = new Dictionary<int, int>();//投资金额 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, BinningClass> BinningDic = new Dictionary<int, BinningClass>();//根据类型获取各个类型投资的档位金额和分档 public static Action FairyJadeInfoSeriorsUpdate; public int InvestGold = 0; // 投资额度 public int InvestmentGrade = 0;//0未投,1档,2,档,3,档,4档 public int SelectNumber = 0;//记录想要投资的钱数 public int RecordSelectNumberMax = 0;//用来标记最大可投资额度 public List<int> MultipleList = new List<int>(); VipInvestModel m_VipInvestModel; VipInvestModel VipInvestModel { get { return m_VipInvestModel ?? (m_VipInvestModel = ModelCenter.Instance.GetModel<VipInvestModel>()); } } public int BinningType = 3; public event Action<int> onStateUpate; public bool IsOpen { @@ -73,6 +76,7 @@ private bool IsOpenFeatures()//功能是否开启 { bool isOpen = false; int InvestmentGrade = GetInvestmentGrade(); if (InvestmentGrade > 0 && InvestmentGrade < 4) { isOpen = true; @@ -81,16 +85,17 @@ { 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; } } } } if (PlayerDatas.Instance.baseData.LV >= 300 && !isOpen) if (PlayerDatas.Instance.baseData.LV >= 500 && !isOpen) { return false; } @@ -125,14 +130,12 @@ { IsOk = false; IsRedpoint = false; InvestGold = 0; InvestmentGrade = 0; SelectNumber = 0; RecordSelectNumberMax = 0; FairyJadeInvestmentDic.Clear(); InvestmentAmountDic.Clear(); InfoSeriors.Clear(); InfoSeriorsTwo.Clear(); BinningDic.Clear(); InfoSeriorsTypeDic.Clear(); InvestmentAmountTypeDic.Clear(); FairyJadeInvestmentTypeDic.Clear(); Assignment(); } @@ -141,8 +144,9 @@ { IsOk = true; InvestmentAmount(); BinningType = GetType(); InvestmentRedPoint(); IsShowRedPointSimple(); IsShowRedPointSimple(); PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting; PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting; FairyJadeInvestmentWin.FairyJadeInvestmentRedPointEvent -= FairyJadeInvestmentRedPoint; @@ -156,6 +160,7 @@ private void Updatefighting(PlayerDataRefresh _tCDBPlayerRefresh) { int InvestGold = GetInvestGold(); if (_tCDBPlayerRefresh == PlayerDataRefresh.LV && InvestGold > 0) { InvestmentRedPoint(); @@ -171,7 +176,7 @@ } public void AssignmentType() private void AssignmentType() { //根据投资类型来存储奖励信息(类型3,4,5) if (FairyJadeInvestmentTypeDic.Count >= 3) @@ -187,17 +192,11 @@ { Dictionary<int, FairyJadeInvestmentClass> Dic = new Dictionary<int, FairyJadeInvestmentClass>(); FairyJadeInvestmentClass fairyJadeInvestment = new FairyJadeInvestmentClass(); if (value.id >= 310) { fairyJadeInvestment.ID = value.id % 100; } else { fairyJadeInvestment.ID = value.id % 10; } fairyJadeInvestment.ID = value.id % 100; fairyJadeInvestment.Type = value.type; fairyJadeInvestment.NeedDay = value.needDay; fairyJadeInvestment.NeedLv = value.needLV; SetInfoSeriors(value.type, fairyJadeInvestment.ID); MonthlyInvestmentModel.MonthlyInvestmentItem FairyJadeItem = new MonthlyInvestmentModel.MonthlyInvestmentItem(); var _jsonData = LitJson.JsonMapper.ToObject(value.award); foreach (string key in _jsonData.Keys) @@ -221,14 +220,8 @@ { var dict = FairyJadeInvestmentTypeDic[value.type]; FairyJadeInvestmentClass fairyJadeInvestment = new FairyJadeInvestmentClass(); if (value.id >= 310) { fairyJadeInvestment.ID = value.id % 100; } else { fairyJadeInvestment.ID = value.id % 10; } fairyJadeInvestment.ID = fairyJadeInvestment.ID = value.id % 100; SetInfoSeriors(value.type, fairyJadeInvestment.ID); fairyJadeInvestment.Type = value.type; fairyJadeInvestment.NeedDay = value.needDay; fairyJadeInvestment.NeedLv = value.needLV; @@ -260,87 +253,69 @@ } } } // DebugEx.LogError(FairyJadeInvestmentTypeDic); } private void SetInfoSeriors(int type, int id) { if (!InfoSeriorsTypeDic.ContainsKey(type)) { Dictionary<int, int> dic = new Dictionary<int, int>(); dic.Add(id, 0); InfoSeriorsTypeDic.Add(type, dic); } else { var dict = InfoSeriorsTypeDic[type]; if (dict.ContainsKey(id)) { dict.Add(id, 0); } else { dict[id] = 0; } InfoSeriorsTypeDic[type] = dict; } } public void Assignment() { // AssignmentType(); var InvestConfig = Config.Instance.GetAllValues<InvestConfig>(); if (FairyJadeInvestmentDic.Count > 0) { return; } foreach (var value in InvestConfig) { if (value.type == 3 && !FairyJadeInvestmentDic.ContainsKey(value.needLV)) { FairyJadeInvestmentClass fairyJadeInvestment = new FairyJadeInvestmentClass(); if (value.id >= 310) { fairyJadeInvestment.ID = value.id % 100; } else { fairyJadeInvestment.ID = value.id % 10; } if (!InfoSeriors.ContainsKey(fairyJadeInvestment.ID)) { InfoSeriors.Add(fairyJadeInvestment.ID, 0); } fairyJadeInvestment.Type = value.type; fairyJadeInvestment.NeedDay = value.needDay; fairyJadeInvestment.NeedLv = value.needLV; MonthlyInvestmentModel.MonthlyInvestmentItem FairyJadeItem = new MonthlyInvestmentModel.MonthlyInvestmentItem(); var _jsonData = LitJson.JsonMapper.ToObject(value.award); foreach (string key in _jsonData.Keys) { var _job = int.Parse(key); var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[key].ToJson()); for (int j = 0; j < _itemArray.Length; j++) { FairyJadeItem.Add(_job, new AwardItem() { item = new Item(_itemArray[j][0], _itemArray[j][1]), isBind = _itemArray[j][2], }); } } fairyJadeInvestment.FairyJadeInvestmentItem = FairyJadeItem; FairyJadeInvestmentDic.Add(value.needLV, fairyJadeInvestment); } } // DebugEx.LogError(FairyJadeInvestmentDic); AssignmentType(); } public void GetInfoSeriors(HA337_tagMCGoldInvestInfo vNetData)//接受信息 { if (vNetData.InvestType == 3) if (vNetData.InvestType == 3 || vNetData.InvestType == 4 || vNetData.InvestType == 5) { InvestmentAmount(); InvestGold = (int)vNetData.InvestGold; if (InvestmentAmountDic.ContainsKey(InvestGold)) if (BinningDic.ContainsKey(vNetData.InvestType) && InvestmentAmountTypeDic.ContainsKey(vNetData.InvestType)) { InvestmentGrade = InvestmentAmountDic[InvestGold]; } else { InvestmentGrade = 0; } for (int i = 0; i < vNetData.RewardRecordCnt; i++) { if (InfoSeriors.ContainsKey((int)vNetData.InvestRewardList[i].RewardIndex)) var dit = InvestmentAmountTypeDic[vNetData.InvestType]; if (dit.ContainsKey((int)vNetData.InvestGold)) { InfoSeriors[(int)vNetData.InvestRewardList[i].RewardIndex] = (int)vNetData.InvestRewardList[i].RewardValue; BinningClass binningClass = new BinningClass(); binningClass.Money= (int)vNetData.InvestGold; binningClass.Binning= dit[(int)vNetData.InvestGold]; BinningDic[vNetData.InvestType] = binningClass; } } if (InfoSeriorsTypeDic.ContainsKey(vNetData.InvestType))//奖励刷新赋值 { var Dit = InfoSeriorsTypeDic[vNetData.InvestType]; for (int i = 0; i < vNetData.RewardRecordCnt; i++) { if (Dit.ContainsKey((int)vNetData.InvestRewardList[i].RewardIndex)) { Dit[(int)vNetData.InvestRewardList[i].RewardIndex] = (int)vNetData.InvestRewardList[i].RewardValue; } } InfoSeriorsTypeDic[vNetData.InvestType] = Dit; } InvestmentRedPoint(); if (FairyJadeInfoSeriorsUpdate != null) { FairyJadeInfoSeriorsUpdate(); } if (IsOk) { InvestmentRedPoint(); } } } @@ -363,16 +338,39 @@ public void InvestmentAmount() { 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); } InvestmentAmountType(); SetBinning(); } private void SetBinning() { if (BinningDic.Count > 0) { return; } BinningClass binning1 = new BinningClass(); BinningClass binning2 = new BinningClass(); BinningClass binning3 = new BinningClass(); BinningDic.Add(3, binning1); BinningDic.Add(4, binning2); BinningDic.Add(5, binning3); } private void InvestmentAmountType() { if (InvestmentAmountTypeDic.Count > 0) { return; } Dictionary<int, int> Dic = new Dictionary<int, int>(); Dic.Add(VipInvestModel.GetInvestGold(3, 0), 1); Dic.Add(VipInvestModel.GetInvestGold(3, 1), 2); Dic.Add(VipInvestModel.GetInvestGold(3, 2), 3); Dic.Add(VipInvestModel.GetInvestGold(3, 3), 4); RecordSelectNumberMax = VipInvestModel.GetInvestGold(3, 3); InvestmentAmountTypeDic.Add(3, Dic); InvestmentAmountTypeDic.Add(4, Dic); InvestmentAmountTypeDic.Add(5, Dic); } private const int Redpoint_key1 = 20910; public Redpoint redPointStre1 = new Redpoint(209, Redpoint_key1);//仙玉投资红点 public int JumpInedx = 0; @@ -385,15 +383,28 @@ int type = -1; redPointStre1.state = RedPointState.None; int PlayerLV = PlayerDatas.Instance.baseData.LV; foreach (var key in FairyJadeInvestmentDic.Keys) int InvestmentGrade = GetInvestmentGrade(); int _type = BinningType; if (!FairyJadeInvestmentTypeDic.ContainsKey(_type)) { return; } var Dit = FairyJadeInvestmentTypeDic[_type]; foreach (var key in Dit.Keys) { type += 1; if (PlayerLV >= key) { int indexID = FairyJadeInvestmentDic[key].ID; 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; @@ -402,11 +413,11 @@ } else { List<AwardItem> fairyJadeInvestmentItem = FairyJadeInvestmentDic[key].FairyJadeInvestmentItem.GetAwardItem(InvestmentGrade); List<AwardItem> fairyJadeInvestmentItem = Dit[key].FairyJadeInvestmentItem.GetAwardItem(InvestmentGrade); int AtPresentNumber = 0; if (IsReceive != 0) { List<AwardItem> fairyJadeInvestmentItemAdd = FairyJadeInvestmentDic[key].FairyJadeInvestmentItem.GetAwardItem(IsReceive); List<AwardItem> fairyJadeInvestmentItemAdd = Dit[key].FairyJadeInvestmentItem.GetAwardItem(IsReceive); AwardItem itemAdd = fairyJadeInvestmentItemAdd[0]; AtPresentNumber = itemAdd.item.count; } @@ -423,7 +434,7 @@ int type1 = -1; if (JumpInedx == 0 && InvestmentGrade != 0) { foreach (var key in FairyJadeInvestmentDic.Keys) foreach (var key in Dit.Keys) { type1 += 1; if (key > PlayerLV) @@ -436,6 +447,7 @@ } private void RedPointSate()//月卡投资创角前三天红点 { int InvestGold = GetInvestGold(); if (InvestGold > 0) { return; @@ -481,6 +493,7 @@ public void MessageNotification() { var _funcOrder = 0; int InvestmentGrade = GetInvestmentGrade(); if (!OpenServerActivityCenter.Instance.IsAnyActivityOpen(out _funcOrder)) { SysNotifyMgr.Instance.ShowTip("JadeInvestmentLimit1");//信息提示 @@ -496,9 +509,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; } @@ -510,9 +524,191 @@ return; } } } public int GetType()//获取投资类型 { int type = 3; bool Isbool = true; int PlayerLV = PlayerDatas.Instance.baseData.LV; foreach (var key in BinningDic.Keys) { if (BinningDic[key].Money != 0) { Isbool = false; } } if (Isbool)//没有投资过永远为第一档 { return 3; } bool Isbool3 = false; if (FairyJadeInvestmentTypeDic.ContainsKey(3) && InfoSeriorsTypeDic.ContainsKey(3)) { int typeGrade = GetInvestmentGradeT(3); var dit = FairyJadeInvestmentTypeDic[3]; var dit1 = InfoSeriorsTypeDic[3]; foreach (var key in dit.Keys) { if (PlayerLV >= key) { int indexID = dit[key].ID; int IsReceive = dit1[indexID]; if (IsReceive == 0) { Isbool3 = true; } else { List<AwardItem> fairyJadeInvestmentItem = dit[key].FairyJadeInvestmentItem.GetAwardItem(typeGrade); int AtPresentNumber = 0; if (IsReceive != 0) { List<AwardItem> fairyJadeInvestmentItemAdd = dit[key].FairyJadeInvestmentItem.GetAwardItem(IsReceive); AwardItem itemAdd = fairyJadeInvestmentItemAdd[0]; AtPresentNumber = itemAdd.item.count; } if (fairyJadeInvestmentItem[0].item.count > AtPresentNumber) { Isbool3 = true; } } } } } if (Isbool3 || PlayerLV <= 300) { return 3; } //if (BinningDic.ContainsKey(4) && BinningDic[4].Money == 0) //{ // return 4; //} bool Isbool4 = false; if (BinningDic.ContainsKey(4) && BinningDic[4].Money != 0 && FairyJadeInvestmentTypeDic.ContainsKey(4) && InfoSeriorsTypeDic.ContainsKey(4)) { int typeGrade = GetInvestmentGradeT(4); var dit = FairyJadeInvestmentTypeDic[4]; var dit1 = InfoSeriorsTypeDic[4]; foreach (var key in dit.Keys) { if (PlayerLV >= key) { int indexID = dit[key].ID; int IsReceive = dit1[indexID]; if (IsReceive == 0) { Isbool4 = true; } else { List<AwardItem> fairyJadeInvestmentItem = dit[key].FairyJadeInvestmentItem.GetAwardItem(typeGrade); int AtPresentNumber = 0; if (IsReceive != 0) { List<AwardItem> fairyJadeInvestmentItemAdd = dit[key].FairyJadeInvestmentItem.GetAwardItem(IsReceive); AwardItem itemAdd = fairyJadeInvestmentItemAdd[0]; AtPresentNumber = itemAdd.item.count; } if (fairyJadeInvestmentItem[0].item.count > AtPresentNumber) { Isbool3 = true; } } } } } if ((PlayerLV > 300 && PlayerLV <= 400) || Isbool4) { return 4; } if (BinningDic.ContainsKey(5) && BinningDic[5].Money == 0) { return 5; } bool Isbool5 = false; if (FairyJadeInvestmentTypeDic.ContainsKey(5) && InfoSeriorsTypeDic.ContainsKey(5)) { int typeGrade = GetInvestmentGradeT(5); var dit = FairyJadeInvestmentTypeDic[5]; var dit1 = InfoSeriorsTypeDic[5]; foreach (var key in dit.Keys) { if (PlayerLV >= key) { int indexID = dit[key].ID; int IsReceive = dit1[indexID]; if (IsReceive == 0) { Isbool5 = true; } else { List<AwardItem> fairyJadeInvestmentItem = dit[key].FairyJadeInvestmentItem.GetAwardItem(typeGrade); int AtPresentNumber = 0; if (IsReceive != 0) { List<AwardItem> fairyJadeInvestmentItemAdd = dit[key].FairyJadeInvestmentItem.GetAwardItem(IsReceive); AwardItem itemAdd = fairyJadeInvestmentItemAdd[0]; AtPresentNumber = itemAdd.item.count; } if (fairyJadeInvestmentItem[0].item.count > AtPresentNumber) { Isbool3 = true; } } } } } if ((PlayerLV > 400 && PlayerLV <= 500) || Isbool5) { return 5; } return 5; } private int GetInvestmentGradeT(int Type) { int InvestmentGrade = 0; if (BinningDic.ContainsKey(Type)) { InvestmentGrade = BinningDic[Type].Binning; } return InvestmentGrade; } public int GetInvestmentGrade()//获取投资档位 { int InvestmentGrade = 0; int type =BinningType; if (BinningDic.ContainsKey(type)) { InvestmentGrade = BinningDic[type].Binning; } return InvestmentGrade; } public int GetInvestGold()//获取投资金额 { int InvestGold = 0; int type = BinningType; if (BinningDic.ContainsKey(type)) { InvestGold = BinningDic[type].Money; } return InvestGold; } public Dictionary<int, int> GetInfoSeriors() { Dictionary<int, int> dit = new Dictionary<int, int>(); int type = BinningType; if (InfoSeriorsTypeDic.ContainsKey(type)) { dit = InfoSeriorsTypeDic[type]; } return dit; } } System/Vip/FairyJadeInvestmentTipWin.cs
@@ -45,8 +45,9 @@ m_Text_2.text= VipInvestModel.GetInvestGold(3,1).ToString(); m_Text_3.text = VipInvestModel.GetInvestGold(3,2).ToString(); m_Text_4.text = VipInvestModel.GetInvestGold(3, 3).ToString(); m_AmountOfChoice_2.gameObject.SetActive(true); if (fairyJadeInvestmentModel.InvestGold >= VipInvestModel.GetInvestGold(3,0)) m_AmountOfChoice_2.gameObject.SetActive(true); int InvestGold = fairyJadeInvestmentModel.GetInvestGold(); if (InvestGold >= VipInvestModel.GetInvestGold(3,0)) { m_AmountOfChoice_1.gameObject.SetActive(false); } @@ -54,7 +55,7 @@ { m_AmountOfChoice_1.gameObject.SetActive(true); } if (fairyJadeInvestmentModel.InvestGold >= VipInvestModel.GetInvestGold(3,1)) if (InvestGold >= VipInvestModel.GetInvestGold(3,1)) { m_AmountOfChoice_2.gameObject.SetActive(false); } @@ -62,7 +63,7 @@ { m_AmountOfChoice_2.gameObject.SetActive(true); } if (fairyJadeInvestmentModel.InvestGold >= VipInvestModel.GetInvestGold(3, 2)) if (InvestGold >= VipInvestModel.GetInvestGold(3, 2)) { m_AmountOfChoice_3.gameObject.SetActive(false); } System/Vip/FairyJadeInvestmentWin.cs
@@ -37,6 +37,7 @@ [SerializeField] Image m_Image1; [SerializeField] Image m_Image2; [SerializeField] Image m_Image3; [SerializeField] Text m_LvText; public static event Action FairyJadeInvestmentRedPointEvent; #region Built-in private List<int> GearPositionList = new List<int>(); @@ -66,21 +67,24 @@ protected override void OnPreOpen() { if (fairyJadeInvestmentModel.InvestGold < fairyJadeInvestmentModel.RecordSelectNumberMax) fairyJadeInvestmentModel.BinningType = fairyJadeInvestmentModel.GetType(); SetText(); int InvestGold = fairyJadeInvestmentModel.GetInvestGold(); if (InvestGold < fairyJadeInvestmentModel.RecordSelectNumberMax) { if (fairyJadeInvestmentModel.InvestGold < VipInvestModel.GetInvestGold(3, 0)) if (InvestGold < VipInvestModel.GetInvestGold(3, 0)) { fairyJadeInvestmentModel.SelectNumber = VipInvestModel.GetInvestGold(3, 0); } else if (fairyJadeInvestmentModel.InvestGold < VipInvestModel.GetInvestGold(3, 1)) else if (InvestGold < VipInvestModel.GetInvestGold(3, 1)) { fairyJadeInvestmentModel.SelectNumber = VipInvestModel.GetInvestGold(3, 1); } else if (fairyJadeInvestmentModel.InvestGold < VipInvestModel.GetInvestGold(3, 2)) else if (InvestGold < VipInvestModel.GetInvestGold(3, 2)) { fairyJadeInvestmentModel.SelectNumber = VipInvestModel.GetInvestGold(3, 2); } else if (fairyJadeInvestmentModel.InvestGold < VipInvestModel.GetInvestGold(3, 3)) else if (InvestGold < VipInvestModel.GetInvestGold(3, 3)) { fairyJadeInvestmentModel.SelectNumber = VipInvestModel.GetInvestGold(3, 3); } @@ -91,33 +95,34 @@ fairyJadeInvestmentModel.SelectNumber = fairyJadeInvestmentModel.RecordSelectNumberMax; m_SelectButton.gameObject.SetActive(false); } if (fairyJadeInvestmentModel.InvestGold <= 0) if (InvestGold <= 0) { m_InvestmentText.text = Language.Get("FairyJadeInvestment_7"); } else { m_InvestmentText.text = string.Format(Language.Get("FairyJadeInvestment_8"), fairyJadeInvestmentModel.InvestGold); m_InvestmentText.text = string.Format(Language.Get("FairyJadeInvestment_8"), InvestGold); } if (fairyJadeInvestmentModel.InvestGold >= fairyJadeInvestmentModel.RecordSelectNumberMax) if (InvestGold >= fairyJadeInvestmentModel.RecordSelectNumberMax) { m_JadeText.gameObject.SetActive(false); } else { m_JadeText.gameObject.SetActive(true); m_JadeText.text = string.Format(Language.Get("FairyJadeInvestment_9"), fairyJadeInvestmentModel.SelectNumber - fairyJadeInvestmentModel.InvestGold); m_JadeText.text = string.Format(Language.Get("FairyJadeInvestment_9"), fairyJadeInvestmentModel.SelectNumber - InvestGold); } IsInvestment(); GetMoney(); SetIconKeyImage(); if (fairyJadeInvestmentModel.InvestGold >= fairyJadeInvestmentModel.RecordSelectNumberMax) if (InvestGold >= fairyJadeInvestmentModel.RecordSelectNumberMax) { m_TextNumber.text = fairyJadeInvestmentModel.RecordSelectNumberMax.ToString(); } else { m_TextNumber.text = (fairyJadeInvestmentModel.SelectNumber - fairyJadeInvestmentModel.InvestGold).ToString(); m_TextNumber.text = (fairyJadeInvestmentModel.SelectNumber - InvestGold).ToString(); } PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;//数据的刷新(h0418) FairyJadeInvestmentModel.FairyJadeInfoSeriorsUpdate += FairyJadeInfoSeriorsUpdate; @@ -150,23 +155,24 @@ private void SelectNumberRefresh() { if (fairyJadeInvestmentModel.InvestGold >= fairyJadeInvestmentModel.RecordSelectNumberMax) int InvestGold = fairyJadeInvestmentModel.GetInvestGold(); if (InvestGold >= fairyJadeInvestmentModel.RecordSelectNumberMax) { m_TextNumber.text = fairyJadeInvestmentModel.RecordSelectNumberMax.ToString(); } else { m_TextNumber.text = (fairyJadeInvestmentModel.SelectNumber - fairyJadeInvestmentModel.InvestGold).ToString(); m_TextNumber.text = (fairyJadeInvestmentModel.SelectNumber - InvestGold).ToString(); } SetIconKeyImage(); if (fairyJadeInvestmentModel.InvestGold >= fairyJadeInvestmentModel.RecordSelectNumberMax) if (InvestGold >= fairyJadeInvestmentModel.RecordSelectNumberMax) { m_JadeText.gameObject.SetActive(false); } else { m_JadeText.gameObject.SetActive(true); m_JadeText.text = string.Format(Language.Get("FairyJadeInvestment_9"), fairyJadeInvestmentModel.SelectNumber - fairyJadeInvestmentModel.InvestGold); m_JadeText.text = string.Format(Language.Get("FairyJadeInvestment_9"), fairyJadeInvestmentModel.SelectNumber - InvestGold); } m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见 } @@ -177,7 +183,8 @@ #endregion private void FairyJadeInfoSeriorsUpdate() { if (fairyJadeInvestmentModel.InvestGold < fairyJadeInvestmentModel.RecordSelectNumberMax) int InvestGold = fairyJadeInvestmentModel.GetInvestGold(); if (InvestGold < fairyJadeInvestmentModel.RecordSelectNumberMax) { fairyJadeInvestmentModel.SelectNumber = fairyJadeInvestmentModel.RecordSelectNumberMax; m_SelectButton.gameObject.SetActive(true); @@ -187,32 +194,33 @@ fairyJadeInvestmentModel.SelectNumber = fairyJadeInvestmentModel.RecordSelectNumberMax; m_SelectButton.gameObject.SetActive(false); } if (fairyJadeInvestmentModel.InvestGold <= 0) if (InvestGold <= 0) { m_InvestmentText.text = Language.Get("FairyJadeInvestment_7"); } else { m_InvestmentText.text = string.Format(Language.Get("FairyJadeInvestment_8"), fairyJadeInvestmentModel.InvestGold); m_InvestmentText.text = string.Format(Language.Get("FairyJadeInvestment_8"), InvestGold); } if (fairyJadeInvestmentModel.InvestGold >= fairyJadeInvestmentModel.RecordSelectNumberMax) if (InvestGold >= fairyJadeInvestmentModel.RecordSelectNumberMax) { m_JadeText.gameObject.SetActive(false); } else { m_JadeText.gameObject.SetActive(true); m_JadeText.text = string.Format(Language.Get("FairyJadeInvestment_9"), fairyJadeInvestmentModel.SelectNumber - fairyJadeInvestmentModel.InvestGold); m_JadeText.text = string.Format(Language.Get("FairyJadeInvestment_9"), fairyJadeInvestmentModel.SelectNumber - InvestGold); } if (fairyJadeInvestmentModel.InvestGold >= fairyJadeInvestmentModel.RecordSelectNumberMax) if (InvestGold >= fairyJadeInvestmentModel.RecordSelectNumberMax) { m_TextNumber.text = fairyJadeInvestmentModel.RecordSelectNumberMax.ToString(); } else { m_TextNumber.text = (fairyJadeInvestmentModel.SelectNumber - fairyJadeInvestmentModel.InvestGold).ToString(); m_TextNumber.text = (fairyJadeInvestmentModel.SelectNumber - InvestGold).ToString(); } SetIconKeyImage(); IsInvestment(); m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见 } @@ -220,7 +228,13 @@ void OnCreateGridLineCell(ScrollerController gridCtrl)//预制体创建 { gridCtrl.Refresh(); foreach (int key in fairyJadeInvestmentModel.FairyJadeInvestmentDic.Keys) int _type = fairyJadeInvestmentModel.BinningType; if (!fairyJadeInvestmentModel.FairyJadeInvestmentTypeDic.ContainsKey(_type)) { return; } var Dit = fairyJadeInvestmentModel.FairyJadeInvestmentTypeDic[_type]; foreach (int key in Dit.Keys) { gridCtrl.AddCell(ScrollerDataType.Header, key); } @@ -236,11 +250,12 @@ private void IsInvestment()//是否可投资 { if (fairyJadeInvestmentModel.InvestGold < fairyJadeInvestmentModel.RecordSelectNumberMax) int InvestGold = fairyJadeInvestmentModel.GetInvestGold(); if (InvestGold < fairyJadeInvestmentModel.RecordSelectNumberMax) { m_MaxInverstment.SetActive(false); if (fairyJadeInvestmentModel.InvestGold > 0) if (InvestGold > 0) { m_Image_AD.SetSprite("XT_VIP_106"); m_InvestmentButton.gameObject.SetActive(false); @@ -264,14 +279,15 @@ private void InvestmentButton()//仙玉投资 { if (PlayerDatas.Instance.baseData.LV > 300) int InvestGold = fairyJadeInvestmentModel.GetInvestGold(); //if (PlayerDatas.Instance.baseData.LV > 300) //{ // MessageWin.Inst.ShowFixedTip(Language.Get("HasExceededTheInvestmentGrade_Z")); // return; //} if (InvestGold > 0) { MessageWin.Inst.ShowFixedTip(Language.Get("HasExceededTheInvestmentGrade_Z")); return; } if (fairyJadeInvestmentModel.InvestGold > 0) { ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), string.Format(Language.Get("FairyJadeInvestment_2"), fairyJadeInvestmentModel.SelectNumber - fairyJadeInvestmentModel.InvestGold), (bool isOk) => ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), string.Format(Language.Get("FairyJadeInvestment_2"), fairyJadeInvestmentModel.SelectNumber - InvestGold), (bool isOk) => { if (isOk) { @@ -293,9 +309,10 @@ private void RealizedInvestment_Button()//追加投资按钮 { if (fairyJadeInvestmentModel.InvestGold > 0) int InvestGold = fairyJadeInvestmentModel.GetInvestGold(); if (InvestGold > 0) { ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), string.Format(Language.Get("FairyJadeInvestment_2"), fairyJadeInvestmentModel.SelectNumber - fairyJadeInvestmentModel.InvestGold), (bool isOk) => ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), string.Format(Language.Get("FairyJadeInvestment_2"), fairyJadeInvestmentModel.SelectNumber - InvestGold), (bool isOk) => { if (isOk) { @@ -319,10 +336,12 @@ private void ConsumeFairyJade(int fairyJade) { int InvestGold = fairyJadeInvestmentModel.GetInvestGold(); int getFairyJade = (int)UIHelper.GetMoneyCnt(1); if (getFairyJade >= (fairyJade - fairyJadeInvestmentModel.InvestGold)) if (getFairyJade >= (fairyJade - InvestGold)) { fairyJadeInvestmentModel.InvestmentMonthlyInvestment(3, fairyJade); int type = fairyJadeInvestmentModel.BinningType; fairyJadeInvestmentModel.InvestmentMonthlyInvestment(type, fairyJade); } else { @@ -356,23 +375,45 @@ } } private void SetText() { int Type= fairyJadeInvestmentModel.BinningType; switch (Type) { case 3: m_LvText.text = Language.Get("FairyJade_T1"); break; case 4: m_LvText.text = Language.Get("FairyJade_T2"); break; case 5: m_LvText.text = Language.Get("FairyJade_T3"); break; } } private void SetIconKeyImage() { var money = fairyJadeInvestmentModel.SelectNumber; if (fairyJadeInvestmentModel.InvestmentAmountDic.ContainsKey(money)) int ype = fairyJadeInvestmentModel.BinningType; if (fairyJadeInvestmentModel.InvestmentAmountTypeDic.ContainsKey(ype)) { var type = fairyJadeInvestmentModel.InvestmentAmountDic[money]; if (GearPositionList.Contains(type)) var dit = fairyJadeInvestmentModel.InvestmentAmountTypeDic[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(); } } } } }