Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | { |
| | | 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); |
| | |
| | | } |
| | | |
| | | [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 { |
| | |
| | | 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)); |
| | | |
| | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to FairyJadeInvestmentModel.GetInfoSeriors!"); |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | [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); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | [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 { |
| | |
| | | } |
| | | |
| | | [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); |
| | | } |
| | |
| | | } |
| | | |
| | | [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); |
| | | } |
| | |
| | | } |
| | | |
| | | [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); |
| | | } |
| | |
| | | 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); |
| | | } |
| | |
| | | |
| | | 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); |
| | | } |
| | |
| | | |
| | | |
| | | [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 { |
| | |
| | | } |
| | | |
| | | [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); |
| | |
| | | } |
| | | |
| | | [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); |
| | |
| | | } |
| | | |
| | | [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); |
| | |
| | | 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); |
| | |
| | | } |
| | | |
| | | [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 { |
| | |
| | | if(itemModels != null && itemModels.Count > 0)
|
| | | {
|
| | | var itemModel = itemModels[0];
|
| | | OnGetPreciousItem(PackType.rptItem,itemModel.itemInfo.ItemGUID);
|
| | | bool isHaveMakeNum = PackSendQuestMgr.Instance.IsHaveMakeNumber(itemModel.itemInfo.ItemPlace);
|
| | | if(isHaveMakeNum)
|
| | | {
|
| | | OnGetPreciousItem(PackType.rptItem, itemModel.itemInfo.ItemGUID);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | if (NewBieCenter.Instance.inGuiding || !CrossServerOneVsOnePKSeason.Instance.isSatisfyMatch) return false;
|
| | | int remainNum = CrossServerOneVsOnePlayerInfo.Instance.GetDayRemainNum();
|
| | | if (remainNum > 0) return false;
|
| | |
|
| | | return true;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | private void DisplayChannel()
|
| | | {
|
| | | if (m_ChannelControl.GetNumberOfCells(m_ChannelControl.m_Scorller) == 0)
|
| | | m_ChannelControl.Refresh();
|
| | | for (int i = 0; i < chatCenter.chatChannels.Count; i++)
|
| | | {
|
| | | m_ChannelControl.Refresh();
|
| | | for (int i = 0; i < chatCenter.chatChannels.Count; i++)
|
| | | if (IsSatisfyShowChannel(chatCenter.chatChannels[i]))
|
| | | {
|
| | | if (IsSatisfyShowChannel(chatCenter.chatChannels[i]))
|
| | | {
|
| | | m_ChannelControl.AddCell(ScrollerDataType.Normal, (int)chatCenter.chatChannels[i], OnChannelSelect);
|
| | | }
|
| | | m_ChannelControl.AddCell(ScrollerDataType.Normal, (int)chatCenter.chatChannels[i], OnChannelSelect);
|
| | | }
|
| | | m_ChannelControl.Restart();
|
| | | }
|
| | | else
|
| | | {
|
| | | m_ChannelControl.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | | m_ChannelControl.Restart();
|
| | | }
|
| | |
|
| | | private bool IsSatisfyShowChannel(ChatInfoType channel)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (model.jumpFashionDress == 0)
|
| | | {
|
| | | if (model.levelUpRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | model.jumpFashionDress = model.fashionDressRedpointId;
|
| | | }
|
| | | }
|
| | |
|
| | | if (model.jumpFashionDress != 0)
|
| | | {
|
| | | FashionDress fashionDress;
|
| | |
| | | }
|
| | | break;
|
| | | case 127:
|
| | | bool isHaveMakeNum = PackSendQuestMgr.Instance.IsHaveMakeNumber(itemModel.itemInfo.ItemPlace);
|
| | | int remainNum = CrossServerOneVsOnePlayerInfo.Instance.GetDayRemainNum();
|
| | | if (!CrossServerOneVsOnePKSeason.Instance.isSatisfyMatch
|
| | | || remainNum > 0)
|
| | | || remainNum > 0
|
| | | || !isHaveMakeNum)
|
| | | {
|
| | | isReach = false;
|
| | | return isReach;
|
| | |
| | | {
|
| | | if (itemTipsModel.jumpAndUseTypes[i] == useItemModel.chinItemModel.Type)
|
| | | {
|
| | | CheckUseCondition(useItemModel);
|
| | | if (useItemModel.chinItemModel.Jump != 0)
|
| | | bool isMakeUse = CheckUseCondition(useItemModel);
|
| | | if(isMakeUse && IsHaveMakeNumber(useItemModel.itemInfo.ItemPlace))
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)useItemModel.chinItemModel.Jump);
|
| | | if (useItemModel.chinItemModel.Jump != 0)
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)useItemModel.chinItemModel.Jump);
|
| | | }
|
| | | }
|
| | | return;
|
| | | }
|
| | |
| | | return true;
|
| | | }
|
| | |
|
| | | public void CheckUseCondition(ItemModel itemModel)
|
| | | public bool CheckUseCondition(ItemModel itemModel)
|
| | | {
|
| | | if(!CheckItemUselimit(itemModel.chinItemModel))
|
| | | {
|
| | | return;
|
| | | return false;
|
| | | }
|
| | |
|
| | | if(itemModel.chinItemModel.Type == 59)
|
| | | {
|
| | | playerPack.SetWashAttrPointModel(itemModel.itemInfo.ItemGUID);
|
| | | WindowCenter.Instance.Open<WashAttrPointWin>();
|
| | | return;
|
| | | return true;
|
| | | }
|
| | |
|
| | | if (itemModel.chinItemModel.Effect1 == 209
|
| | | && !PlayerDatas.Instance.fairyData.HasFairy)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("jiazu_andyshao_0");
|
| | | return;
|
| | | return false;
|
| | | }
|
| | |
|
| | | if(itemModel.itemId == 952)
|
| | |
| | | {
|
| | | SendMakeUseQuest(itemModel.itemInfo.ItemPlace);
|
| | | }
|
| | | else
|
| | | {
|
| | | return false;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | BatchUseModel.Instance.SetOfflineUseModel(itemModel.itemInfo.ItemGUID);
|
| | | WindowCenter.Instance.Open<OfflineHangUpUseWin>();
|
| | | }
|
| | | return;
|
| | | return true;
|
| | | }
|
| | |
|
| | | if (itemModel.itemInfo.ItemID == fairyModel.changeFairyNameItem)
|
| | |
| | | if (PlayerDatas.Instance.fairyData.HasFairy)
|
| | | {
|
| | | WindowCenter.Instance.Open<FamilyChangeNameWin>();
|
| | | return true;
|
| | | }
|
| | | else
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("jiazu_andyshao_0");
|
| | | return false;
|
| | | }
|
| | | return;
|
| | | |
| | | }
|
| | |
|
| | | if(dogzModel.AddAssistItem == itemModel.itemInfo.ItemID)
|
| | | {
|
| | | dogzModel.MakeUseAddAssistNum();
|
| | | return;
|
| | | return true;
|
| | | }
|
| | |
|
| | | ulong maxValue = 0;
|
| | |
| | | {
|
| | | SendMakeUseQuest(itemModel.itemInfo.ItemPlace);
|
| | | }
|
| | | else
|
| | | {
|
| | | return false;
|
| | | }
|
| | | break;
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | return true;
|
| | | }
|
| | | public int GetOfflineMaxNum(ItemModel itemModel)
|
| | | {
|
| | |
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public void SendMakeUseQuest(int index, int useCnt = 1, int extra = 0)
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptItem,index);
|
| | |
| | | SendMainServerMakeUseItem(index, useCnt, extra);
|
| | | }
|
| | |
|
| | | public bool IsHaveMakeNumber(int index,int useCnt = 1)
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptItem, index);
|
| | | if (itemModel == null) return false;
|
| | |
|
| | | int haveUseCnt = playerPack.GetDayUseCntByID(itemModel.itemInfo.ItemID);
|
| | | if (itemModel.chinItemModel.MaxSkillCnt > 0 && itemModel.chinItemModel.MaxSkillCnt <= haveUseCnt)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | int sumHaveUseCnt = playerPack.GetSumUseCntByID(itemModel.itemInfo.ItemID);
|
| | | AttrFruitConfig fruitConfig = Config.Instance.Get<AttrFruitConfig>(itemModel.itemInfo.ItemID);
|
| | | if (fruitConfig != null |
| | | && (sumHaveUseCnt >= fruitConfig.MaxUseCnt
|
| | | || useCnt > fruitConfig.MaxUseCnt))
|
| | | {
|
| | | return false;
|
| | | }
|
| | | return true;
|
| | | }
|
| | |
|
| | | public void SendMainServerMakeUseItem(int index,int useCnt,int extra)
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptItem, index);
|
| | |
| | | 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;
|
| | | }
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | //if (GroupTopIndexList.Contains(highBtnRecord.Index))
|
| | | //{
|
| | | // if (ModelCenter.Instance.GetModel<OSGiftModel>().activate)//超值礼包
|
| | | // {
|
| | | // if (!AnimationFadeOutDicTop.ContainsKey(highBtnRecord.Index))
|
| | | // {
|
| | | // SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | // selectCaseRequest.Tran = m_GroupIndex_Top.GetChild(i);
|
| | | // selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | // AnimationFadeOutDicTop.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | // }
|
| | | // }
|
| | | //}
|
| | | if (GroupTopIndexList.Contains(highBtnRecord.Index))
|
| | | {
|
| | | int IndexOf = GroupTopIndexList.IndexOf(highBtnRecord.Index);
|
| | | if (IndexOf == 0)
|
| | | {
|
| | | if (crossServerRewardModel.IsShowCrossServerOneVsOne())//跨服
|
| | | {
|
| | | SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | selectCaseRequest.Tran = m_GroupIndex_Top.GetChild(i);
|
| | | selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | selectCaseRequest.Index = highBtnRecord.Index;
|
| | | AnimationFadeOutDicTop.Add(highBtnRecord.Index, selectCaseRequest);
|
| | |
|
| | | }
|
| | | }
|
| | | // if (ModelCenter.Instance.GetModel<OSGiftModel>().activate)//超值礼包
|
| | | //{
|
| | | // if (!AnimationFadeOutDicTop.ContainsKey(highBtnRecord.Index))
|
| | | // {
|
| | | // SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | // selectCaseRequest.Tran = m_GroupIndex_Top.GetChild(i);
|
| | | // selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | // AnimationFadeOutDicTop.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | // }
|
| | | //}
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | }
|
| | | else if (IndexOf == 1)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | }
|
| | | else if (IndexOf == 2)
|
| | | {
|
| | | if (crossServerRewardModel.IsShowCrossServerOneVsOne())//跨服
|
| | | {
|
| | | if (AnimationFadeOutDicLow.Count < 6)//------第二层
|
| | | {
|
| | | SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
|
| | | selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | selectCaseRequest.Index = highBtnRecord.Index;
|
| | | AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | }
|
| | | else//------第三层
|
| | | {
|
| | | SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
|
| | | selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | selectCaseRequest.Index = highBtnRecord.Index;
|
| | | AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | | else if (IndexOf == 3)
|
| | | {
|
| | | if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && limitedTimePackageItemModel.IsExpired())//限时礼包
|
| | | {
|
| | | if (AnimationFadeOutDicLow.Count < 6)//------第二层
|
| | | {
|
| | | SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
|
| | | selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | selectCaseRequest.Index = highBtnRecord.Index;
|
| | | AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | }
|
| | | else//------第三层
|
| | | {
|
| | | SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
|
| | | selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | selectCaseRequest.Index = highBtnRecord.Index;
|
| | | AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | }
|
| | |
|
| | | }
|
| | | |
| | | }
|
| | | else if (IndexOf == 4)
|
| | | {
|
| | | bool Isopen = OpenServerActivityCenter.Instance.IsActivityOpen(4);
|
| | | if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//限时特惠
|
| | | {
|
| | | if (AnimationFadeOutDicLow.Count < 6)//------第二层
|
| | | {
|
| | | SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
|
| | | selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | selectCaseRequest.Index = highBtnRecord.Index;
|
| | | AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | }
|
| | | else//------第三层
|
| | | {
|
| | | SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
|
| | | selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | selectCaseRequest.Index = highBtnRecord.Index;
|
| | | AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | | else if (IndexOf == 5)
|
| | | {
|
| | | bool Isopen = OpenServerActivityCenter.Instance.IsActivityOpen(14);
|
| | | if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//限时抢购
|
| | | {
|
| | | if (AnimationFadeOutDicLow.Count < 6)//------第二层
|
| | | {
|
| | | SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
|
| | | selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | selectCaseRequest.Index = highBtnRecord.Index;
|
| | | AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | }
|
| | | else//------第三层
|
| | | {
|
| | | SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
|
| | | selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | selectCaseRequest.Index = highBtnRecord.Index;
|
| | | AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | else if (IndexOf == 6)
|
| | | {
|
| | | bool Isopen = impactRankModel.IsInImpactRank;
|
| | | if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//全民冲榜
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | else if (IndexOf == 7)
|
| | | else if (IndexOf == 3)
|
| | | {
|
| | | bool Isopen = OpenServerModel.IsOpen;
|
| | | if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//7天寻礼
|
| | |
| | | AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | | else if (IndexOf == 4)
|
| | | {
|
| | | bool Isopen = OpenServerActivityCenter.Instance.IsActivityOpen(14);
|
| | | if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//限时抢购
|
| | | {
|
| | | if (AnimationFadeOutDicLow.Count < 6)//------第二层
|
| | | {
|
| | | SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
|
| | | selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | selectCaseRequest.Index = highBtnRecord.Index;
|
| | | AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | }
|
| | | else//------第三层
|
| | | {
|
| | | SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
|
| | | selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | selectCaseRequest.Index = highBtnRecord.Index;
|
| | | AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | | else if (IndexOf == 5)
|
| | | {
|
| | | if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && limitedTimePackageItemModel.IsExpired())//限时礼包
|
| | | {
|
| | | if (AnimationFadeOutDicLow.Count < 6)//------第二层
|
| | | {
|
| | | SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
|
| | | selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | selectCaseRequest.Index = highBtnRecord.Index;
|
| | | AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | }
|
| | | else//------第三层
|
| | | {
|
| | | SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
|
| | | selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | selectCaseRequest.Index = highBtnRecord.Index;
|
| | | AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | | else if (IndexOf == 6)
|
| | | {
|
| | | bool Isopen = OpenServerActivityCenter.Instance.IsActivityOpen(4);
|
| | | if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//限时特惠
|
| | | {
|
| | | if (AnimationFadeOutDicLow.Count < 6)//------第二层
|
| | | {
|
| | | SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
|
| | | selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | selectCaseRequest.Index = highBtnRecord.Index;
|
| | | AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | }
|
| | | else//------第三层
|
| | | {
|
| | | SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
|
| | | selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | selectCaseRequest.Index = highBtnRecord.Index;
|
| | | AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | }
|
| | | }
|
| | | }
|
| | | //else if (IndexOf == 7)
|
| | | //{
|
| | |
|
| | | //}
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | m_One.SetActive(true);
|
| | | m_Two.SetActive(false);
|
| | | m_OpenServiceItemA.SetReward(model.SelectedNow, ItemDayList[0], 0, 2);
|
| | | m_OpenServiceItemA.SetReward(model.SelectedNow, ItemDayList[0], 0, 1);
|
| | | }
|
| | | } |
| | | |
| | |
| | | realmPoint.ToString()), "/", config.NeedPoint);
|
| | |
|
| | | m_OpenRemind.text = realmPoint < config.NeedPoint ?
|
| | | UIHelper.ReplaceNewLine(Language.Get("RealmCollecting", config.NeedPoint - realmPoint)) : string.Empty;
|
| | | UIHelper.ReplaceNewLine(Language.Get("RealmCollectingTab", config.NeedPoint - realmPoint)) : string.Empty;
|
| | | m_OpenRemind.transform.localPosition = m_OpenRemind.transform.localPosition.SetX(m_ContainerPoint.rect.width * (leftRatio + deltaRatio * 0.5f));
|
| | | }
|
| | |
|
| | |
| | |
|
| | | 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)
|
| | | {
|
| | |
| | | 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);
|
| | |
| | | }
|
| | | 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);
|
| | |
| | | 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;
|
| | | }
|
| | |
| | | m_ReceiveAwardBtn.RemoveAllListeners();
|
| | | m_ReceiveAwardBtn.AddListener(() =>
|
| | | {
|
| | | fairyJadeInvestmentModel.SendInvestment(3, indexID);
|
| | | int type = fairyJadeInvestmentModel.BinningType;
|
| | | fairyJadeInvestmentModel.SendInvestment(type, indexID);
|
| | | });
|
| | | }
|
| | | else
|
| | |
| | |
|
| | | 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)
|
| | | {
|
| | |
| | |
|
| | | 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)
|
| | |
| | | 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;
|
| | | }
|
| | |
| | | {
|
| | | 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;
|
| | |
| | | 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;
|
| | | }
|
| | |
| | | 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;
|
| | | }
|
| | |
| | | }
|
| | | return GetValue;
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | using Snxxz.UI;
|
| | | using System.Linq;
|
| | | //仙玉投资
|
| | | public class BinningClass
|
| | | {
|
| | | public int Money;//金额
|
| | | public int Binning;//
|
| | |
|
| | | }
|
| | | public class FairyJadeInvestmentClass
|
| | | {
|
| | | public int ID;//ID
|
| | |
| | | [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
|
| | | {
|
| | |
| | | private bool IsOpenFeatures()//功能是否开启
|
| | | {
|
| | | bool isOpen = false;
|
| | | int InvestmentGrade = GetInvestmentGrade();
|
| | | if (InvestmentGrade > 0 && InvestmentGrade < 4)
|
| | | {
|
| | | isOpen = true;
|
| | |
| | | {
|
| | | 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;
|
| | | }
|
| | |
| | | {
|
| | | 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();
|
| | |
|
| | | }
|
| | |
| | | {
|
| | | IsOk = true;
|
| | | InvestmentAmount();
|
| | | BinningType = GetType();
|
| | | InvestmentRedPoint();
|
| | | IsShowRedPointSimple();
|
| | | IsShowRedPointSimple(); |
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;
|
| | | FairyJadeInvestmentWin.FairyJadeInvestmentRedPointEvent -= FairyJadeInvestmentRedPoint;
|
| | |
| | |
|
| | | private void Updatefighting(PlayerDataRefresh _tCDBPlayerRefresh)
|
| | | {
|
| | | int InvestGold = GetInvestGold();
|
| | | if (_tCDBPlayerRefresh == PlayerDataRefresh.LV && InvestGold > 0)
|
| | | {
|
| | | InvestmentRedPoint();
|
| | |
| | |
|
| | | }
|
| | |
|
| | | public void AssignmentType()
|
| | | private void AssignmentType()
|
| | | {
|
| | | //根据投资类型来存储奖励信息(类型3,4,5)
|
| | | if (FairyJadeInvestmentTypeDic.Count >= 3)
|
| | |
| | | {
|
| | | 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)
|
| | |
| | | {
|
| | | 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;
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | // 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();
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | 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;
|
| | |
| | | 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;
|
| | |
| | | }
|
| | | 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;
|
| | | }
|
| | |
| | | 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)
|
| | |
| | | }
|
| | | private void RedPointSate()//月卡投资创角前三天红点
|
| | | {
|
| | | int InvestGold = GetInvestGold();
|
| | | if (InvestGold > 0)
|
| | | {
|
| | | return;
|
| | |
| | | public void MessageNotification()
|
| | | {
|
| | | var _funcOrder = 0;
|
| | | int InvestmentGrade = GetInvestmentGrade();
|
| | | if (!OpenServerActivityCenter.Instance.IsAnyActivityOpen(out _funcOrder))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("JadeInvestmentLimit1");//信息提示
|
| | |
| | | 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;
|
| | | }
|
| | |
| | | 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;
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
| | | 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); |
| | | } |
| | |
| | | { |
| | | 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); |
| | | } |
| | |
| | | { |
| | | 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); |
| | | } |
| | |
| | | [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>();
|
| | |
| | |
|
| | | 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);
|
| | | }
|
| | |
| | | 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;
|
| | |
| | |
|
| | | 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();//刷新可见
|
| | | }
|
| | |
| | | #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);
|
| | |
| | | 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();//刷新可见
|
| | | }
|
| | |
| | | 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);
|
| | | }
|
| | |
| | |
|
| | | 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);
|
| | |
| | |
|
| | | 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)
|
| | | {
|
| | |
| | |
|
| | | 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)
|
| | | {
|
| | |
| | |
|
| | | 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
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | 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();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | }
|