| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(AssetBundleUtility); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 14, 2, 0); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 13, 2, 0); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitBuiltInAsset", _m_InitBuiltInAsset); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ReInitBuiltInAsset", _m_ReInitBuiltInAsset); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Initialize", _m_Initialize); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitalizeUIResources", _m_InitalizeUIResources); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetAssetBundleInfo", _m_GetAssetBundleInfo); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Co_LoadAsset", _m_Co_LoadAsset); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Sync_LoadAll", _m_Sync_LoadAll); |
| | |
| | | System.Collections.IEnumerator gen_ret = gen_to_be_invoked.Initialize( ); |
| | | translator.PushAny(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_InitalizeUIResources(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | AssetBundleUtility gen_to_be_invoked = (AssetBundleUtility)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | |
| | | return 1; |
| | |
| | | |
| | | if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) |
| | | { |
| | | int _npcID = LuaAPI.xlua_tointeger(L, 2); |
| | | int _sid = LuaAPI.xlua_tointeger(L, 3); |
| | | int __npcID = LuaAPI.xlua_tointeger(L, 2); |
| | | int __sid = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | gen_to_be_invoked.MoveToNPC( _npcID, _sid ); |
| | | gen_to_be_invoked.MoveToNPC( __npcID, __sid ); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) |
| | | { |
| | | int _npcID = LuaAPI.xlua_tointeger(L, 2); |
| | | int __npcID = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | gen_to_be_invoked.MoveToNPC( _npcID ); |
| | | gen_to_be_invoked.MoveToNPC( __npcID ); |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.BuySuccessModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 1, 3, 0); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 1, 2, 0); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetBuySuccessModel", _m_SetBuySuccessModel); |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "ItemID", _g_get_ItemID); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "itemCnt", _g_get_itemCnt); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsBind", _g_get_IsBind); |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | int _itemId = LuaAPI.xlua_tointeger(L, 2); |
| | | int _count = LuaAPI.xlua_tointeger(L, 3); |
| | | int _isBind = LuaAPI.xlua_tointeger(L, 4); |
| | | |
| | | gen_to_be_invoked.SetBuySuccessModel( _itemId, _count, _isBind ); |
| | | gen_to_be_invoked.SetBuySuccessModel( _itemId, _count ); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | Snxxz.UI.BuySuccessModel gen_to_be_invoked = (Snxxz.UI.BuySuccessModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.itemCnt); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_IsBind(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.BuySuccessModel gen_to_be_invoked = (Snxxz.UI.BuySuccessModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.IsBind); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.EquipModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 21, 8, 2); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 22, 8, 2); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "CompareToCurrent", _m_CompareToCurrent); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetEquipSuitEntry", _m_GetEquipSuitEntry); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "appearanceChangeEvent", _e_appearanceChangeEvent); |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "showedUnLockLevel", _g_get_showedUnLockLevel); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "showedUnLockSlot", _g_get_showedUnLockSlot); |
| | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _e_appearanceChangeEvent(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); |
| | | System.Action gen_delegate = translator.GetDelegate<System.Action>(L, 3); |
| | | if (gen_delegate == null) { |
| | | return LuaAPI.luaL_error(L, "#3 need System.Action!"); |
| | | } |
| | | |
| | | if (gen_param_count == 3) |
| | | { |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { |
| | | gen_to_be_invoked.appearanceChangeEvent += gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { |
| | | gen_to_be_invoked.appearanceChangeEvent -= gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | } |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.EquipModel.appearanceChangeEvent!"); |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "crystalPosList", _g_get_crystalPosList); |
| | | |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "integralRankAwardDict", _s_set_integralRankAwardDict); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "finalWarWinAwardDict", _s_set_finalWarWinAwardDict); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "finalWarChampionWinAwardDict", _s_set_finalWarChampionWinAwardDict); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "finalWarDefeatAwardDict", _s_set_finalWarDefeatAwardDict); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "finalWarChampionDefeatAwardDict", _s_set_finalWarChampionDefeatAwardDict); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "fairyLeagueResults", _s_set_fairyLeagueResults); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "crystalPosList", _s_set_crystalPosList); |
| | | |
| | |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_finalWarWinAwardDict(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.FairyLeagueModel gen_to_be_invoked = (Snxxz.UI.FairyLeagueModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.finalWarWinAwardDict = (System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<Snxxz.UI.Item>>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<Snxxz.UI.Item>>)); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_finalWarChampionWinAwardDict(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.FairyLeagueModel gen_to_be_invoked = (Snxxz.UI.FairyLeagueModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.finalWarChampionWinAwardDict = (System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<Snxxz.UI.Item>>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<Snxxz.UI.Item>>)); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_finalWarDefeatAwardDict(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.FairyLeagueModel gen_to_be_invoked = (Snxxz.UI.FairyLeagueModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.finalWarDefeatAwardDict = (System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<Snxxz.UI.Item>>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<Snxxz.UI.Item>>)); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_finalWarChampionDefeatAwardDict(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.FairyLeagueModel gen_to_be_invoked = (Snxxz.UI.FairyLeagueModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.finalWarChampionDefeatAwardDict = (System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<Snxxz.UI.Item>>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<Snxxz.UI.Item>>)); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_fairyLeagueResults(RealStatePtr L) |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.ItemBehaviour); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 3, 11, 1); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 3, 8, 1); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetItem", _m_SetItem); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetCount", _m_SetCount); |
| | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "backGround", _g_get_backGround); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "countContainer", _g_get_countContainer); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "count", _g_get_count); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "bind", _g_get_bind); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "stars", _g_get_stars); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "showCount", _g_get_showCount); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "itemId", _g_get_itemId); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "itemCount", _g_get_itemCount); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "itemBind", _g_get_itemBind); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "itemQuality", _g_get_itemQuality); |
| | | |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "showCount", _s_set_showCount); |
| | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 5&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5)) |
| | | if(gen_param_count == 4&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4)) |
| | | { |
| | | int __id = LuaAPI.xlua_tointeger(L, 2); |
| | | int __count = LuaAPI.xlua_tointeger(L, 3); |
| | | bool __bind = LuaAPI.lua_toboolean(L, 4); |
| | | int __quality = LuaAPI.xlua_tointeger(L, 5); |
| | | int __quality = LuaAPI.xlua_tointeger(L, 4); |
| | | |
| | | gen_to_be_invoked.SetItem( __id, __count, __bind, __quality ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | if(gen_param_count == 4&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4)) |
| | | { |
| | | int __id = LuaAPI.xlua_tointeger(L, 2); |
| | | int __count = LuaAPI.xlua_tointeger(L, 3); |
| | | bool __bind = LuaAPI.lua_toboolean(L, 4); |
| | | |
| | | gen_to_be_invoked.SetItem( __id, __count, __bind ); |
| | | gen_to_be_invoked.SetItem( __id, __count, __quality ); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_bind(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.bind); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_stars(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.stars); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_showCount(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | |
| | | Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.itemCount); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_itemBind(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushboolean(L, gen_to_be_invoked.itemBind); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 97a6c0918cdc73b4b9374777b5fa0bad |
| | | timeCreated: 1550120583 |
| | | timeCreated: 1552492007 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.ItemTipsModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 56, 30, 1); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 55, 30, 1); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBeforePlayerDataInitialize", _m_OnBeforePlayerDataInitialize); |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetWingsRefineMatStr", _m_GetWingsRefineMatStr); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetWashAttr", _m_GetWashAttr); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetExhaustedAtrr", _m_GetExhaustedAtrr); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetEquipExhaustedAtrr", _m_GetEquipExhaustedAtrr); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetExhaustedMaxLv", _m_GetExhaustedMaxLv); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetProValueTypeStr", _m_GetProValueTypeStr); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetItemEffectDict", _m_SetItemEffectDict); |
| | |
| | | LuaAPI.lua_pushstring(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_GetEquipExhaustedAtrr(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.ItemTipsModel gen_to_be_invoked = (Snxxz.UI.ItemTipsModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | System.Collections.Generic.List<int> _idlist = (System.Collections.Generic.List<int>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<int>)); |
| | | System.Collections.Generic.List<int> _valuelist = (System.Collections.Generic.List<int>)translator.GetObject(L, 3, typeof(System.Collections.Generic.List<int>)); |
| | | |
| | | return 1; |
| | | } |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetVipTitle", _m_GetVipTitle); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTitlePower", _m_GetTitlePower); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetCTGConfigs", _m_GetCTGConfigs); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetRechargeItem", _m_TryGetRechargeItem); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetFirstReward", _m_TryGetFirstReward); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateVipGift", _m_UpdateVipGift); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateVipExp", _m_UpdateVipExp); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateVipTime", _m_UpdateVipTime); |
| | |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_TryGetRechargeItem(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.VipModel gen_to_be_invoked = (Snxxz.UI.VipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _id = LuaAPI.xlua_tointeger(L, 2); |
| | | System.Collections.Generic.List<Snxxz.UI.Item> _list; |
| | | |
| | | bool gen_ret = gen_to_be_invoked.TryGetRechargeItem( _id, out _list ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | translator.Push(L, _list); |
| | | |
| | | |
| | | |
| | | |
| | | return 2; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_TryGetFirstReward(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.VipModel gen_to_be_invoked = (Snxxz.UI.VipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int __job = LuaAPI.xlua_tointeger(L, 2); |
| | | System.Collections.Generic.List<Snxxz.UI.Item> __list; |
| | | |
| | | bool gen_ret = gen_to_be_invoked.TryGetFirstReward( __job, out __list ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | translator.Push(L, __list); |
| | | |
| | | |
| | | |
| | | |
| | | return 2; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_UpdateVipGift(RealStatePtr L) |
| | |
| | | Utils.EndObjectRegister(type, L, translator, null, null, |
| | | null, null, null); |
| | | |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 65, 0, 0); |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 66, 0, 0); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetSuitNameByName", _m_GetSuitNameByName_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetSurplusSeconds", _m_GetSurplusSeconds_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetTime", _m_GetTime_xlua_st_); |
| | |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetDanLVColor", _m_GetDanLVColor_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "AppendDanLVNameColor", _m_AppendDanLVNameColor_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetUIColor", _m_GetUIColor_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "AppendStringColor", _m_AppendStringColor_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "AppendColor", _m_AppendColor_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetRealmName", _m_GetRealmName_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetRealmColorByLv", _m_GetRealmColorByLv_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "AppendStringColor", _m_AppendStringColor_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetItemColor", _m_GetItemColor_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetFightPower", _m_GetFightPower_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetFightPowerParmByAttrId", _m_GetFightPowerParmByAttrId_xlua_st_); |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_AppendStringColor_xlua_st_(RealStatePtr L) |
| | | static int _m_AppendColor_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3)) |
| | | { |
| | | int _itemColor = LuaAPI.xlua_tointeger(L, 1); |
| | | string _msg = LuaAPI.lua_tostring(L, 2); |
| | | bool _bright = LuaAPI.lua_toboolean(L, 3); |
| | | |
| | | string gen_ret = UIHelper.AppendStringColor( _itemColor, _msg, _bright ); |
| | | LuaAPI.lua_pushstring(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) |
| | | { |
| | | int _itemColor = LuaAPI.xlua_tointeger(L, 1); |
| | | string _msg = LuaAPI.lua_tostring(L, 2); |
| | | |
| | | string gen_ret = UIHelper.AppendStringColor( _itemColor, _msg ); |
| | | LuaAPI.lua_pushstring(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | if(gen_param_count == 3&& translator.Assignable<TextColType>(L, 1)&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3)) |
| | | { |
| | | TextColType _type;translator.Get(L, 1, out _type); |
| | |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to UIHelper.AppendStringColor!"); |
| | | return LuaAPI.luaL_error(L, "invalid arguments to UIHelper.AppendColor!"); |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_AppendStringColor_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3)) |
| | | { |
| | | int _itemColor = LuaAPI.xlua_tointeger(L, 1); |
| | | string _msg = LuaAPI.lua_tostring(L, 2); |
| | | bool _bright = LuaAPI.lua_toboolean(L, 3); |
| | | |
| | | string gen_ret = UIHelper.AppendStringColor( _itemColor, _msg, _bright ); |
| | | LuaAPI.lua_pushstring(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) |
| | | { |
| | | int _itemColor = LuaAPI.xlua_tointeger(L, 1); |
| | | string _msg = LuaAPI.lua_tostring(L, 2); |
| | | |
| | | string gen_ret = UIHelper.AppendStringColor( _itemColor, _msg ); |
| | | LuaAPI.lua_pushstring(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to UIHelper.AppendStringColor!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetItemColor_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ff2dde43802d1d14795873c131842a1e |
| | | timeCreated: 1552375168 |
| | | timeCreated: 1552492007 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | activityItemCells[i].gameObject.SetActive(true);
|
| | | ItemCell itemCell = activityItemCells[i];
|
| | | ServerItem serverItem = actiivityItems[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(serverItem.ItemID, false, (ulong)serverItem.Count, serverItem.IsBind
|
| | | ItemCellModel cellModel = new ItemCellModel(serverItem.ItemID, false, (ulong)serverItem.Count
|
| | | , "", PackType.Deleted, false, ConfigParse.Analysis(serverItem.UserData));
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | |
| | | achieveItemCells[i].gameObject.SetActive(true);
|
| | | ItemCell itemCell = achieveItemCells[i];
|
| | | ServerItem serverItem = achieveItems[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(serverItem.ItemID, false, (ulong)serverItem.Count, serverItem.IsBind
|
| | | , "", PackType.Deleted, false, ConfigParse.Analysis(serverItem.UserData));
|
| | | ItemCellModel cellModel = new ItemCellModel(serverItem.ItemID, false, (ulong)serverItem.Count, |
| | | "", PackType.Deleted, false, ConfigParse.Analysis(serverItem.UserData));
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | itemCell.cellBtn.AddListener(() =>
|
| | |
| | |
|
| | | private void ShowItemDetails(ServerItem serverItem)
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(serverItem.ItemID, false, (ulong)serverItem.Count, -1, serverItem.IsBind
|
| | | ItemAttrData attrData = new ItemAttrData(serverItem.ItemID, false, (ulong)serverItem.Count, -1
|
| | | , false, PackType.Deleted, "", ConfigParse.Analysis(serverItem.UserData));
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | }
|
| | |
| | | var items = new List<Item>();
|
| | | foreach (var reward in InGameDownLoad.Instance.rewards)
|
| | | {
|
| | | items.Add(new Item(reward.id, reward.count, reward.bind));
|
| | | items.Add(new Item(reward.id, reward.count));
|
| | | }
|
| | |
|
| | | m_RewardGroup.Display(items);
|
| | |
| | | DebugEx.LogError("物品表没有找到该物品,物品ID为" + auctionItem.ItemID);
|
| | | return;
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, true, (ulong)1,0);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, true, (ulong)1);
|
| | | itemCell.Init(cellModel);
|
| | | textName.text = itemConfig.ItemName;
|
| | | if (model.AttentionAuctionItemIDdic.ContainsKey(auctionItem.ItemID))
|
| | |
| | | {
|
| | | if (auctionHelpModel.ItemModel == null) { return; }
|
| | | var config = AuctionItemConfig.Get(auctionHelpModel.ItemModel.itemId);
|
| | | ItemCellModel cellModel = new ItemCellModel(auctionHelpModel.ItemModel.itemId, true, (ulong)1,1);
|
| | | ItemCellModel cellModel = new ItemCellModel(auctionHelpModel.ItemModel.itemId, true, (ulong)1);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemName.text = auctionHelpModel.ItemModel.config.ItemName;
|
| | | if (config == null) { return; }
|
| | |
| | | m_BiddingTextObj.SetActive(true);
|
| | | }
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(familyAuctionItem.ItemID, true,
|
| | | (ulong)familyAuctionItem.ItemCount, itemConfig.BindType);
|
| | | ItemCellModel cellModel = new ItemCellModel(familyAuctionItem.ItemID, true, (ulong)familyAuctionItem.ItemCount);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemName.text = itemConfig.ItemName;
|
| | | if (itemConfig.EquipPlace != 0)
|
| | |
| | | }
|
| | | m_PriceButton.SetListener(() => //一口价
|
| | | {
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond; |
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = Language.Get("PMH_02", auctionItem.BuyoutPrice);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | if (jade >= auctionItem.BuyoutPrice)
|
| | |
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | });
|
| | | });
|
| | | m_JadeNumber2.text = (needJade).ToString();
|
| | |
| | | {
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = Language.Get("PMH_01", needJade);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | if (jade >= needJade)
|
| | |
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | } |
| | | }
|
| | | });
|
| | | |
| | |
|
| | | });
|
| | | }
|
| | | private void LateUpdate()
|
| | |
| | | m_BiddingButton.interactable = false;
|
| | | m_BiddingImage.gray = true;
|
| | | }
|
| | | int seconds = AuctionItem.NoticeSaleMinutes * 60 - (int)timeSpan.TotalSeconds; |
| | | int seconds = AuctionItem.NoticeSaleMinutes * 60 - (int)timeSpan.TotalSeconds;
|
| | | m_TimeText.text = Language.Get("PMH_03", TimeUtility.SecondsToHMS(seconds));
|
| | | }
|
| | | else if (minute >= AuctionItem.NoticeSaleMinutes && minute <= AuctionItem.FamilySaleMinutes)//拍卖中
|
| | |
| | | m_BiddingTextObj.SetActive(true);
|
| | | }
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(fullServiceAuction.ItemID, true,
|
| | | (ulong)fullServiceAuction.ItemCount, itemConfig.BindType);
|
| | | ItemCellModel cellModel = new ItemCellModel(fullServiceAuction.ItemID, true, (ulong)fullServiceAuction.ItemCount);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemName.text = itemConfig.ItemName;
|
| | | if (itemConfig.EquipPlace != 0)
|
| | |
| | | }
|
| | |
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(myAuction.ItemID, true,
|
| | | (ulong)myAuction.ItemCount, itemConfig.BindType);
|
| | | ItemCellModel cellModel = new ItemCellModel(myAuction.ItemID, true, (ulong)myAuction.ItemCount);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemName.text = itemConfig.ItemName;
|
| | | if (itemConfig.EquipPlace != 0)
|
| | |
| | | var itemConfig = ItemConfig.Get(ItemID);
|
| | | if (itemConfig != null)
|
| | | {
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, true, (ulong)1, itemConfig.BindType);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, true, (ulong)1);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemNameTxt.text = itemConfig.ItemName;
|
| | | }
|
| | |
| | | m_BiddingTextObj.SetActive(true);
|
| | | }
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(myAuction.ItemID, true,
|
| | | (ulong)myAuction.ItemCount, itemConfig.BindType);
|
| | | ItemCellModel cellModel = new ItemCellModel(myAuction.ItemID, true, (ulong)myAuction.ItemCount);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemName.text = itemConfig.ItemName;
|
| | | if (itemConfig.EquipPlace != 0)
|
| | |
| | | Text textName = cell.transform.Find("ItemName").GetComponent<Text>();
|
| | | Text transactionStatusText = cell.transform.Find("TransactionStatusText").GetComponent<Text>();
|
| | | Text timeText = cell.transform.Find("TimeText").GetComponent<Text>();
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, true, (ulong)1, itemConfig.BindType);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, true, (ulong)1);
|
| | |
|
| | | GameObject SuccessfulBiddingObj = cell.transform.Find("SuccessfulBiddingObj").gameObject;//竞拍成功(竞拍成功)
|
| | | Text SuccessfulBiddingText= cell.transform.Find("SuccessfulBiddingObj/SuccessfulBiddingText").GetComponent<Text>();
|
| | |
| | | {
|
| | | public int id;
|
| | | public int count;
|
| | | public bool bind;
|
| | | public int quality;
|
| | |
|
| | | public Item(int _id, int _count)
|
| | | {
|
| | | this.id = _id;
|
| | | this.count = _count;
|
| | | this.bind = false;
|
| | | this.quality = 0;
|
| | | }
|
| | |
|
| | | public Item(int _id, int _count, bool _bind)
|
| | | public Item(int _id, int _count, int _quality)
|
| | | {
|
| | | this.id = _id;
|
| | | this.count = _count;
|
| | | this.bind = _bind;
|
| | | this.quality = 0;
|
| | | }
|
| | |
|
| | | public Item(int _id, int _count, bool _bind, int _quality)
|
| | | {
|
| | | this.id = _id;
|
| | | this.count = _count;
|
| | | this.bind = _bind;
|
| | | this.quality = _quality;
|
| | | }
|
| | | }
|
| | |
| | | ItemConfig itemConfig = ItemConfig.Get(m_storeModel.GetReplaceId(storeConfig.ID,storeConfig.ItemID));
|
| | | if (itemConfig == null) return;
|
| | |
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, false, 0, storeConfig.IsBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, false, 0);
|
| | | itemCell.Init(cellModel);
|
| | | int canBuyCnt = 0;
|
| | | int addBuyCnt = 0;
|
| | |
| | | {
|
| | | BuyItemPopModel.Instance.SetModel(storeConfig.ID);
|
| | | //SetOpenBuyType(chinModel);
|
| | | ItemAttrData attrData = new ItemAttrData(itemConfig.ID, true, (ulong)storeConfig.ItemCnt, -1, storeConfig.IsBind, true, PackType.Deleted
|
| | | ItemAttrData attrData = new ItemAttrData(itemConfig.ID, true, (ulong)storeConfig.ItemCnt, -1, true, PackType.Deleted
|
| | | , "", null, ItemTipChildType.Buy);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | |
| | | private void SetTopUI()
|
| | | {
|
| | |
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,false,0,itemAttrData.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,false,0);
|
| | | _itemCell.Init(cellModel);
|
| | | _nameText.text = itemAttrData.itemConfig.ItemName;
|
| | | _nameText.color = UIHelper.GetUIColor(itemAttrData.itemConfig.ItemColor);
|
| | |
| | | if (itemPathModel.chinItemModel == null)
|
| | | return;
|
| | |
|
| | | itemAttrData = new ItemAttrData(itemPathModel.chinItemModel.ID,true,0,-1, itemPathModel.isBind);
|
| | | itemAttrData = new ItemAttrData(itemPathModel.chinItemModel.ID,true,0);
|
| | | _closeBtn.gameObject.SetActive(true);
|
| | | _getWaysTips.alpha = 0;
|
| | | tipAlpha.alpha = 0;
|
| | |
| | |
|
| | | private void SetTopUI()
|
| | | {
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,false,0, itemPathModel.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,false,0);
|
| | | _itemCell.Init(cellModel);
|
| | | _nameText.text = itemAttrData.itemConfig.ItemName;
|
| | | _nameText.color = UIHelper.GetUIColor(itemAttrData.itemConfig.ItemColor);
|
| | |
| | |
|
| | | private void SetTopUI()
|
| | | {
|
| | | ItemCellModel cellModel = new ItemCellModel(itemPathModel.chinItemModel.ID, false, 0, itemPathModel.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemPathModel.chinItemModel.ID, false, 0);
|
| | | _itemCell.Init(cellModel);
|
| | | _nameText.text = itemPathModel.chinItemModel.ItemName;
|
| | | _nameText.color = UIHelper.GetUIColor(itemPathModel.chinItemModel.ItemColor);
|
| | |
| | | }
|
| | |
|
| | | itemBaisc.gameObject.SetActive(true);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemId,false,0,1);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemId,false,0);
|
| | | itemBaisc.Init(cellModel);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemId,false,0,-1,1);
|
| | | ItemAttrData attrData = new ItemAttrData(itemId,false,0);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | |
|
| | | private void SetDisplayUI()
|
| | | {
|
| | | ItemCellModel cellModel = new ItemCellModel(prayModel.itemId,false,1,1);
|
| | | ItemCellModel cellModel = new ItemCellModel(prayModel.itemId,false,1);
|
| | | itemBaisc.Init(cellModel);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(prayModel.itemId,false,1,-1,1);
|
| | | ItemAttrData attrData = new ItemAttrData(prayModel.itemId,false,1);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | {
|
| | | itemCount += list[i].count;
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(itemModel.itemId,false,(ulong)itemCount,itemModel.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemModel.itemId,false,(ulong)itemCount);
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | itemCell.cellBtn.AddListener(() =>
|
| | |
| | | for (int i = 0; i < _taskInfo.AwardItemCount; i++)
|
| | | {
|
| | | var serverItem = _taskInfo.AwardItem[i];
|
| | | this.rewards.Add(new Item((int)serverItem.ItemID, serverItem.ItemCount, serverItem.IsBind == 1));
|
| | | this.rewards.Add(new Item((int)serverItem.ItemID, serverItem.ItemCount));
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | {
|
| | | redpointBeh.redpointId = redpoint.id;
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, false, 0, storeConfig.IsBind,"",PackType.Deleted,true);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, false, 0, "",PackType.Deleted,true);
|
| | | itemCell.Init(cellModel);
|
| | | nameText.text = itemConfig.ItemName;
|
| | | nameText.color = UIHelper.GetUIColor(itemConfig.ItemColor, true);
|
| | |
| | | var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[key].ToJson());
|
| | | for (int j = 0; j < _itemArray.Length; j++)
|
| | | {
|
| | | _award.Add(_ranking, new Item(_itemArray[j][0], _itemArray[j][1], _itemArray[j][2] == 1));
|
| | | _award.Add(_ranking, new Item(_itemArray[j][0], _itemArray[j][1]));
|
| | | }
|
| | | }
|
| | | SeasonRewardDic = _award;
|
| | |
| | | if (i < awardItems.Count)
|
| | | {
|
| | | var awardItem = awardItems[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(awardItem.itemId, true, (ulong)awardItem.itemCount, awardItem.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(awardItem.itemId, true, (ulong)awardItem.itemCount);
|
| | | itemBasic.Init(cellModel);
|
| | | itemBasic.cellBtn.RemoveAllListeners();
|
| | | itemBasic.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(awardItem.itemId, true, (ulong)awardItem.itemCount, -1, awardItem.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(awardItem.itemId, true, (ulong)awardItem.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | {
|
| | | ui.Stop();
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(List[i].id, true, (ulong)List[i].count, List[i].bind ? 1 : 0);
|
| | | ItemCellModel cellModel = new ItemCellModel(List[i].id, true, (ulong)List[i].count);
|
| | | _ItemCell.Init(cellModel);
|
| | | int type = i;
|
| | | _ItemCell.cellBtn.SetListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(List[type].id, false, (ulong)List[type].count, -1, List[type].bind ? 1 : 0);
|
| | | ItemAttrData attrData = new ItemAttrData(List[type].id, false, (ulong)List[type].count);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | {
|
| | | ui.Stop();
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(List[i].ItemId, true, (ulong)List[i].ItemNumber, List[i].Isbind);
|
| | | ItemCellModel cellModel = new ItemCellModel(List[i].ItemId, true, (ulong)List[i].ItemNumber);
|
| | | _ItemCell.Init(cellModel);
|
| | | int type = i;
|
| | | _ItemCell.cellBtn.SetListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(List[type].ItemId, false, (ulong)List[type].ItemNumber, -1, List[type].Isbind);
|
| | | ItemAttrData attrData = new ItemAttrData(List[type].ItemId, false, (ulong)List[type].ItemNumber);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | ObjChild.SetActive(true);
|
| | | Item_Class itemClass = dic.ItemList[i];
|
| | | ItemCell _ItemCell = ObjChild.GetComponent<ItemCell>();
|
| | | ItemCellModel cellModel = new ItemCellModel(itemClass.ItemId, true, (ulong)itemClass.ItemNumber, itemClass.Isbind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemClass.ItemId, true, (ulong)itemClass.ItemNumber);
|
| | | _ItemCell.Init(cellModel);
|
| | | _ItemCell.cellBtn.SetListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemClass.ItemId, false, (ulong)itemClass.ItemNumber,-1, itemClass.Isbind);
|
| | | ItemAttrData attrData = new ItemAttrData(itemClass.ItemId, false, (ulong)itemClass.ItemNumber);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | if (presentAchieve.rewardItem != null && presentAchieve.rewardItem.Length > 0)
|
| | | {
|
| | | _achievement.m_ItemCell.gameObject.SetActive(true);
|
| | | ItemCellModel _itemCellModel = new ItemCellModel(presentAchieve.rewardItem[0].id, false,
|
| | | (ulong)presentAchieve.rewardItem[0].count, presentAchieve.rewardItem[0].bind);
|
| | | ItemCellModel _itemCellModel = new ItemCellModel(presentAchieve.rewardItem[0].id, false, (ulong)presentAchieve.rewardItem[0].count);
|
| | | _achievement.m_ItemCell.Init(_itemCellModel);
|
| | | _achievement.m_ItemCell.cellBtn.RemoveAllListeners();
|
| | | _achievement.m_ItemCell.cellBtn.onClick.AddListener(() =>
|
| | |
| | | if (presentAchieve.rewardItem != null && presentAchieve.rewardItem.Length > 0)
|
| | | {
|
| | | var _item = presentAchieve.rewardItem[0];
|
| | | ItemAttrData _itemAttr = new ItemAttrData(_item.id, false, (ulong)_item.count, -1, _item.bind);
|
| | | ItemAttrData _itemAttr = new ItemAttrData(_item.id, false, (ulong)_item.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(_itemAttr);
|
| | | }
|
| | | });
|
| | |
| | | m_Horizontal.GetChild(i).gameObject.SetActive(true);
|
| | | ItemCell ItemCell = m_Horizontal.GetChild(i).GetComponent<ItemCell>();
|
| | | float value = GetRating() * QuantityList[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(RewardList[i], true, (ulong)Math.Round(value,0), 0);
|
| | | ItemCellModel cellModel = new ItemCellModel(RewardList[i], true, (ulong)Math.Round(value,0));
|
| | | ItemCell.Init(cellModel);
|
| | | }
|
| | | else
|
| | |
| | | {
|
| | | var award = awards[i];
|
| | | m_Items[i].gameObject.SetActive(true);
|
| | | ItemCellModel itemCellModel = new ItemCellModel(award.id, true, (ulong)award.count, award.bind ? 1 : 0);
|
| | | ItemCellModel itemCellModel = new ItemCellModel(award.id, true, (ulong)award.count);
|
| | | m_Items[i].Init(itemCellModel);
|
| | | m_Items[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData itemAttrData = new ItemAttrData(award.id, true, (ulong)award.count, -1, award.bind ? 1 : 0);
|
| | | ItemAttrData itemAttrData = new ItemAttrData(award.id, true, (ulong)award.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
|
| | | });
|
| | | }
|
| | |
| | |
|
| | | private void ShowItemTip()
|
| | | {
|
| | | var attrData = new ItemAttrData(serverItem.ItemID, false, (ulong)serverItem.Count, -1, serverItem.IsBind, false, PackType.Deleted, "", ConfigParse.Analysis(serverItem.UserData));
|
| | | var attrData = new ItemAttrData(serverItem.ItemID, false, (ulong)serverItem.Count, -1, false, PackType.Deleted, "", ConfigParse.Analysis(serverItem.UserData));
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | }
|
| | |
|
| | |
| | | m_Collar.SetActive(true);
|
| | | }
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(IceLode.ItemID, true, (ulong)IceLode.ItemCount, IceLode.IsBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(IceLode.ItemID, true, (ulong)IceLode.ItemCount);
|
| | | _ItemCell.Init(cellModel);
|
| | | int type = i;
|
| | | _ItemCell.cellBtn.SetListener(() =>
|
| | |
| | | iceCrystalVeinModel.SendGetAward(IceLode.Index);
|
| | | return;
|
| | | }
|
| | | ItemAttrData attrData = new ItemAttrData(IceLode.ItemID, false, (ulong)IceLode.ItemCount,-1, IceLode.IsBind);
|
| | | ItemAttrData attrData = new ItemAttrData(IceLode.ItemID, false, (ulong)IceLode.ItemCount);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | return;
|
| | | });
|
| | |
| | | {
|
| | | id = itemsArray[k][0],
|
| | | count = itemsArray[k][1],
|
| | | bind = itemsArray[k][2] == 1
|
| | | };
|
| | | }
|
| | | dict.Add(trialRewards[i].grade, items);
|
| | |
| | | if (config != null)
|
| | | {
|
| | | var itemConfig = ItemConfig.Get(model.GetExchangeItemByJob(config));
|
| | | ItemAttrData itemAttrData = new ItemAttrData(itemConfig.ID, true, (ulong)config.exchangeItemCount, -1, config.exchangeItemIsBind);
|
| | | ItemAttrData itemAttrData = new ItemAttrData(itemConfig.ID, true, (ulong)config.exchangeItemCount);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData, false);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().curAttrData.SetTipsFuncBtn(ItemOperateType.exchange,
|
| | | (ItemOperateType btnType, string value) =>
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | ItemAttrData itemAttrData = new ItemAttrData(itemConfig.ID, true, (ulong)config.exchangeItemCount, -1, config.exchangeItemIsBind, true);
|
| | | ItemAttrData itemAttrData = new ItemAttrData(itemConfig.ID, true, (ulong)config.exchangeItemCount, -1, true);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | m_Item.cellBtn.RemoveAllListeners();
|
| | | m_Item.gameObject.SetActive(true);
|
| | | ItemCellModel cellModel = new ItemCellModel(model.GetExchangeItemByJob(config), true, (ulong)config.exchangeItemCount, config.exchangeItemIsBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(model.GetExchangeItemByJob(config), true, (ulong)config.exchangeItemCount);
|
| | | m_Item.Init(cellModel);
|
| | | m_Item.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData itemAttrData = new ItemAttrData(model.GetExchangeItemByJob(config), true, (ulong)config.exchangeItemCount, -1, config.exchangeItemIsBind, true);
|
| | | ItemAttrData itemAttrData = new ItemAttrData(model.GetExchangeItemByJob(config), true, (ulong)config.exchangeItemCount, -1, true);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
|
| | | });
|
| | | m_Description.text = config.description;
|
| | |
| | | {
|
| | | m_ItemEquip.Init(item);
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(2100, true, (ulong)1, 0);
|
| | | ItemCellModel cellModel = new ItemCellModel(2100, true, (ulong)1);
|
| | | m_ItemMoney.Init(cellModel);
|
| | | var equipLvNowList = strengthModel.GetEquipValueList(level, equipPlace);
|
| | | var equipAddLvList = strengthModel.GetEquipValueList(level, equipPlace,1);
|
| | |
| | | {
|
| | | var serverItem = result.AuctionItem[i];
|
| | | m_AuctionItems[i].gameObject.SetActive(true);
|
| | | m_AuctionItems[i].Display(new Item(serverItem.ItemID, serverItem.Count, serverItem.IsBind == 1));
|
| | | m_AuctionItems[i].Display(new Item(serverItem.ItemID, serverItem.Count));
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | {
|
| | | var serverItem = result.itemInfo[i];
|
| | | m_MyItems[i].gameObject.SetActive(true);
|
| | | m_MyItems[i].Display(new Item(serverItem.ItemID, serverItem.Count, serverItem.IsBind == 1));
|
| | | m_MyItems[i].Display(new Item(serverItem.ItemID, serverItem.Count));
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | Number = Equation.Instance.Eval<ulong>("reExp");
|
| | | }
|
| | |
|
| | | ItemCellModel cellModel = new ItemCellModel(AwardItemList[i].id, true, Number, AwardItemList[i].bind?1:0);
|
| | | ItemCellModel cellModel = new ItemCellModel(AwardItemList[i].id, true, Number);
|
| | | itemCell.Init(cellModel);
|
| | | int tab = i;
|
| | | itemCell.cellBtn.SetListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(AwardItemList[tab].id, false, Number, -1, AwardItemList[tab].bind?1:0);
|
| | | ItemAttrData attrData = new ItemAttrData(AwardItemList[tab].id, false, Number);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[key].ToJson());
|
| | | for (int j = 0; j < _itemArray.Length; j++)
|
| | | {
|
| | | _award.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1], _itemArray[j][2]==1));
|
| | | _award.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1]));
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | id = itemArray[k][0],
|
| | | count = itemArray[k][1],
|
| | | bind = itemArray[k][2] == 1,
|
| | | };
|
| | | list.Add(item);
|
| | | }
|
| | |
| | | {
|
| | | m_DropItems[i].gameObject.SetActive(true);
|
| | | var item = dropItems[i];
|
| | | ItemCellModel itemCellModel = new ItemCellModel(item.id, true, (ulong)item.count, item.bind ? 1 : 0);
|
| | | ItemCellModel itemCellModel = new ItemCellModel(item.id, true, (ulong)item.count);
|
| | | m_DropItems[i].Init(itemCellModel);
|
| | | m_DropItems[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData itemAttrData = new ItemAttrData(item.id, true, (ulong)item.count, -1, item.bind ? 1 : 0);
|
| | | ItemAttrData itemAttrData = new ItemAttrData(item.id, true, (ulong)item.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
|
| | | });
|
| | | }
|
| | |
| | | Item _item = new Item();
|
| | | _item.id = _array[i][0];
|
| | | _item.count = _array[i][1];
|
| | | _item.bind = _array[i][2] == 1;
|
| | | _list.Add(_item);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | _rankKey = UIHelper.GetIntervalAward(_dict.Keys, (int)PlayerDatas.Instance.worldLv);
|
| | | var _Award = _dict[_rankKey][0];
|
| | | m_ChampionAward.Init(_Award.id, Mathf.Min(1, _Award.count), _Award.bind?1:0);
|
| | | m_ChampionAward.Init(_Award.id, Mathf.Min(1, _Award.count));
|
| | | m_ChampionAwardBtn.onClick.AddListener(() =>
|
| | | {
|
| | | ItemAttrData _itemData = new ItemAttrData(_Award.id, false, (ulong)_Award.count, -1, _Award.bind?1:0);
|
| | | ItemAttrData _itemData = new ItemAttrData(_Award.id, false, (ulong)_Award.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(_itemData);
|
| | | });
|
| | | }
|
| | |
| | | {
|
| | | base.OnActived();
|
| | | ItemAttrData _itemData = new ItemAttrData(model.viewChestItem.id, false,
|
| | | (ulong)model.viewChestItem.count, model.viewChestItem.bind ? 1 : 0);
|
| | | (ulong)model.viewChestItem.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(_itemData, false);
|
| | | m_ChestDetailBehaviour.Display();
|
| | |
|
| | |
| | | {
|
| | | var _itemArray = model.multipleWinAwardItems[i];
|
| | | itemList[i].gameObject.SetActive(true);
|
| | | ItemCellModel cellModel = new ItemCellModel(_itemArray[0], false, (ulong)_itemArray[1], _itemArray[2]);
|
| | | ItemCellModel cellModel = new ItemCellModel(_itemArray[0], false, (ulong)_itemArray[1]);
|
| | | itemList[i].Init(cellModel);
|
| | | itemList[i].cellBtn.onClick.RemoveAllListeners();
|
| | | itemList[i].cellBtn.onClick.AddListener(() =>
|
| | |
| | | {
|
| | | id = _itemId,
|
| | | count = count,
|
| | | bind = isBind == 1,
|
| | | };
|
| | | WindowCenter.Instance.Open<KingFairyChestWin>();
|
| | | }
|
| | |
| | | {
|
| | | var _itemArray = model.salaryAwardItems[i];
|
| | | m_SalaryItemList[i].gameObject.SetActive(true);
|
| | | ItemCellModel cellModel2 = new ItemCellModel(_itemArray[0],false, (ulong)_itemArray[1], _itemArray[2]);
|
| | | ItemCellModel cellModel2 = new ItemCellModel(_itemArray[0],false, (ulong)_itemArray[1]);
|
| | | m_SalaryItemList[i].Init(cellModel2);
|
| | | }
|
| | | else
|
| | |
| | | private void OnSalaryItem(int index)
|
| | | {
|
| | | var _itemArray = model.salaryAwardItems[index];
|
| | | ItemAttrData attrData = new ItemAttrData(_itemArray[0], false, (ulong)_itemArray[1],-1, _itemArray[2]);
|
| | | ItemAttrData attrData = new ItemAttrData(_itemArray[0], false, (ulong)_itemArray[1]);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(attrData);
|
| | | }
|
| | | }
|
| | |
| | | warehouseGrid.Uieffect.gameObject.SetActive(true);
|
| | | warehouseGrid.Uieffect.Play();
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(itemModel.ItemID, false, 0, 0, "", PackType.Deleted, true, itemModel._UserData);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemModel.ItemID, false, 0, "", PackType.Deleted, true, itemModel._UserData);
|
| | | warehouseGrid.ItemCell.Init(cellModel);
|
| | | if (AchievementGoto.achievementType == AchievementGoto.SpiritPetDan)//兑换灵宠丹(221)
|
| | | {
|
| | |
| | | ItemConfig Item = ItemConfig.Get(playerFairyAuTreasureData._DicfamilyStoreItem[_Index].ItemID);
|
| | | PetEatEquipConfig tagPet = PetEatEquipConfig.GetEquipColorAndEquipClass(Item.ItemColor, Item.LV);//装备积分兑换表
|
| | | ntegralGain = tagPet.integrate;
|
| | | ItemAttrData attrData = new ItemAttrData(playerFairyAuTreasureData._DicfamilyStoreItem[_Index].ItemID, false, 1, -1, 0, true, PackType.Deleted
|
| | | ItemAttrData attrData = new ItemAttrData(playerFairyAuTreasureData._DicfamilyStoreItem[_Index].ItemID, false, 1, -1, true, PackType.Deleted
|
| | | , "", playerFairyAuTreasureData._DicfamilyStoreItem[_Index]._UserData, ItemTipChildType.UnionWarehouseExchange);
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.exchange, Exchange);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | if (_nextAward) |
| | | { |
| | | var _itemArray = model.multipleWinAwardItems[0]; |
| | | ItemCellModel cellModel = new ItemCellModel(_itemArray[0],false, (ulong)_itemArray[1], _itemArray[2]); |
| | | ItemCellModel cellModel = new ItemCellModel(_itemArray[0],false, (ulong)_itemArray[1]); |
| | | m_RewardItem.Init(cellModel); |
| | | } |
| | | } |
| | |
| | | if (storeConfig == null) return;
|
| | |
|
| | | buyPriceText.text = storeConfig.MoneyNumber.ToString();
|
| | | ItemCellModel fireModel = new ItemCellModel(storeConfig.ItemID,true,(ulong)storeConfig.ItemCnt,storeConfig.IsBind);
|
| | | ItemCellModel fireModel = new ItemCellModel(storeConfig.ItemID,true,(ulong)storeConfig.ItemCnt);
|
| | | fireItem.Init(fireModel);
|
| | | fireItem.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(storeConfig.ItemID,true, (ulong)storeConfig.ItemCnt,-1,storeConfig.IsBind);
|
| | | ItemAttrData attrData = new ItemAttrData(storeConfig.ItemID,true, (ulong)storeConfig.ItemCnt);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | |
|
| | |
| | | {
|
| | | itemBaiscs[i].gameObject.SetActive(true);
|
| | | FairylandCeremonyModel.AwardItem itemData = itemlist[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount,itemData.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
|
| | | itemBaiscs[i].Init(cellModel);
|
| | | itemBaiscs[i].cellBtn.RemoveAllListeners();
|
| | | itemBaiscs[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount,-1,itemData.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | {
|
| | | baiscs[i].gameObject.SetActive(true);
|
| | | FairylandCeremonyModel.AwardItem itemData = list[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount,itemData.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
|
| | | baiscs[i].Init(cellModel);
|
| | | baiscs[i].cellBtn.RemoveAllListeners();
|
| | | baiscs[i].cellBtn.AddListener(() =>
|
| | |
| | | kingFairyModel.ViewKingFairyChest(itemData.itemId,itemData.itemCount,itemData.isBind);
|
| | | break;
|
| | | default:
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount, -1, itemData.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | break;
|
| | | }
|
| | |
| | | {
|
| | | itemBaiscs[i].gameObject.SetActive(true);
|
| | | FairylandCeremonyModel.AwardItem itemData = itemlist[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId,true, (ulong)itemData.itemCount, itemData.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId,true, (ulong)itemData.itemCount);
|
| | | itemBaiscs[i].Init(cellModel);
|
| | | itemBaiscs[i].cellBtn.RemoveAllListeners();
|
| | | itemBaiscs[i].cellBtn.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount,-1,itemData.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | {
|
| | | itemBaiscs[i].gameObject.SetActive(true);
|
| | | FairylandCeremonyModel.AwardItem itemData = itemlist[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount, itemData.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
|
| | | itemBaiscs[i].Init(cellModel);
|
| | | itemBaiscs[i].cellBtn.RemoveAllListeners();
|
| | | itemBaiscs[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount,-1,itemData.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | itemCell.gameObject.SetActive(true);
|
| | | MailItemModel itemModel = info.Items[giftCount];
|
| | | ItemCellModel cellModel = new ItemCellModel((int)itemModel.ItemID, false, (ulong)itemModel.Count,
|
| | | itemModel.IsBind, "", PackType.Deleted, false, ConfigParse.Analysis(itemModel.UserData));
|
| | | "", PackType.Deleted, false, ConfigParse.Analysis(itemModel.UserData));
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.cellBtn.onClick.RemoveAllListeners();
|
| | | itemCell.cellBtn.onClick.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData((int)itemModel.ItemID, false, (ulong)itemModel.Count, -1, itemModel.IsBind, true, PackType.Deleted, "", ConfigParse.Analysis(itemModel.UserData));
|
| | | ItemAttrData attrData = new ItemAttrData((int)itemModel.ItemID, false, (ulong)itemModel.Count, -1, true, PackType.Deleted, "", ConfigParse.Analysis(itemModel.UserData));
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | }
|
| | | );
|
| | |
| | | {
|
| | | id = itemArray[k][0],
|
| | | count = itemArray[k][1],
|
| | | bind = itemArray[k][2] == 1,
|
| | | });
|
| | | }
|
| | | }
|
| | |
| | | item.name = StringUtility.Contact("XBItem", i);
|
| | | item.gameObject.SetActive(true);
|
| | | CommonItemBaisc itemBasic = item.transform.Find("CommonItemCell").GetComponent<CommonItemBaisc>();
|
| | | ItemCellModel cellModel = new ItemCellModel(xbItem.itemId, false, (ulong)xbItem.count, xbItem.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(xbItem.itemId, false, (ulong)xbItem.count);
|
| | | itemBasic.Init(cellModel);
|
| | | itemBasic.transform.localScale = Vector3.zero;
|
| | | itemBasic.transform.localPosition = Vector3.zero;
|
| | |
| | | item.name = StringUtility.Contact("CommonItemCell", i);
|
| | | item.gameObject.SetActive(true);
|
| | | XBGetItemCell itemBasic = item.transform.Find("CommonItemCell").GetComponent<XBGetItemCell>();
|
| | | ItemCellModel cellModel = new ItemCellModel(xbItem.itemId, false, (ulong)xbItem.count, xbItem.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(xbItem.itemId, false, (ulong)xbItem.count);
|
| | | itemBasic.Init(cellModel);
|
| | | itemBasic.cellBtn.RemoveAllListeners();
|
| | | itemBasic.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(xbItem.itemId, false, (ulong)xbItem.count, -1, xbItem.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(xbItem.itemId, false, (ulong)xbItem.count);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
|
| | | });
|
| | |
| | | int id = int.Parse(getItemJson[grid][0].ToString());
|
| | | int count = int.Parse(getItemJson[grid][1].ToString());
|
| | | XBGetItem getItem = new XBGetItem();
|
| | | getItem.SetModel(int.Parse(grid), id, count, 0);
|
| | | getItem.SetModel(int.Parse(grid), id, count);
|
| | | getItemDict.Add(getItem.gridIndex, getItem);
|
| | | }
|
| | | JsonData jobReplaceJson = JsonMapper.ToObject(getItemConfig.JobItemList);
|
| | |
| | | {
|
| | | isReplace = true;
|
| | | XBGetItem getItem = new XBGetItem();
|
| | | getItem.SetModel(model.gridIndex, list[i], model.count, model.isBind);
|
| | | getItem.SetModel(model.gridIndex, list[i], model.count);
|
| | | jobGetItemDict.Add(getItem.gridIndex, getItem);
|
| | | break;
|
| | | }
|
| | |
| | | int index = int.Parse(resultData[i][0].ToString());
|
| | | int itemId = int.Parse(resultData[i][1].ToString());
|
| | | int count = int.Parse(resultData[i][2].ToString());
|
| | | int isBind = int.Parse(resultData[i][3].ToString());
|
| | | XBGetItem getItem = new XBGetItem();
|
| | | getItem.SetModel(index, itemId, count, isBind);
|
| | | getItem.SetModel(index, itemId, count);
|
| | | if (!xbResultDict.ContainsKey(i))
|
| | | {
|
| | | xbResultDict.Add(i, getItem);
|
| | |
| | | public int gridIndex;
|
| | | public int itemId;
|
| | | public int count;
|
| | | public int isBind;
|
| | | public DateTime createTime;
|
| | | public string createTimeStr;
|
| | |
|
| | | public void SetModel(int index, int id, int count, int isBind)
|
| | | public void SetModel(int index, int id, int count )
|
| | | {
|
| | | this.gridIndex = index;
|
| | | this.itemId = id;
|
| | | this.count = count;
|
| | | this.isBind = isBind;
|
| | | createTime = TimeUtility.ServerNow;
|
| | | createTimeStr = TimeUtility.ServerNow.ToString("yyyy-MM-dd HH:mm:ss");
|
| | | }
|
| | |
| | | item.name = StringUtility.Contact("XBItem", i);
|
| | | item.gameObject.SetActive(true);
|
| | | CommonItemBaisc itemBasic = item.transform.Find("CommonItemCell").GetComponent<CommonItemBaisc>();
|
| | | ItemCellModel cellModel = new ItemCellModel(xbItem.itemId, false, (ulong)xbItem.count, xbItem.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(xbItem.itemId, false, (ulong)xbItem.count);
|
| | | itemBasic.Init(cellModel);
|
| | | itemBasic.transform.localScale = Vector3.zero;
|
| | | itemBasic.transform.localPosition = Vector3.zero;
|
| | |
| | | ItemConfig itemConfig = ItemConfig.Get(m_storeModel.GetReplaceId(storeConfig.ID,storeConfig.ItemID));
|
| | | if (itemConfig == null) return;
|
| | |
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, false, 0, storeConfig.IsBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, false, 0);
|
| | | itemCell.Init(cellModel);
|
| | | int canBuyCnt = 0;
|
| | | int addBuyCnt = 0;
|
| | |
| | | shopCellBtn.RemoveAllListeners();
|
| | | shopCellBtn.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemConfig.ID, true, 0, storeConfig.IsBind);
|
| | | ItemAttrData attrData = new ItemAttrData(itemConfig.ID, true, 0);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | buyBtn.RemoveAllListeners();
|
| | |
| | | int itemId = int.Parse(campAwardData[i][0].ToString());
|
| | | int itemCnt = int.Parse(campAwardData[i][1].ToString());
|
| | | int isBind = int.Parse(campAwardData[i][2].ToString());
|
| | | ItemCellModel cellModel = new ItemCellModel(itemId, true, (ulong)itemCnt, isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemId, true, (ulong)itemCnt);
|
| | | campVicRewardDict.Add(itemId,cellModel);
|
| | |
|
| | | }
|
| | |
| | | int itemId = int.Parse(campfailAwardData[i][0].ToString());
|
| | | int itemCnt = int.Parse(campfailAwardData[i][1].ToString());
|
| | | int isBind = int.Parse(campfailAwardData[i][2].ToString());
|
| | | ItemCellModel cellModel = new ItemCellModel(itemId, true, (ulong)itemCnt, isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemId, true, (ulong)itemCnt);
|
| | | campFailRewardDict.Add(itemId, cellModel);
|
| | |
|
| | | }
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(info.itemId,false,(ulong)info.itemCnt,-1,info.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(info.itemId,false,(ulong)info.itemCnt);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | id = itemArray[k][0],
|
| | | count = itemArray[k][1],
|
| | | bind = itemArray[k][2] == 1,
|
| | | };
|
| | | list.Add(item);
|
| | | }
|
| | |
| | | {
|
| | | m_Items[i].gameObject.SetActive(true);
|
| | | var item = dropItems[i];
|
| | | ItemCellModel itemCellModel = new ItemCellModel(item.id, true, (ulong)item.count, item.bind ? 1 : 0);
|
| | | ItemCellModel itemCellModel = new ItemCellModel(item.id, true, (ulong)item.count);
|
| | | m_Items[i].Init(itemCellModel);
|
| | | m_Items[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData itemAttrData = new ItemAttrData(item.id, true, (ulong)item.count, -1, item.bind ? 1 : 0);
|
| | | ItemAttrData itemAttrData = new ItemAttrData(item.id, true, (ulong)item.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
|
| | | });
|
| | | }
|
| | |
| | | item.name = StringUtility.Contact("getItem",i);
|
| | | item.gameObject.SetActive(true);
|
| | | CommonItemBaisc itemBasic = item.transform.Find("CommonItemCell").GetComponent<CommonItemBaisc>();
|
| | | ItemCellModel cellModel = new ItemCellModel(matInfo.itemId, false, (ulong)matInfo.itemCount, matInfo.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(matInfo.itemId, false, (ulong)matInfo.itemCount);
|
| | | itemBasic.Init(cellModel);
|
| | | itemBasic.cellBtn.RemoveAllListeners();
|
| | | itemBasic.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(matInfo.itemId, false, (ulong)matInfo.itemCount, -1, matInfo.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(matInfo.itemId, false, (ulong)matInfo.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
|
| | | });
|
| | |
| | | [SerializeField] UIEffect fireEffect;
|
| | |
|
| | | PackModel _playerPack;
|
| | | PackModel playerPack
|
| | | {
|
| | | PackModel playerPack {
|
| | | get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); }
|
| | | }
|
| | |
|
| | |
| | | List<CommonItemBaisc> getItemBasiclist = new List<CommonItemBaisc>();
|
| | | List<GameObject> GetItemlist = new List<GameObject>();
|
| | | BoxGetItemModel boxModel;
|
| | | BoxGetItemModel BoxModel
|
| | | {
|
| | | BoxGetItemModel BoxModel {
|
| | | get { return boxModel ?? (boxModel = ModelCenter.Instance.GetModel<BoxGetItemModel>()); }
|
| | | }
|
| | |
|
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel
|
| | | {
|
| | | get
|
| | | {
|
| | | ItemTipsModel itemTipsModel {
|
| | | get {
|
| | | return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>());
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | |
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | // playerPack.ItemCntReduceAct -= RefreshUI;
|
| | | // playerPack.ItemCntReduceAct -= RefreshUI;
|
| | | BoxModel.RefreshGetItemAct -= RefreshGetIem;
|
| | | backBtn.RemoveAllListeners();
|
| | | useBtn.RemoveAllListeners();
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | if(!isFireBox)
|
| | | if (!isFireBox)
|
| | | {
|
| | | fireEffect.Stop();
|
| | | }
|
| | |
| | |
|
| | | private void ShowUICtrl()
|
| | | {
|
| | | if(BoxModel.getItems != null)
|
| | | if (BoxModel.getItems != null)
|
| | | {
|
| | | CreateGetItem();
|
| | | }
|
| | |
| | | int count = 0;
|
| | | if (itemModel != null)
|
| | | {
|
| | | count = itemModel.count; |
| | | count = itemModel.count;
|
| | | useBtnText.text = Language.Get("OpenBoxUseBtn1");
|
| | | useBtn.AddListener(ClickUseBtn);
|
| | | }
|
| | |
| | | }
|
| | | box.countText.text = count.ToString();
|
| | | box.countText.gameObject.SetActive(true);
|
| | | if(BoxModel.getCoinsType != 0 && BoxModel.getCoinsCnt > 0)
|
| | | if (BoxModel.getCoinsType != 0 && BoxModel.getCoinsCnt > 0)
|
| | | {
|
| | | getCoinsText.gameObject.SetActive(true);
|
| | | getCoinsText.text = Language.Get("BoxGetCoinsText",BoxModel.getCoinsType,BoxModel.getCoinsCnt);
|
| | | getCoinsText.text = Language.Get("BoxGetCoinsText", BoxModel.getCoinsType, BoxModel.getCoinsCnt);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | ShowUICtrl();
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | private void CreateGetItem()
|
| | | {
|
| | | getItemParent.anchoredPosition3D = startPos;
|
| | |
| | |
|
| | | private void ShowGetItemCtrl(int index)
|
| | | {
|
| | | if(index < getItemBasiclist.Count)
|
| | | if (index < getItemBasiclist.Count)
|
| | | {
|
| | | getItemBasiclist[index].gameObject.SetActive(true);
|
| | | getItemBasiclist[index].transform.DOScale(new Vector3(1, 1, 1), scaleTime).OnComplete(() =>
|
| | |
| | | private void CreateGetItem(int index)
|
| | | {
|
| | | int length = BoxModel.getItems.Length;
|
| | | DebugEx.Log("CreateGetItem:" + length); |
| | | DebugEx.Log("CreateGetItem:" + length);
|
| | | if (index < length)
|
| | | {
|
| | | GameObject item = Instantiate(getItem);
|
| | |
| | | BoxGetItemInfo itemInfo = BoxModel.getItems[index];
|
| | | PackType type = PackType.Deleted;
|
| | | ItemConfig itemConfig = ItemConfig.Get(itemInfo.ItemID);
|
| | | if(itemConfig != null)
|
| | | if (itemConfig != null)
|
| | | {
|
| | | if(itemConfig.Type == 70 || (itemConfig.EquipPlace >= 101 && itemConfig.EquipPlace <= 105))
|
| | | if (itemConfig.Type == 70 || (itemConfig.EquipPlace >= 101 && itemConfig.EquipPlace <= 105))
|
| | | {
|
| | | type = PackType.DogzItem;
|
| | | }
|
| | | }
|
| | | CommonItemBaisc itemBasic = item.transform.Find("CommonItemCell").GetComponent<CommonItemBaisc>();
|
| | | ItemCellModel cellModel = new ItemCellModel(itemInfo.ItemID, false, (ulong)itemInfo.Count, itemInfo.IsBind,
|
| | | ItemCellModel cellModel = new ItemCellModel(itemInfo.ItemID, false, (ulong)itemInfo.Count,
|
| | | "", type, false, ConfigParse.Analysis(itemInfo.UserData));
|
| | | itemBasic.Init(cellModel);
|
| | | itemBasic.cellBtn.RemoveAllListeners();
|
| | | itemBasic.cellBtn.AddListener(()=>
|
| | | itemBasic.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemInfo.ItemID,false, (ulong)itemInfo.Count,-1, itemInfo.IsBind,
|
| | | false,type,"", ConfigParse.Analysis(itemInfo.UserData));
|
| | | ItemAttrData attrData = new ItemAttrData(itemInfo.ItemID, false, (ulong)itemInfo.Count, -1,
|
| | | false, type, "", ConfigParse.Analysis(itemInfo.UserData));
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | |
| | |
|
| | | });
|
| | | itemBasic.transform.localScale = Vector3.zero;
|
| | | itemBasic.transform.localPosition = Vector3.zero;
|
| | |
| | |
|
| | | private void DestroyGetItemlist()
|
| | | {
|
| | | for(int i = 0; i < GetItemlist.Count; i++)
|
| | | for (int i = 0; i < GetItemlist.Count; i++)
|
| | | {
|
| | | Destroy(GetItemlist[i]);
|
| | | }
|
| | |
| | | itemTypeText.text = itemTipsModel.curAttrData.itemConfig.ItemTypeName;
|
| | | titleText.text = itemTipsModel.curAttrData.itemConfig.ItemName;
|
| | | titleText.color = UIHelper.GetUIColor(itemTipsModel.curAttrData.itemConfig.ItemColor);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemTipsModel.curAttrData.itemId, itemTipsModel.curAttrData.isPreview, (ulong)itemTipsModel.curAttrData.count, itemTipsModel.curAttrData.isBind,
|
| | | ItemCellModel cellModel = new ItemCellModel(itemTipsModel.curAttrData.itemId, itemTipsModel.curAttrData.isPreview, (ulong)itemTipsModel.curAttrData.count, |
| | | itemTipsModel.curAttrData.guid, itemTipsModel.curAttrData.packType, false);
|
| | | itemCell.Init(cellModel);
|
| | |
|
| | |
| | | item.name = StringUtility.Contact("getItem",i);
|
| | | item.gameObject.SetActive(true);
|
| | | CommonItemBaisc itemBasic = item.transform.Find("CommonItemCell").GetComponent<CommonItemBaisc>();
|
| | | ItemCellModel cellModel = new ItemCellModel(matInfo.ItemID, false, (ulong)matInfo.Count, matInfo.IsBind,
|
| | | ItemCellModel cellModel = new ItemCellModel(matInfo.ItemID, false, (ulong)matInfo.Count, |
| | | "", PackType.Deleted, false, ConfigParse.Analysis(matInfo.UserData));
|
| | | itemBasic.Init(cellModel);
|
| | | itemBasic.cellBtn.RemoveAllListeners();
|
| | | itemBasic.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(matInfo.ItemID, false, (ulong)matInfo.Count, -1, matInfo.IsBind,
|
| | | ItemAttrData attrData = new ItemAttrData(matInfo.ItemID, false, (ulong)matInfo.Count, -1,
|
| | | false, PackType.Deleted, "", ConfigParse.Analysis(matInfo.UserData));
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
|
| | |
| | | {
|
| | | getMatlist[i].gameObject.SetActive(true);
|
| | | PackModel.DecomposeGetMatInfo matInfo = matInfolist[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(matInfo.ItemID, false, (ulong)matInfo.Count, matInfo.IsBind,
|
| | | ItemCellModel cellModel = new ItemCellModel(matInfo.ItemID, false, (ulong)matInfo.Count, |
| | | "", PackType.Deleted, false, ConfigParse.Analysis(matInfo.UserData));
|
| | | getMatlist[i].Init(cellModel);
|
| | | getMatlist[i].cellBtn.RemoveAllListeners();
|
| | | getMatlist[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(matInfo.ItemID, false, (ulong)matInfo.Count, -1, matInfo.IsBind,
|
| | | ItemAttrData attrData = new ItemAttrData(matInfo.ItemID, false, (ulong)matInfo.Count,-1,
|
| | | false, PackType.Deleted, "", ConfigParse.Analysis(matInfo.UserData));
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
|
| | |
| | | #region 设置TopUI
|
| | | titleText.text = itemTipsModel.GetItemTipsTitle(itemAttrData);
|
| | | titleText.color = UIHelper.GetUIColor(itemAttrData.itemConfig.ItemColor);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,itemAttrData.isPreview, (ulong)itemAttrData.count, itemAttrData.isBind,
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,itemAttrData.isPreview, (ulong)itemAttrData.count,
|
| | | itemAttrData.guid,itemAttrData.packType,itemAttrData.isCompare, itemAttrData.useDataDict);
|
| | | itemCell.Init(cellModel);
|
| | | if(itemAttrData.packType == PackType.Equip
|
| | |
| | | #region 设置TopUI
|
| | | titleText.text = itemTipsModel.GetItemTipsTitle(itemAttrData);
|
| | | titleText.color = UIHelper.GetUIColor(itemAttrData.itemConfig.ItemColor);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,itemAttrData.isPreview, (ulong)itemAttrData.count, itemAttrData.isBind,
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,itemAttrData.isPreview, (ulong)itemAttrData.count, |
| | | itemAttrData.guid,itemAttrData.packType,itemAttrData.isCompare, itemAttrData.useDataDict);
|
| | | itemCell.Init(cellModel);
|
| | | if (itemAttrData.packType == PackType.Equip)
|
| | |
| | | itemTypeText.text = itemTipsModel.curAttrData.itemConfig.ItemTypeName;
|
| | | titleText.text = itemTipsModel.curAttrData.itemConfig.ItemName;
|
| | | titleText.color = UIHelper.GetUIColor(itemTipsModel.curAttrData.itemConfig.ItemColor);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemTipsModel.curAttrData.itemId, itemTipsModel.curAttrData.isPreview, (ulong)itemTipsModel.curAttrData.count, itemTipsModel.curAttrData.isBind,
|
| | | ItemCellModel cellModel = new ItemCellModel(itemTipsModel.curAttrData.itemId, itemTipsModel.curAttrData.isPreview, (ulong)itemTipsModel.curAttrData.count, |
| | | itemTipsModel.curAttrData.guid, itemTipsModel.curAttrData.packType, false);
|
| | | itemCell.Init(cellModel);
|
| | |
|
| | |
| | | if (itemModel != null)
|
| | | {
|
| | | curAttrData = new ItemAttrData(itemModel.itemId, false, (ulong)itemModel.count
|
| | | , itemModel.itemPlace, itemModel.isBind, isCompare
|
| | | , itemModel.itemPlace, isCompare
|
| | | , type, guid, ConfigParse.Analysis(itemModel.itemInfo.userData), childType);
|
| | |
|
| | | if (isCompare)
|
| | |
| | | public void SetCurrentAttrData(ItemModel itemModel, bool isCompare)
|
| | | {
|
| | | curAttrData = new ItemAttrData(itemModel.itemId, false, (ulong)itemModel.count
|
| | | , itemModel.itemPlace, itemModel.isBind, isCompare
|
| | | , itemModel.itemPlace, isCompare
|
| | | , itemModel.packType, itemModel.guid, ConfigParse.Analysis(itemModel.itemInfo.userData), ItemTipChildType.Normal);
|
| | | }
|
| | |
|
| | |
| | | public void SetCompareAttrData(ItemModel itemModel)
|
| | | {
|
| | | compareAttrData = new ItemAttrData(itemModel.itemId, false, (ulong)itemModel.count
|
| | | , itemModel.itemPlace, itemModel.isBind, true
|
| | | , itemModel.itemPlace, true
|
| | | , itemModel.packType, itemModel.guid, ConfigParse.Analysis(itemModel.itemInfo.userData));
|
| | | }
|
| | |
|
| | |
| | | if (itemModel == null) return;
|
| | |
|
| | | compareAttrData = new ItemAttrData(itemModel.itemId, false, (ulong)itemModel.count
|
| | | , itemModel.itemPlace, itemModel.isBind, true
|
| | | , itemModel.itemPlace, true
|
| | | , type, itemModel.guid, ConfigParse.Analysis(itemModel.itemInfo.userData));
|
| | | }
|
| | |
|
| | |
| | | attrData.SetTipsFuncBtn(ItemOperateType.inlay, (ItemWinBtnType, ItemAttrData) => { ItemOperateUtility.Instance.GotoInlayItem(attrData.guid); });
|
| | | }
|
| | |
|
| | | if (attrData.itemConfig.CanTrade == 1 && attrData.isBind == 0)
|
| | | if (attrData.itemConfig.CanTrade == 1 )
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.putAway, (ItemWinBtnType, ItemAttrData) => { ItemOperateUtility.Instance.PutAwayItem(attrData.guid); });
|
| | | }
|
| | |
| | | public int itemId { get; private set; }
|
| | | public int index { get; private set; }
|
| | | public ulong count { get; private set; }
|
| | | public int isBind { get; private set; }
|
| | | public int unionWarehouseScore { get; private set; }
|
| | | public int[] stones { get; private set; } //可镶嵌宝石数组 长度为0 未镶嵌 数值为0 未镶嵌
|
| | | public int score { get; private set; }
|
| | |
| | | RuneModel runeModel { get { return ModelCenter.Instance.GetModel<RuneModel>(); } }
|
| | | GodBeastModel beastModel { get { return ModelCenter.Instance.GetModel<GodBeastModel>(); } }
|
| | |
|
| | | public ItemAttrData(int id, bool isPreview = false, ulong count = 0, int index = -1, int isBind = 0, bool isCompare = false, PackType type = PackType.Deleted, string guid = "", Dictionary<int, List<int>> useDataDict = null, ItemTipChildType childType = ItemTipChildType.Normal)
|
| | | public ItemAttrData(int id, bool isPreview = false, ulong count = 0, int index = -1, bool isCompare = false, PackType type = PackType.Deleted, string guid = "", Dictionary<int, List<int>> useDataDict = null, ItemTipChildType childType = ItemTipChildType.Normal)
|
| | | {
|
| | | this.packType = type;
|
| | | this.itemConfig = ItemConfig.Get(id);
|
| | |
| | | this.itemId = id;
|
| | | this.count = count;
|
| | | this.index = index;
|
| | | this.isBind = isBind;
|
| | | this.isPreview = isPreview;
|
| | | this.isCompare = isCompare;
|
| | | this.useDataDict = useDataDict;
|
| | |
| | | ItemConfig itemConfig = ItemConfig.Get(id);
|
| | | this.ItemId = id;
|
| | | nameText.text = itemConfig.ItemName;
|
| | | ItemCellModel cellModel = new ItemCellModel(id, true, (ulong)BoxModel.selectDict[id],0,"",PackType.Deleted,true);
|
| | | ItemCellModel cellModel = new ItemCellModel(id, true, (ulong)BoxModel.selectDict[id],"",PackType.Deleted,true);
|
| | | itemBaisc.Init(cellModel);
|
| | | if (itemConfig.Effect1 == 220)
|
| | | {
|
| | |
| | | #region 设置TopUI
|
| | | titleText.text = itemTipsModel.GetItemTipsTitle(itemAttrData);
|
| | | titleText.color = UIHelper.GetUIColor(itemAttrData.itemConfig.ItemColor);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,itemAttrData.isPreview, (ulong)itemAttrData.count, itemAttrData.isBind,
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,itemAttrData.isPreview, (ulong)itemAttrData.count,
|
| | | itemAttrData.guid,itemAttrData.packType,itemAttrData.isCompare, itemAttrData.useDataDict);
|
| | | itemCell.Init(cellModel);
|
| | | equipScoreDes.text = Language.Get("EquipWin_EquipPointText_1");
|
| | |
| | | #region 设置TopUI
|
| | | titleText.text = itemTipsModel.GetItemTipsTitle(itemAttrData);
|
| | | titleText.color = UIHelper.GetUIColor(ItemLogicUtility.Instance.GetItemQuality(itemAttrData.itemId,itemAttrData.useDataDict));
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId, itemAttrData.isPreview, (ulong)itemAttrData.count, itemAttrData.isBind,
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId, itemAttrData.isPreview, (ulong)itemAttrData.count, |
| | | itemAttrData.guid,itemAttrData.packType ,itemAttrData.isCompare, itemAttrData.useDataDict);
|
| | | itemCell.Init(cellModel);
|
| | | if(itemAttrData.packType == PackType.Equip)
|
| | |
| | | maxValue = (ulong)BatchUseModel.Instance.maxValue;
|
| | | }
|
| | |
|
| | | var cellModel = new ItemCellModel(itemModel.itemId, false, (ulong)maxValue, itemModel.isBind,
|
| | | var cellModel = new ItemCellModel(itemModel.itemId, false, (ulong)maxValue, |
| | | itemModel.guid, itemModel.packType, false);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemCell.countText.text = maxValue.ToString();
|
| | |
| | | public virtual void Init(ItemCellModel model, int compareScore = 0)
|
| | | {
|
| | | itemConfig = model.itemConfig;
|
| | | InitUI(model.guid, model.itemId, model.count, model.score, model.isBind, model.packType, model.isCompare, model.useDataDic, compareScore);
|
| | | InitUI(model.guid, model.itemId, model.count, model.score, 0, model.packType, model.isCompare, model.useDataDic, compareScore);
|
| | | }
|
| | |
|
| | | private void InitUI(string guid, int itemId, ulong count, int score, int isBind, PackType type, bool isCompare, Dictionary<int, List<int>> useDataDic, int compareScore = 0)
|
| | | private void InitUI(string guid, int itemId, ulong count, int score, int bind, PackType type, bool isCompare, Dictionary<int, List<int>> useDataDic, int compareScore = 0)
|
| | | {
|
| | | if (itemConfig == null) return;
|
| | |
|
| | |
| | | starIcon.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | bindIcon.gameObject.SetActive(isBind == 1);
|
| | | bindIcon.gameObject.SetActive(bind == 1);
|
| | |
|
| | | countText.text = UIHelper.ReplaceLargeNum((double)count);
|
| | | if (count > 1)
|
| | |
| | | public string guid { get; private set; }
|
| | | public int itemId { get; private set; }
|
| | | public ulong count { get; private set; }
|
| | | public int isBind { get; private set; }
|
| | | public int score { get; private set; }
|
| | | public bool isCompare { get; private set; }
|
| | | public ItemConfig itemConfig { get; private set; }
|
| | |
| | |
|
| | | public Dictionary<int, int> specAttrDic { get; private set; }
|
| | |
|
| | | public ItemCellModel(int itemId, bool isPreview = false, ulong count = 0, int isBind = 0, string guid = "", PackType type = PackType.Deleted, bool isCompare = false, Dictionary<int, List<int>> useDataDic = null)
|
| | | public ItemCellModel(int itemId, bool isPreview = false, ulong count = 0, string guid = "", PackType type = PackType.Deleted, bool isCompare = false, Dictionary<int, List<int>> useDataDic = null)
|
| | | {
|
| | | specAttrDic = new Dictionary<int, int>();
|
| | | this.guid = guid;
|
| | | this.itemId = itemId;
|
| | | this.count = count;
|
| | | this.isBind = isBind;
|
| | | this.itemConfig = ItemConfig.Get(itemId);
|
| | | this.isCompare = isCompare;
|
| | | this.useDataDic = useDataDic;
|
| | |
| | | #region 设置TopUI
|
| | | titleText.text = itemTipsModel.GetItemTipsTitle(itemAttrData);
|
| | | titleText.color = UIHelper.GetUIColor(ItemLogicUtility.Instance.GetItemQuality(itemAttrData.itemId, itemAttrData.useDataDict));
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId, itemAttrData.isPreview, (ulong)itemAttrData.count, itemAttrData.isBind,
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId, itemAttrData.isPreview, (ulong)itemAttrData.count, |
| | | itemAttrData.guid, itemAttrData.packType, itemAttrData.isCompare, itemAttrData.useDataDict);
|
| | | itemCell.Init(cellModel);
|
| | | if (itemAttrData.packType == PackType.Equip)
|
| | |
| | | { |
| | | var quality = ItemLogicUtility.Instance.GetItemQuality(itemId, model.useDataDict); |
| | | itemBehaviour.transform.SetParentEx(this.transform, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | itemBehaviour.Begin(new Item(itemId, 1, false, quality), m_StartPoint.localPosition, m_EndPoint.localPosition, OnBehaviourFinished); |
| | | itemBehaviour.Begin(new Item(itemId, 1, quality), m_StartPoint.localPosition, m_EndPoint.localPosition, OnBehaviourFinished); |
| | | showingItems.Add(itemBehaviour.gameObject); |
| | | } |
| | | } |
| | |
| | | }
|
| | | else
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(List[0].id, false, (ulong)List[0].count, -1, List[0].bind ? 1 : 0);
|
| | | ItemAttrData attrData = new ItemAttrData(List[0].id, false, (ulong)List[0].count);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | // DebugEx.LogError("弹框");
|
| | | }
|
| | |
| | | else
|
| | | {
|
| | | m_Number1.gameObject.SetActive(false);
|
| | | }
|
| | | if (List[0].bind)
|
| | | {
|
| | | m_Lock1.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Lock1.gameObject.SetActive(false);
|
| | | }
|
| | | if (FuncOpen.Instance.IsFuncOpen(funcID))
|
| | | {
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(List[1].id, false, (ulong)List[1].count, -1, List[1].bind ? 1 : 0);
|
| | | ItemAttrData attrData = new ItemAttrData(List[1].id, false, (ulong)List[1].count);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | //DebugEx.LogError("弹框");
|
| | | }
|
| | |
| | | {
|
| | | m_Number2.gameObject.SetActive(false);
|
| | | }
|
| | | if (List[1].bind)
|
| | | {
|
| | | m_Lock2.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Lock2.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | if (FuncOpen.Instance.IsFuncOpen(funcID))
|
| | | {
|
| | | m_ItemBG2.gray = false;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | ItemAttrData attrData = new ItemAttrData(itemId, false, (ulong)itemCount, -1, isBind, false, PackType.Deleted,
|
| | | ItemAttrData attrData = new ItemAttrData(itemId, false, (ulong)itemCount, -1, false, PackType.Deleted,
|
| | | "", userdatadic);
|
| | | attrData.SetGemModel(stone);
|
| | | attrData.SetStrengthData(strengthenLv, GetStrengthenType(itemId));
|
| | |
| | | if (storeConfig == null) return;
|
| | |
|
| | | buyPriceText.text = storeConfig.MoneyNumber.ToString();
|
| | | ItemCellModel fireModel = new ItemCellModel(storeConfig.ItemID,true,(ulong)storeConfig.ItemCnt,storeConfig.IsBind);
|
| | | ItemCellModel fireModel = new ItemCellModel(storeConfig.ItemID,true,(ulong)storeConfig.ItemCnt);
|
| | | fireItem.Init(fireModel);
|
| | | fireItem.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(storeConfig.ItemID,true, (ulong)storeConfig.ItemCnt,-1,storeConfig.IsBind);
|
| | | ItemAttrData attrData = new ItemAttrData(storeConfig.ItemID,true, (ulong)storeConfig.ItemCnt);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | |
|
| | |
| | | {
|
| | | itemBaiscs[i].gameObject.SetActive(true);
|
| | | NewYearFairylandCeremonyModel.AwardItem itemData = itemlist[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount,itemData.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
|
| | | itemBaiscs[i].Init(cellModel);
|
| | | itemBaiscs[i].cellBtn.RemoveAllListeners();
|
| | | itemBaiscs[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount,-1,itemData.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | {
|
| | | baiscs[i].gameObject.SetActive(true);
|
| | | NewYearFairylandCeremonyModel.AwardItem itemData = list[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount,itemData.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
|
| | | baiscs[i].Init(cellModel);
|
| | | baiscs[i].cellBtn.RemoveAllListeners();
|
| | | baiscs[i].cellBtn.AddListener(() =>
|
| | |
| | | kingFairyModel.ViewKingFairyChest(itemData.itemId,itemData.itemCount,itemData.isBind);
|
| | | break;
|
| | | default:
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount, -1, itemData.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | break;
|
| | | }
|
| | |
| | | {
|
| | | itemBaiscs[i].gameObject.SetActive(true);
|
| | | NewYearFairylandCeremonyModel.AwardItem itemData = itemlist[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId,true, (ulong)itemData.itemCount, itemData.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId,true, (ulong)itemData.itemCount);
|
| | | itemBaiscs[i].Init(cellModel);
|
| | | itemBaiscs[i].cellBtn.RemoveAllListeners();
|
| | | itemBaiscs[i].cellBtn.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount,-1,itemData.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | {
|
| | | itemBaiscs[i].gameObject.SetActive(true);
|
| | | NewYearFairylandCeremonyModel.AwardItem itemData = itemlist[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount, itemData.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
|
| | | itemBaiscs[i].Init(cellModel);
|
| | | itemBaiscs[i].cellBtn.RemoveAllListeners();
|
| | | itemBaiscs[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount,-1,itemData.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | {
|
| | | var item = recharge.items[i];
|
| | | m_Items[i].gameObject.SetActive(true);
|
| | | ItemCellModel itemCellModel = new ItemCellModel(item.id, true, (ulong)item.count, item.bind);
|
| | | ItemCellModel itemCellModel = new ItemCellModel(item.id, true, (ulong)item.count);
|
| | | m_Items[i].Init(itemCellModel);
|
| | | m_Items[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData itemAttrData = new ItemAttrData(item.id, true, (ulong)item.count, -1, item.bind);
|
| | | ItemAttrData itemAttrData = new ItemAttrData(item.id, true, (ulong)item.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
|
| | | });
|
| | | }
|
| | |
| | | {
|
| | | awardItem.itemObj.SetActive(true);
|
| | | var luckyItem = autoLuckyItems[index];
|
| | | ItemCellModel itemCellModel = new ItemCellModel(luckyItem.itemId,false,(ulong)luckyItem.itemCount,luckyItem.isBind);
|
| | | ItemCellModel itemCellModel = new ItemCellModel(luckyItem.itemId,false,(ulong)luckyItem.itemCount);
|
| | | awardItem.itemBaisc.Init(itemCellModel);
|
| | | awardItem.itemBaisc.cellBtn.RemoveAllListeners();
|
| | | awardItem.itemBaisc.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(luckyItem.itemId, false, (ulong)luckyItem.itemCount,-1,luckyItem.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(luckyItem.itemId, false, (ulong)luckyItem.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | |
|
| | |
| | | {
|
| | | effect.effect = 1176;
|
| | | }
|
| | | ItemCellModel model = new ItemCellModel(luckyItem.itemId,false,(ulong)luckyItem.itemCount,luckyItem.isBind);
|
| | | ItemCellModel model = new ItemCellModel(luckyItem.itemId,false,(ulong)luckyItem.itemCount);
|
| | | itemBaisc.Init(model);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(luckyItem.itemId, false, (ulong)luckyItem.itemCount,-1,luckyItem.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(luckyItem.itemId, false, (ulong)luckyItem.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | if (weekPartyItemClass.Length >= 0)
|
| | | {
|
| | | var Item = weekPartyItemClass[0];
|
| | | ItemCellModel cellModel = new ItemCellModel(Item.ItemID, true, (ulong)Item.ItemCnt, Item.IsBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(Item.ItemID, true, (ulong)Item.ItemCnt);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemCell.cellBtn.SetListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(Item.ItemID, false, (ulong)Item.ItemCnt, -1, Item.IsBind);
|
| | | ItemAttrData attrData = new ItemAttrData(Item.ItemID, false, (ulong)Item.ItemCnt);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | {
|
| | | var item = gift.items[i];
|
| | | m_FlashSaleItems[i].gameObject.SetActive(true);
|
| | | var itemcellmodel = new ItemCellModel(item.itemId, true, (ulong)item.itemCount, item.isBind);
|
| | | var itemcellmodel = new ItemCellModel(item.itemId, true, (ulong)item.itemCount);
|
| | | m_FlashSaleItems[i].SetItemRare(itemcellmodel, item.isMainItem);
|
| | | m_FlashSaleItems[i].cellBtn.RemoveAllListeners();
|
| | | m_FlashSaleItems[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData itemAttrData = new ItemAttrData(item.itemId, true, (ulong)item.itemCount, -1, item.isBind);
|
| | | ItemAttrData itemAttrData = new ItemAttrData(item.itemId, true, (ulong)item.itemCount);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
|
| | | });
|
| | | }
|
| | |
| | |
|
| | | saleItem = rushToBuyModel.presentFlashShop.items[index];
|
| | | code = rushToBuyModel.presentFlashShop.dayIndex * 1000 + rushToBuyModel.presentFlashShop.timeIndex * 100 + index;
|
| | | ItemCellModel cellModel = new ItemCellModel(saleItem.itemId,true,(ulong)saleItem.itemCount,saleItem.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(saleItem.itemId,true,(ulong)saleItem.itemCount);
|
| | | itemBaisc.Init(cellModel);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(saleItem.itemId,true, (ulong)saleItem.itemCount, -1,saleItem.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(saleItem.itemId,true, (ulong)saleItem.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | originalMoneyIcon.SetIconWithMoneyType(saleItem.moneyType);
|
| | |
| | | var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[_key].ToJson());
|
| | | for (int j = 0; j < _itemArray.Length; j++)
|
| | | {
|
| | | _award.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1], _itemArray[j][2] == 1));
|
| | | _award.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1]));
|
| | | }
|
| | | }
|
| | | _awardList.Add(_award);
|
| | |
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI {
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class ImpactRankWin : Window
|
| | | {
|
| | |
| | | [SerializeField] ScrollerController m_PromotePathCtrl;
|
| | |
|
| | | ImpactRankModel m_Model;
|
| | | ImpactRankModel model
|
| | | {
|
| | | get
|
| | | {
|
| | | ImpactRankModel model {
|
| | | get {
|
| | | return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<ImpactRankModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | RankModel m_RankModel;
|
| | | RankModel rankModel
|
| | | {
|
| | | get
|
| | | {
|
| | | RankModel rankModel {
|
| | | get {
|
| | | return m_RankModel ?? (m_RankModel = ModelCenter.Instance.GetModel<RankModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | private int m_LastSecond = -1;
|
| | | private List<int> m_ActivityCloseList = new List<int>();
|
| | | private Dictionary<int,DateTime> m_ActivityCloseTimeDict = new Dictionary<int, DateTime>();
|
| | | private Dictionary<int, DateTime> m_ActivityCloseTimeDict = new Dictionary<int, DateTime>();
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | | ImpactRankModel.OpenServerPlayerData _playerData;
|
| | | var _hasData=model.TryGetOpenServerPlayerData(model.presentSelectType, out _playerData);
|
| | | var _hasData = model.TryGetOpenServerPlayerData(model.presentSelectType, out _playerData);
|
| | | switch (model.GetRankType(model.presentSelectType))
|
| | | {
|
| | | case PlayerRankData.RankType.OpenServerRealm:
|
| | |
| | | if (_itemList != null && i < _itemList.Count)
|
| | | {
|
| | | var _item = _itemList[i];
|
| | | ItemCellModel _ItemData = new ItemCellModel(_item.id, false, (ulong)_item.count,
|
| | | _item.bind?1:0);
|
| | | ItemCellModel _ItemData = new ItemCellModel(_item.id, false, (ulong)_item.count);
|
| | | _cell.items[i].SetItemRare(_ItemData, 5);
|
| | | _cell.items[i].cellBtn.RemoveAllListeners();
|
| | | _cell.items[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData _itemPropertyData = new ItemAttrData(_item.id, false, (ulong)_item.count, -1,
|
| | | _item.bind?1:0);
|
| | | ItemAttrData _itemPropertyData = new ItemAttrData(_item.id, false, (ulong)_item.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(_itemPropertyData);
|
| | | });
|
| | | }
|
| | |
| | | if (list.Count > 0)
|
| | | {
|
| | | Item item = list[0];
|
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)item.count, item.bind ? 1 : 0);
|
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)item.count);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemCell.cellBtn.RemoveAllListeners();
|
| | | m_ItemCell.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1, item.bind ? 1 : 0);
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | {
|
| | | var treasureItem = treasureItems[index];
|
| | | awardCell.itemBaisc.gameObject.SetActive(true);
|
| | | ItemCellModel itemCellModel = new ItemCellModel(treasureItem.itemId,false,(ulong)treasureItem.itemCount,treasureItem.isBind);
|
| | | ItemCellModel itemCellModel = new ItemCellModel(treasureItem.itemId,false,(ulong)treasureItem.itemCount);
|
| | | awardCell.itemBaisc.Init(itemCellModel);
|
| | | awardCell.itemBaisc.cellBtn.RemoveAllListeners();
|
| | | awardCell.itemBaisc.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(treasureItem.itemId, false, (ulong)treasureItem.itemCount,-1,treasureItem.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(treasureItem.itemId, false, (ulong)treasureItem.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[key].ToJson()); |
| | | for (int j = 0; j < _itemArray.Length; j++) |
| | | { |
| | | _monthyItem.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1], _itemArray[j][2] == 1)); |
| | | _monthyItem.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1])); |
| | | } |
| | | } |
| | | monthlyInvestment.monthlyInvestmentItem = _monthyItem; |
| | |
| | | Item item = monthlyInvestmentItem[i]; |
| | | MotnlyItem motnlyItem = m_Group.GetChild(i).GetComponent<MotnlyItem>(); |
| | | var Item = ItemConfig.Get(item.id); |
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)1, item.bind?1:0); |
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)1); |
| | | motnlyItem.Item_Cell.Init(cellModel); |
| | | motnlyItem.NameText.text = Item.ItemName; |
| | | motnlyItem.MoneyNumberText.text = item.count.ToString(); |
| | |
| | | {
|
| | | var itemInfo = items[i];
|
| | | itemBaisc.gameObject.SetActive(true);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemInfo.itemId,false, (ulong)itemInfo.count,itemInfo.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemInfo.itemId,false, (ulong)itemInfo.count);
|
| | | itemBaisc.Init(cellModel);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemInfo.itemId, false, (ulong)itemInfo.count,-1 ,itemInfo.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(itemInfo.itemId, false, (ulong)itemInfo.count );
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | }
|
| | | m_Items[i].gameObject.SetActive(true);
|
| | | var _item = _shopItems[i];
|
| | | var _itemModel = new ItemCellModel(_item.itemId, false, (ulong)_item.count, _item.isBind);
|
| | | var _itemModel = new ItemCellModel(_item.itemId, false, (ulong)_item.count);
|
| | | m_Items[i].SetItemRare(_itemModel, _storeConfig.MainItemID == _item.itemId);
|
| | | }
|
| | | }
|
| | |
| | | if (_index < _shopItems.Count)
|
| | | {
|
| | | var item = _shopItems[_index];
|
| | | ItemAttrData attrData = new ItemAttrData(item.itemId, false, (ulong)item.count, -1, item.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(item.itemId, false, (ulong)item.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(attrData);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | Obj.SetActive(true);
|
| | | var Item = WeekPartyAction.WeekPartyItem[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(Item.ItemID, true, (ulong)Item.ItemCnt, Item.IsBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(Item.ItemID, true, (ulong)Item.ItemCnt);
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.cellBtn.SetListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(Item.ItemID, false, (ulong)Item.ItemCnt, -1, Item.IsBind);
|
| | | var attrData = new ItemAttrData(Item.ItemID, false, (ulong)Item.ItemCnt);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | {
|
| | | public int itemId;
|
| | | public int itemCount;
|
| | | public int isBind;
|
| | | public int mark;// 排序标识
|
| | | public int rare; //// 珍稀值
|
| | |
|
| | |
| | | {
|
| | | this.itemId = id;
|
| | | this.itemCount = count;
|
| | | this.isBind = isBind;
|
| | | this.mark = mark;
|
| | | this.rare = rare;
|
| | | }
|
| | |
| | | {
|
| | | bestIcon.SetSprite(rareIconKey);
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(wellItem.itemId,false,(ulong)wellItem.itemCount,wellItem.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(wellItem.itemId,false,(ulong)wellItem.itemCount);
|
| | | itemBaisc.Init(cellModel);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(wellItem.itemId, true, (ulong)wellItem.itemCount, -1,wellItem.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(wellItem.itemId, true, (ulong)wellItem.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | } |
| | | ItemCell itemCell = obj.GetComponent<ItemCell>(); |
| | | Item item = list[i]; |
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)item.count, item.bind?1:0); |
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)item.count); |
| | | itemCell.Init(cellModel); |
| | | itemCell.cellBtn.RemoveAllListeners(); |
| | | itemCell.cellBtn.AddListener(() => |
| | | { |
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1, item.bind?1:0); |
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count); |
| | | itemTipsModel.SetItemTipsModel(attrData); |
| | | }); |
| | | } |
| | |
| | | {
|
| | | Obj.SetActive(true);
|
| | | var Item = SpringFestival.WeekPartyItem[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(Item.ItemID, true, (ulong)Item.ItemCnt, Item.IsBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(Item.ItemID, true, (ulong)Item.ItemCnt);
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.cellBtn.SetListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(Item.ItemID, false, (ulong)Item.ItemCnt, -1, Item.IsBind);
|
| | | ItemAttrData attrData = new ItemAttrData(Item.ItemID, false, (ulong)Item.ItemCnt);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | if (index < items.Count)
|
| | | {
|
| | | var item = items[index];
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1, item.bind?1:0);
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(attrData);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | m_Items[i].gameObject.SetActive(true);
|
| | | var _item = items[i];
|
| | | var _itemModel = new ItemCellModel(_item.id, false, (ulong)_item.count, _item.bind?1:0);
|
| | | var _itemModel = new ItemCellModel(_item.id, false, (ulong)_item.count);
|
| | | m_Items[i].SetItemRare(_itemModel, i == 0);
|
| | | }
|
| | | else
|
| | |
| | | ItemConfig itemConfig = ItemConfig.Get(info.itemId);
|
| | | poolItem.nameText.text = itemConfig.ItemName;
|
| | | poolItem.nameText.color = UIHelper.GetUIColor(itemConfig.ItemColor,true);
|
| | | ItemCellModel cellModel = new ItemCellModel(info.itemId,true,(ulong)info.itemCount,info.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(info.itemId,true,(ulong)info.itemCount);
|
| | | poolItem.itemBaisc.Init(cellModel);
|
| | | string rareIconKey = string.Empty;
|
| | | bool isRare = wishModel.TryGetItemRareIcon(info.rare, out rareIconKey);
|
| | |
| | | poolItem.itemBaisc.cellBtn.RemoveAllListeners();
|
| | | poolItem.itemBaisc.cellBtn.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(info.itemId,true, (ulong)info.itemCount,-1,info.isBind);
|
| | | var attrData = new ItemAttrData(info.itemId,true, (ulong)info.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | ItemConfig itemConfig = ItemConfig.Get(wellItem.itemId);
|
| | | nameText.text = itemConfig.ItemName;
|
| | | nameText.color = UIHelper.GetUIColor(itemConfig.ItemColor);
|
| | | ItemCellModel cellModel = new ItemCellModel(wellItem.itemId, false, (ulong)wellItem.itemCount, wellItem.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(wellItem.itemId, false, (ulong)wellItem.itemCount);
|
| | | itemBaisc.Init(cellModel);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(wellItem.itemId, true, (ulong)wellItem.itemCount, -1, wellItem.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(wellItem.itemId, true, (ulong)wellItem.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | {
|
| | | awardItem.parentObj.SetActive(true);
|
| | | var wellItem = wellItems[i];
|
| | | ItemCellModel cellModel = new ItemCellModel((int)wellItem.itemId, true
|
| | | , (ulong)wellItem.itemCount, wellItem.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel((int)wellItem.itemId, true , (ulong)wellItem.itemCount);
|
| | | awardItem.itemBaisc.Init(cellModel);
|
| | | string rareIconKey = string.Empty;
|
| | | bool isRare = wishModel.TryGetItemRareIcon(wellItem.rare, out rareIconKey);
|
| | |
| | | awardItem.itemBaisc.cellBtn.RemoveAllListeners();
|
| | | awardItem.itemBaisc.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData((int)wellItem.itemId, true
|
| | | , (ulong)wellItem.itemCount, -1,wellItem.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData((int)wellItem.itemId, true , (ulong)wellItem.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.LuaCallCSharp]
|
| | | public class WishingPoolModel : Model,IBeforePlayerDataInitialize,IPlayerLoginOk,IOpenServerActivity
|
| | | public class WishingPoolModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk, IOpenServerActivity
|
| | | {
|
| | | public event Action<int> UpdateWishingDataEvent;
|
| | | public event Action<int> UpdatePoolDataEvent;
|
| | | public event Action UpdateWishAwardEvent;
|
| | | public event Action<int> onStateUpate;
|
| | | public const int WishRedKey = 20915;
|
| | | public bool isOpenPrompting { get; set;}
|
| | | public bool isOpenPrompting { get; set; }
|
| | | public override void Init()
|
| | | {
|
| | | ParseConfig();
|
| | |
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | public bool IsOpen
|
| | | {
|
| | | get
|
| | | {
|
| | | public bool IsOpen {
|
| | | get {
|
| | | return OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.WishingWellInfo);
|
| | | }
|
| | | }
|
| | |
|
| | | public bool priorityOpen
|
| | | {
|
| | | get
|
| | | {
|
| | | public bool priorityOpen {
|
| | | get {
|
| | | return wishPoolRedpoint.state == RedPointState.Simple;
|
| | | }
|
| | | }
|
| | |
|
| | | public bool IsAdvance
|
| | | {
|
| | | get
|
| | | {
|
| | | public bool IsAdvance {
|
| | | get {
|
| | | return OperationTimeHepler.Instance.SatisfyAdvanceCondition(Operation.WishingWellInfo);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | if (type == Operation.WishingWellInfo && state == 0)
|
| | | {
|
| | | |
| | |
|
| | | UpdateRedpoint();
|
| | | UpdateFreeWishRedpoint();
|
| | | if (onStateUpate != null)
|
| | |
| | | int endSeconds = freeStartTime + freeRefreshCoolTime;
|
| | | DateTime endTime = TimeUtility.GetTime((uint)endSeconds);
|
| | | second = Mathf.CeilToInt((float)(endTime - TimeUtility.ServerNow).TotalSeconds);
|
| | | if(second > 0)
|
| | | if (second > 0)
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
| | |
|
| | | public bool IsBestItem()
|
| | | {
|
| | | foreach(var key in poolDataDict.Keys)
|
| | | foreach (var key in poolDataDict.Keys)
|
| | | {
|
| | | if(poolDataDict[key].rare == 1)
|
| | | if (poolDataDict[key].rare == 1)
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetItemRareIcon(int rare,out string iconKey)
|
| | | public bool TryGetItemRareIcon(int rare, out string iconKey)
|
| | | {
|
| | | iconKey = string.Empty;
|
| | | return wishItemRareDict.TryGetValue(rare,out iconKey);
|
| | | return wishItemRareDict.TryGetValue(rare, out iconKey);
|
| | | }
|
| | |
|
| | | public int handStartIndex { get; private set; }
|
| | | public int handEndIndex { get; private set;}
|
| | | public int handEndIndex { get; private set; }
|
| | | public event Action UpdateHandMoveEvent;
|
| | | public bool isClick { get; set; }
|
| | | public void SetHandMovePos(int wishIndex)
|
| | | {
|
| | | if (!isClick) return;
|
| | |
|
| | | foreach(var key in poolDataDict.Keys)
|
| | | foreach (var key in poolDataDict.Keys)
|
| | | {
|
| | | if(poolDataDict[key].itemId != 0)
|
| | | if (poolDataDict[key].itemId != 0)
|
| | | {
|
| | | handStartIndex = key;
|
| | | break;
|
| | | }
|
| | | }
|
| | | handEndIndex = wishIndex;
|
| | | if(UpdateHandMoveEvent != null)
|
| | | if (UpdateHandMoveEvent != null)
|
| | | {
|
| | | isClick = false;
|
| | | UpdateHandMoveEvent();
|
| | |
| | |
|
| | | int second = 0;
|
| | | bool isCool = TryGetFreeWishCoolTime(out second);
|
| | | if(!isCool)
|
| | | if (!isCool)
|
| | | {
|
| | | UpdateFreeWishRedpoint();
|
| | | }
|
| | |
| | | isDraging = false;
|
| | | dragIndex = -1;
|
| | | }
|
| | | public int freeRefreshCoolTime { get; private set;}
|
| | | public string wishingPriceFormula { get; private set;}
|
| | | public int freeRefreshCoolTime { get; private set; }
|
| | | public string wishingPriceFormula { get; private set; }
|
| | | public Dictionary<int, string> wishItemRareDict { get; private set; }
|
| | |
|
| | | public void ParseConfig()
|
| | |
| | | Dictionary<int, WishingWellItem> poolDataDict = new Dictionary<int, WishingWellItem>();
|
| | | public int freeStartTime { get; private set; }// 免费开始倒计时时间
|
| | | public int alreadyWishNum { get; private set; } // 许愿付费刷新次数
|
| | | public int wishingPrice { get; private set;}
|
| | | public int wishingPrice { get; private set; }
|
| | | public void SetWishingWellPlayerInfo(HAA1A_tagMCActWishingWellPlayerInfo wishInfo)
|
| | | {
|
| | | freeStartTime = (int)wishInfo.FreeStartTime;
|
| | | alreadyWishNum = (int)wishInfo.WishCnt;
|
| | | wishingPrice = GetWishingPrice((int)wishInfo.WishCnt);
|
| | | for(int i = 0; i < wishInfo.WellItemCnt; i++)
|
| | | for (int i = 0; i < wishInfo.WellItemCnt; i++)
|
| | | {
|
| | | var itemInfo = wishInfo.WellItemInfo[i];
|
| | | WishingWellItem wellItem = new WishingWellItem((int)itemInfo.ItemID,itemInfo.ItemCnt,itemInfo.IsBind,itemInfo.IsSpecial);
|
| | | SetWishingPoolData(i,wellItem);
|
| | | WishingWellItem wellItem = new WishingWellItem((int)itemInfo.ItemID, itemInfo.ItemCnt, itemInfo.IsSpecial);
|
| | | SetWishingPoolData(i, wellItem);
|
| | | }
|
| | |
|
| | | for(int i = 0; i < wishInfo.CurAwardCnt; i++)
|
| | | for (int i = 0; i < wishInfo.CurAwardCnt; i++)
|
| | | {
|
| | | var itemInfo = wishInfo.CurAwardItemInfo[i];
|
| | | WishingWellItem wellItem = new WishingWellItem((int)itemInfo.ItemID, itemInfo.ItemCnt, itemInfo.IsBind, itemInfo.IsSpecial);
|
| | | WishingWellItem wellItem = new WishingWellItem((int)itemInfo.ItemID, itemInfo.ItemCnt, itemInfo.IsSpecial);
|
| | | SetWishingData(i, wellItem);
|
| | | }
|
| | |
|
| | |
| | | for (int i = 0; i < wishInfo.LastAwardCnt; i++)
|
| | | {
|
| | | var itemInfo = wishInfo.LastAwardItemInfo[i];
|
| | | if(itemInfo.ItemID != 0)
|
| | | if (itemInfo.ItemID != 0)
|
| | | {
|
| | | WishingWellItem wellItem = new WishingWellItem((int)itemInfo.ItemID, itemInfo.ItemCnt, itemInfo.IsBind, itemInfo.IsSpecial);
|
| | | WishingWellItem wellItem = new WishingWellItem((int)itemInfo.ItemID, itemInfo.ItemCnt, itemInfo.IsSpecial);
|
| | | SetWishingAwardData(i, wellItem);
|
| | | }
|
| | | }
|
| | |
| | | public int GetWishingPrice(int wishNum)
|
| | | {
|
| | | Equation.Instance.Clear();
|
| | | Equation.Instance.AddKeyValue("refreshCnt",wishNum);
|
| | | Equation.Instance.AddKeyValue("refreshCnt", wishNum);
|
| | | return Equation.Instance.Eval<int>(wishingPriceFormula);
|
| | | }
|
| | |
|
| | | public void SetWishingResultInfo(HAA1B_tagMCActWishingDragResult result)
|
| | | {
|
| | | for(int i = 0; i < result.Cnt;i++)
|
| | | for (int i = 0; i < result.Cnt; i++)
|
| | | {
|
| | | var resultInfo = result.InfoList[i];
|
| | | WishingWellItem wellItem = new WishingWellItem((int)resultInfo.ItemID, resultInfo.ItemCnt, resultInfo.IsBind, resultInfo.IsSpecial);
|
| | | WishingWellItem wellItem = new WishingWellItem((int)resultInfo.ItemID, resultInfo.ItemCnt, resultInfo.IsSpecial);
|
| | | switch (resultInfo.WellType)
|
| | | {
|
| | | case 0:
|
| | |
| | | {
|
| | | if (!poolDataDict.ContainsKey(index))
|
| | | {
|
| | | poolDataDict.Add(index,wellItem);
|
| | | poolDataDict.Add(index, wellItem);
|
| | | }
|
| | | else
|
| | | {
|
| | | poolDataDict[index] = wellItem;
|
| | | }
|
| | | if(UpdatePoolDataEvent != null)
|
| | | if (UpdatePoolDataEvent != null)
|
| | | {
|
| | | UpdatePoolDataEvent(index);
|
| | | }
|
| | |
| | | Dictionary<int, WishingWellItem> wishingDataDict = new Dictionary<int, WishingWellItem>();
|
| | | public void SetWishingData(int index, WishingWellItem wellItem)
|
| | | {
|
| | | if(!wishingDataDict.ContainsKey(index))
|
| | | if (!wishingDataDict.ContainsKey(index))
|
| | | {
|
| | | wishingDataDict.Add(index,wellItem);
|
| | | wishingDataDict.Add(index, wellItem);
|
| | | }
|
| | | else
|
| | | {
|
| | | wishingDataDict[index] = wellItem;
|
| | | }
|
| | |
|
| | | if(UpdateWishingDataEvent != null)
|
| | | if (UpdateWishingDataEvent != null)
|
| | | {
|
| | | UpdateWishingDataEvent(index);
|
| | | }
|
| | |
| | | wishingAwardDict[index] = wellItem;
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | public bool IsBetterItem()
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetPoolDataByIndex(int index,out WishingWellItem wellItem)
|
| | | public bool TryGetPoolDataByIndex(int index, out WishingWellItem wellItem)
|
| | | {
|
| | | if(poolDataDict.TryGetValue(index, out wellItem))
|
| | | if (poolDataDict.TryGetValue(index, out wellItem))
|
| | | {
|
| | | if(wellItem.itemId != 0)
|
| | | if (wellItem.itemId != 0)
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
| | |
|
| | | public bool TryGetWishDataByIndex(int index, out WishingWellItem wellItem)
|
| | | {
|
| | | if(wishingDataDict.TryGetValue(index, out wellItem))
|
| | | if (wishingDataDict.TryGetValue(index, out wellItem))
|
| | | {
|
| | | if(wellItem.itemId != 0)
|
| | | if (wellItem.itemId != 0)
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
| | | GameNetSystem.Instance.SendInfo(getReward);
|
| | | }
|
| | |
|
| | | public void SendRefreshWishInfo(int poolIndex,int wishIndex)
|
| | | public void SendRefreshWishInfo(int poolIndex, int wishIndex)
|
| | | {
|
| | | CAA06_tagCMActWishing actWishing = new CAA06_tagCMActWishing();
|
| | | actWishing.SrcWellType = 0;
|
| | |
| | | for (int i = 0; i < 5; i++)
|
| | | {
|
| | | int redKey = WishRedKey * 100 + (i + 2);
|
| | | Redpoint redpoint = new Redpoint(WishRedKey,redKey);
|
| | | Redpoint redpoint = new Redpoint(WishRedKey, redKey);
|
| | | wishPointlist.Add(redpoint);
|
| | | }
|
| | | }
|
| | |
| | | for (int i = 0; i < wishPointlist.Count; i++)
|
| | | {
|
| | | var wishPoint = wishPointlist[i];
|
| | | if(wishPoint.state != RedPointState.None)
|
| | | if (wishPoint.state != RedPointState.None)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | {
|
| | | var wishPoint = wishPointlist[i];
|
| | | WishingWellItem wellItem = null;
|
| | | bool isWishData = TryGetWishDataByIndex(i,out wellItem);
|
| | | if(!isWishData)
|
| | | bool isWishData = TryGetWishDataByIndex(i, out wellItem);
|
| | | if (!isWishData)
|
| | | {
|
| | | wishPoint.state = RedPointState.Simple;
|
| | | return;
|
| | |
| | | {
|
| | | public int itemId;
|
| | | public int itemCount;
|
| | | public int isBind;
|
| | | public int rare;
|
| | | public WishingWellItem(int id,int count,int isBind,int rare)
|
| | |
|
| | | public WishingWellItem(int id, int count, int rare)
|
| | | {
|
| | | this.itemId = id;
|
| | | this.itemCount = count;
|
| | | this.isBind = isBind;
|
| | | this.rare = rare;
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | dragItem.dragBestIcon.SetSprite(rareIconKey);
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(wellItem.itemId,false,(ulong)wellItem.itemCount,wellItem.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(wellItem.itemId,false,(ulong)wellItem.itemCount);
|
| | | dragItem.dragItemBasic.Init(cellModel);
|
| | | poolItemCells[wishingModel.dragIndex].gameObject.SetActive(false);
|
| | | }
|
| | |
| | | if (itemData != null)
|
| | | {
|
| | | RoleParticularModel.ViewPlayerData viewPlayerData = model.GetViewPlayerData(model.viewPlayer);
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.ItemID, false, 1, -1, itemData.IsBind, false, PackType.Deleted,
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.ItemID, false, 1, -1, false, PackType.Deleted,
|
| | | "", itemData.useDataDict);
|
| | | attrData.SetStrengthData(viewPlayerData.rolePlusData.GetEquipStarLv((int)type), strengthengmodel.GameDefineIndex((int)type));
|
| | | attrData.SetGemModel(viewPlayerData.rolePlusData.GetEquipStone((int)type));
|
| | |
| | | continue;
|
| | | }
|
| | |
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.ItemID, false, 1, itemData.IsBind,
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.ItemID, false, 1,
|
| | | "", PackType.Equip, false, itemData.useDataDict);
|
| | | itemCell.Init(cellModel);
|
| | | }
|
| | |
| | | { |
| | | return; |
| | | } |
| | | ItemCellModel cellModel = new ItemCellModel(itemPathModel.chinItemModel.ID,false,0, itemPathModel.isBind); |
| | | ItemCellModel cellModel = new ItemCellModel(itemPathModel.chinItemModel.ID,false,0); |
| | | _itemCell.Init(cellModel); |
| | | _nameText.text = StringUtility.Contact(itemPathModel.chinItemModel.ItemName, " Lv.", itemPathModel.level); |
| | | _nameText.color = UIHelper.GetUIColor(itemPathModel.chinItemModel.ItemColor); |
| | |
| | | ItemConfig chinModel = ItemConfig.Get(m_storeModel.GetReplaceId(shopInfo.ID,shopInfo.ItemID));
|
| | | if (chinModel != null)
|
| | | {
|
| | | ItemCellModel cellModel = new ItemCellModel(chinModel.ID, true, 0, shopInfo.IsBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(chinModel.ID, true, 0);
|
| | | shopItemCell.itemCell.Init(cellModel);
|
| | | shopItemCell.itemNameText.text = chinModel.ItemName;
|
| | | shopItemCell.itemNameText.color = UIHelper.GetUIColor(chinModel.ItemColor);
|
| | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | OnShowWin(BuySuccessModel.Instance.ItemID,BuySuccessModel.Instance.itemCnt, BuySuccessModel.Instance.IsBind); |
| | | OnShowWin(BuySuccessModel.Instance.ItemID,BuySuccessModel.Instance.itemCnt); |
| | | isStart = true; |
| | | delayTime = 1; |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | public void OnShowWin(int itemId,int count,int isBind = 0) |
| | | public void OnShowWin(int itemId,int count) |
| | | { |
| | | _tagItemModel = ItemConfig.Get(itemId); |
| | | if (_tagItemModel == null) |
| | | return; |
| | | |
| | | ItemCellModel cellModel = new ItemCellModel(itemId,false, (ulong)count,isBind); |
| | | ItemCellModel cellModel = new ItemCellModel(itemId,false, (ulong)count); |
| | | _itemCell.Init(cellModel); |
| | | _itemNameText.text = _tagItemModel.ItemName; |
| | | _itemNameText.color = UIHelper.GetUIColor(_tagItemModel.ItemColor,true); |
| | |
| | | itemTypeText.text = itemTipsModel.curAttrData.itemConfig.ItemTypeName;
|
| | | titleText.text = itemTipsModel.curAttrData.itemConfig.ItemName;
|
| | | titleText.color = UIHelper.GetUIColor(itemTipsModel.curAttrData.itemConfig.ItemColor);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemTipsModel.curAttrData.itemId, itemTipsModel.curAttrData.isPreview, (ulong)itemTipsModel.curAttrData.count,itemTipsModel.curAttrData.isBind
|
| | | ,itemTipsModel.curAttrData.guid, itemTipsModel.curAttrData.packType,false);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemTipsModel.curAttrData.itemId, itemTipsModel.curAttrData.isPreview, (ulong)itemTipsModel.curAttrData.count,
|
| | | itemTipsModel.curAttrData.guid, itemTipsModel.curAttrData.packType,false);
|
| | | itemCell.Init(cellModel);
|
| | |
|
| | | conditionText.gameObject.SetActive(false);
|
| | |
| | | #region 设置TopUI
|
| | | titleText.text = itemTipsModel.GetItemTipsTitle(itemAttrData);
|
| | | titleText.color = UIHelper.GetUIColor(itemAttrData.itemConfig.ItemColor);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,itemAttrData.isPreview, (ulong)itemAttrData.count, itemAttrData.isBind
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,itemAttrData.isPreview, (ulong)itemAttrData.count
|
| | | ,itemAttrData.guid,itemAttrData.packType,itemAttrData.isCompare, itemAttrData.useDataDict);
|
| | | itemCell.Init(cellModel);
|
| | | equipScoreDes.text = Language.Get("EquipWin_EquipPointText_1");
|
| | |
| | | #region 设置TopUI
|
| | | titleText.text = itemTipsModel.GetItemTipsTitle(itemAttrData);
|
| | | titleText.color = UIHelper.GetUIColor(itemAttrData.itemConfig.ItemColor);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,itemAttrData.isPreview, (ulong)itemAttrData.count, itemAttrData.isBind,
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,itemAttrData.isPreview, (ulong)itemAttrData.count,
|
| | | itemAttrData.guid,itemAttrData.packType,itemAttrData.isCompare, itemAttrData.useDataDict);
|
| | | itemCell.Init(cellModel);
|
| | | equipScoreDes.text = Language.Get("EquipWin_EquipPointText_1");
|
| | |
| | | itemTypeText.text = itemTipsModel.curAttrData.itemConfig.ItemTypeName;
|
| | | titleText.text = itemTipsModel.curAttrData.itemConfig.ItemName;
|
| | | titleText.color = UIHelper.GetUIColor(itemTipsModel.curAttrData.itemConfig.ItemColor);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemTipsModel.curAttrData.itemId, itemTipsModel.curAttrData.isPreview, (ulong)itemTipsModel.curAttrData.count, itemTipsModel.curAttrData.isBind
|
| | | , itemTipsModel.curAttrData.guid, itemTipsModel.curAttrData.packType, false);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemTipsModel.curAttrData.itemId, itemTipsModel.curAttrData.isPreview, (ulong)itemTipsModel.curAttrData.count, |
| | | itemTipsModel.curAttrData.guid, itemTipsModel.curAttrData.packType, false);
|
| | | itemCell.Init(cellModel);
|
| | |
|
| | | CheckUselimit();
|
| | |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | [XLua.LuaCallCSharp] |
| | | public class BuySuccessModel : Singleton<BuySuccessModel> |
| | | [XLua.LuaCallCSharp] |
| | | public class BuySuccessModel : Singleton<BuySuccessModel> |
| | | |
| | | { |
| | | public int ItemID { get; private set; } |
| | | public int itemCnt { get; private set; } |
| | | public int IsBind { get; private set;} |
| | | |
| | | public void SetBuySuccessModel(int itemId,int count,int isBind) |
| | | public void SetBuySuccessModel(int itemId, int count ) |
| | | { |
| | | this.ItemID = itemId; |
| | | this.itemCnt = count; |
| | | this.IsBind = isBind; |
| | | } |
| | | } |
| | | } |
| | |
| | | #region 设置TopUI
|
| | | titleText.text = itemTipsModel.GetItemTipsTitle(itemAttrData);
|
| | | titleText.color = UIHelper.GetUIColor(itemAttrData.itemConfig.ItemColor);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,itemAttrData.isPreview , (ulong)itemAttrData.count, itemAttrData.isBind,
|
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,itemAttrData.isPreview , (ulong)itemAttrData.count, |
| | | itemAttrData.guid,itemAttrData.packType ,itemAttrData.isCompare, itemAttrData.useDataDict);
|
| | | itemCell.Init(cellModel);
|
| | | equipScoreDes.text = Language.Get("EquipWin_EquipPointText_1");
|
| | |
| | | ItemConfig chinModel = ItemConfig.Get(shopInfo.ItemID);
|
| | | if (chinModel != null)
|
| | | {
|
| | | ItemCellModel cellModel = new ItemCellModel(chinModel.ID,false, 0, shopInfo.IsBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(chinModel.ID,false, 0);
|
| | | runeCell.itemCell.Init(cellModel);
|
| | | string runeStr = model.GetRuneAttrStr(shopInfo.ItemID, 1);
|
| | | runeCell.itemNameText.text = runeStr;
|
| | |
| | | {
|
| | | public int itemId;
|
| | | public int count;
|
| | | public int isBind;
|
| | |
|
| | | public ShopItemInfo(int id, int count, int isBind)
|
| | | public ShopItemInfo(int id, int count)
|
| | | {
|
| | | this.itemId = id;
|
| | | this.count = count;
|
| | | this.isBind = isBind;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | if (storeConfig.ItemID != 0)
|
| | | {
|
| | | int replaceId = GetReplaceId(storeConfig.ID, storeConfig.ItemID);
|
| | | ShopItemInfo shopItem = new ShopItemInfo(replaceId, storeConfig.ItemCnt, storeConfig.IsBind);
|
| | | ShopItemInfo shopItem = new ShopItemInfo(replaceId, storeConfig.ItemCnt);
|
| | | shopItemlist.Add(shopItem);
|
| | | }
|
| | | JsonData extraItem = JsonMapper.ToObject(storeConfig.ItemListEx);
|
| | |
| | | {
|
| | | int itemId = int.Parse(extraItem[i][0].ToString());
|
| | | int itemCount = int.Parse(extraItem[i][1].ToString());
|
| | | int isBind = int.Parse(extraItem[i][2].ToString());
|
| | | if (itemId != 0)
|
| | | {
|
| | | int extraReplaceId = GetReplaceId(storeConfig.ID, itemId);
|
| | | ShopItemInfo shop = new ShopItemInfo(extraReplaceId, itemCount, isBind);
|
| | | ShopItemInfo shop = new ShopItemInfo(extraReplaceId, itemCount);
|
| | | shopItemlist.Add(shop);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | BuyItemPopModel.Instance.SetModel(shopInfo.ID);
|
| | | int itemId = GetReplaceId(shopInfo.ID, shopInfo.ItemID);
|
| | | ItemAttrData attrData = new ItemAttrData(itemId, true, (ulong)shopInfo.ItemCnt, -1, shopInfo.IsBind, true, PackType.Deleted
|
| | | ItemAttrData attrData = new ItemAttrData(itemId, true, (ulong)shopInfo.ItemCnt, -1, true, PackType.Deleted
|
| | | , "", null, ItemTipChildType.Buy);
|
| | | itemTipsModel.SetItemTipsModel(attrData, false);
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.buy, (ItemOperateType type, string id) => { OnClickBuyBtn(ItemOperateType.buy, shopInfo.ID); });
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | BuySuccessModel.Instance.SetBuySuccessModel(chinModel.ID, (int)result.ItemCnt, tagStore.IsBind);
|
| | | BuySuccessModel.Instance.SetBuySuccessModel(chinModel.ID, (int)result.ItemCnt);
|
| | | if (!WindowCenter.Instance.IsOpen<BuySuccessWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<BuySuccessWin>();
|
| | |
| | | var config = ItemConfig.Get(model.GetReplaceId(shopInfo.ID, shopInfo.ItemID));
|
| | | if (config != null)
|
| | | {
|
| | | ItemCellModel cellModel = new ItemCellModel(config.ID, true, 0, shopInfo.IsBind, "", PackType.Deleted, true);
|
| | | ItemCellModel cellModel = new ItemCellModel(config.ID, true, 0,"", PackType.Deleted, true);
|
| | | shopItemCell.itemCell.Init(cellModel);
|
| | | shopItemCell.itemNameText.text = config.ItemName;
|
| | | shopItemCell.coinsIcon.SetIconWithMoneyType(shopInfo.MoneyType);
|
| | |
| | | ItemConfig chinModel = ItemConfig.Get(m_storeModel.GetReplaceId(shopInfo.ID,shopInfo.ItemID));
|
| | | if (chinModel != null)
|
| | | {
|
| | | ItemCellModel cellModel = new ItemCellModel(chinModel.ID,false, 0, shopInfo.IsBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(chinModel.ID,false, 0);
|
| | | shopItemCell.itemCell.Init(cellModel);
|
| | | shopItemCell.itemNameText.text = chinModel.ItemName;
|
| | | shopItemCell.itemNameText.color = UIHelper.GetUIColor(chinModel.ItemColor);
|
| | |
| | | {
|
| | | if (itemModel[i].config.EquipPlace == GodBeastPart)
|
| | | {
|
| | | ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0, 0);//默认显示不上锁
|
| | | ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0);//默认显示不上锁
|
| | | m_ItemCell.Init(ItemModel);
|
| | | m_ItemCell.cellBtn.RemoveAllListeners();
|
| | | int type = i;
|
| | |
| | | {
|
| | | if (itemModel[i].config.EquipPlace == godBeastPart)
|
| | | {
|
| | | ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0, 0);//不显示绑定
|
| | | ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0);//不显示绑定
|
| | | if (godBeastModel.GodBeastRedPointDic.ContainsKey(itemModel[i].itemPlace))
|
| | | {
|
| | | m_RedPoint.redpointId = godBeastModel.GodBeastRedPointDic[(itemModel[i].itemPlace)].id;
|
| | |
| | | m_ItemType.text = itemConfig.ItemTypeName;
|
| | | m_ItemName.text = itemConfig.ItemName;
|
| | | m_ItemName.color = UIHelper.GetUIColor(itemConfig.ItemColor);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemTipsModel.curAttrData.itemId, true, itemTipsModel.curAttrData.count, itemTipsModel.curAttrData.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemTipsModel.curAttrData.itemId, true, itemTipsModel.curAttrData.count);
|
| | | m_Item.Init(cellModel);
|
| | |
|
| | | m_Condition0.gameObject.SetActive(false);
|
| | |
| | | {
|
| | | id = itemArray[0],
|
| | | count = itemArray.Length > 1 ? itemArray[1] : 1,
|
| | | bind = itemArray.Length > 2 ? (itemArray[2] == 1) : false,
|
| | | };
|
| | | }
|
| | | }
|
| | |
| | | private void DisplayItem(TreasureStage _stage)
|
| | | {
|
| | | m_ContainerItem.gameObject.SetActive(true);
|
| | | ItemCellModel itemCell = new ItemCellModel(_stage.item.id, true, (ulong)_stage.item.count, _stage.item.bind ? 1 : 0);
|
| | | ItemCellModel itemCell = new ItemCellModel(_stage.item.id, true, (ulong)_stage.item.count);
|
| | | m_Item.Init(itemCell);
|
| | | }
|
| | | }
|
| | |
| | | for (int i = 0; i < itemArray.Length; i++)
|
| | | {
|
| | | var _array = itemArray[i];
|
| | | items.Add(new Item(_array[0], _array[1], _array[2] == 1));
|
| | | items.Add(new Item(_array[0], _array[1]));
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | if (special.items != null && i < special.items.Count)
|
| | | {
|
| | | var award = special.items[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(award.id, true, (ulong)award.count, award.bind?1:0);
|
| | | ItemCellModel cellModel = new ItemCellModel(award.id, true, (ulong)award.count);
|
| | | m_Items[i].Init(cellModel);
|
| | | m_Items[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(award.id, true, (ulong)award.count, -1, award.bind?1:0);
|
| | | ItemAttrData attrData = new ItemAttrData(award.id, true, (ulong)award.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | receiveBtn.AddListener(() =>
|
| | | {
|
| | | hostModel.SetAdviceIdlist(adviceIdlist);
|
| | | ItemAttrData attrData = new ItemAttrData(adviceIdlist[0], true, 0, -1, 0, true, PackType.Deleted, "", null, ItemTipChildType.GetEquipPath);
|
| | | ItemAttrData attrData = new ItemAttrData(adviceIdlist[0], true, 0, -1, true, PackType.Deleted, "", null, ItemTipChildType.GetEquipPath);
|
| | | tipsModel.SetItemTipsModel(attrData, false);
|
| | | if (tipsModel.compareAttrData != null)
|
| | | {
|
| | |
| | | Item item = fairyJadeInvestmentItem[i];
|
| | | MotnlyItem motnlyItem = m_Group.GetChild(i).GetComponent<MotnlyItem>();
|
| | | var Item = ItemConfig.Get(item.id);
|
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)1, item.bind?1:0);
|
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)1);
|
| | | motnlyItem.Item_Cell.Init(cellModel);
|
| | |
|
| | | if (IsReceive == 0)
|
| | |
| | | var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[key].ToJson());
|
| | | for (int j = 0; j < _itemArray.Length; j++)
|
| | | {
|
| | | FairyJadeItem.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1], _itemArray[j][2]==1));
|
| | | FairyJadeItem.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1]));
|
| | | }
|
| | | }
|
| | | fairyJadeInvestment.FairyJadeInvestmentItem = FairyJadeItem;
|
| | |
| | | var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[key].ToJson());
|
| | | for (int j = 0; j < _itemArray.Length; j++)
|
| | | {
|
| | | FairyJadeItem.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1], _itemArray[j][2]==1));
|
| | | FairyJadeItem.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1]));
|
| | | }
|
| | | }
|
| | | fairyJadeInvestment.FairyJadeInvestmentItem = FairyJadeItem;
|
| | |
| | | if (firstTimeRechargeModel.TryOutDic.ContainsKey(job))
|
| | | {
|
| | | int _weaponId = firstTimeRechargeModel.TryOutDic[job];
|
| | | ItemCellModel ItemModel = new ItemCellModel(_weaponId, true, 0, 1);
|
| | | ItemCellModel ItemModel = new ItemCellModel(_weaponId, true, 0);
|
| | | m_ItemCell.Init(ItemModel);
|
| | | }
|
| | | }
|
| | |
| | | int _weaponId = firstTimeRechargeModel.TryOutDic[job];
|
| | | var config = ItemConfig.Get(_weaponId);
|
| | | UI3DModelExhibition.Instance.ShowEquipment(config.ChangeOrd, _angle, _rawImage);
|
| | | ItemCellModel ItemModel = new ItemCellModel(_weaponId,true,0,1);
|
| | | ItemCellModel ItemModel = new ItemCellModel(_weaponId,true,0);
|
| | | m_ItemCell.Init(ItemModel);
|
| | | m_ItemCell.cellBtn.RemoveAllListeners();
|
| | | m_ItemCell.cellBtn.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(_weaponId,false,1,-1,1);
|
| | | ItemAttrData attrData = new ItemAttrData(_weaponId,false,1);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | }
|
| | | m_Items[i].gameObject.SetActive(true);
|
| | | var _item = _list[i];
|
| | | var _itemModel = new ItemCellModel(_item.id, false, (ulong)_item.count, _item.bind?1:0);
|
| | | var _itemModel = new ItemCellModel(_item.id, false, (ulong)_item.count);
|
| | | m_Items[i].Init(_itemModel);
|
| | | }
|
| | | }
|
| | |
| | | if (_index < _list.Count)
|
| | | {
|
| | | var item = _list[_index];
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, true, (ulong)item.count, -1, item.bind?1:0, true);
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, true, (ulong)item.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(attrData);
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | var ItemCell = limitedTimeItemInfo.Item_Cell;
|
| | | var Item = ItemConfig.Get(items[type].itemId);
|
| | | ItemCellModel cellModel = new ItemCellModel(items[type].itemId, true, (ulong)items[type].itemCount, items[type].isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(items[type].itemId, true, (ulong)items[type].itemCount);
|
| | | ItemCell.Init(cellModel);
|
| | | ItemCell.cellBtn.RemoveAllListeners();
|
| | | ItemCell.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(items[type].itemId, false, (ulong)items[type].itemCount, -1, items[type].isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(items[type].itemId, false, (ulong)items[type].itemCount);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | int Type = i;
|
| | | Item item = NeedForWhiteItem[i];
|
| | | var Item = ItemConfig.Get(item.id);
|
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)item.count, item.bind?1:0);
|
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)item.count);
|
| | | switch (Type)
|
| | | {
|
| | | case 0:
|
| | |
| | | m_ItemCell_One.cellBtn.RemoveAllListeners();
|
| | | m_ItemCell_One.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1, item.bind ? 1 : 0);
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | break;
|
| | |
| | | m_ItemCell_Two.cellBtn.RemoveAllListeners();
|
| | | m_ItemCell_Two.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1, item.bind ? 1 : 0);
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | break;
|
| | |
| | | m_ItemCell_Three.cellBtn.RemoveAllListeners();
|
| | | m_ItemCell_Three.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1, item.bind?1:0);
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | break;
|
| | |
| | | var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[key].ToJson());
|
| | | for (int j = 0; j < _itemArray.Length; j++)
|
| | | {
|
| | | awardItem.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1], _itemArray[j][2]==1));
|
| | | awardItem.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1]));
|
| | | }
|
| | | }
|
| | | NeedForWhite.AwardItem = awardItem;
|
| | |
| | | }
|
| | | m_Items[i].gameObject.SetActive(true);
|
| | | var _item = _list[i];
|
| | | var _itemModel = new ItemCellModel(_item.id, false, (ulong)_item.count, _item.bind?1:0);
|
| | | var _itemModel = new ItemCellModel(_item.id, false, (ulong)_item.count);
|
| | | m_Items[i].SetItemRare(_itemModel, 4);
|
| | | }
|
| | | }
|
| | |
| | | if (index < _list.Count)
|
| | | {
|
| | | var item = _list[index];
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1, item.bind ? 1:0);
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(attrData);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | itemBaisc.gameObject.SetActive(true);
|
| | | InvestReward reward = rewardlist[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(reward.id, false, reward.count, reward.isBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(reward.id, false, reward.count);
|
| | | itemBaisc.Init(cellModel);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(reward.id, false, reward.count, -1, reward.isBind);
|
| | | ItemAttrData attrData = new ItemAttrData(reward.id, false, reward.count);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[_key].ToJson());
|
| | | for (int j = 0; j < _itemArray.Length; j++)
|
| | | {
|
| | | _item.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1], _itemArray[j][2]==1));
|
| | | _item.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1]));
|
| | | }
|
| | | }
|
| | | data.giftItems = _item;
|
| | |
| | | m_RechargeGainItemDict.Add(configs[i].CTGID, _itemList);
|
| | | for (int k = 0; k < _itemArray.Length; k++)
|
| | | {
|
| | | Item _item = new Item(_itemArray[k][0], _itemArray[k][1], _itemArray[k][2]==1);
|
| | | Item _item = new Item(_itemArray[k][0], _itemArray[k][1]);
|
| | | _itemList.Add(_item);
|
| | | }
|
| | | }
|
| | |
| | | var _itemArray = JsonMapper.ToObject<int[][]>(_itemJson[_key].ToJson());
|
| | | for (int i = 0; i < _itemArray.Length; i++)
|
| | | {
|
| | | Item _item = new Item(_itemArray[i][0], _itemArray[i][1], _itemArray[i][2] == 1);
|
| | | Item _item = new Item(_itemArray[i][0], _itemArray[i][1]);
|
| | | _list.Add(_item);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | if (index < m_Items.Length)
|
| | | {
|
| | | ItemCellModel cellModel = new ItemCellModel(award.id, false, (ulong)award.count, award.bind?1:0);
|
| | | ItemCellModel cellModel = new ItemCellModel(award.id, false, (ulong)award.count);
|
| | | m_Items[index].Init(cellModel);
|
| | | m_Items[index].cellBtn.RemoveAllListeners();
|
| | | m_Items[index].cellBtn.AddListener(() =>
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(award.id, false, (ulong)award.count, -1, award.bind?1:0);
|
| | | ItemAttrData attrData = new ItemAttrData(award.id, false, (ulong)award.count);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | }
|
| | | });
|
| | |
| | | {
|
| | | var itemDate = rebateGrade.items[i];
|
| | | m_RebateItems[i].gameObject.SetActive(true);
|
| | | ItemCellModel itemCell = new ItemCellModel(itemDate.itemId, true, (ulong)itemDate.count, itemDate.isBind);
|
| | | ItemCellModel itemCell = new ItemCellModel(itemDate.itemId, true, (ulong)itemDate.count);
|
| | | m_RebateItems[i].Init(itemCell);
|
| | | m_RebateItems[i].cellBtn.RemoveAllListeners();
|
| | | m_RebateItems[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData itemAttrData = new ItemAttrData(itemDate.itemId, true, (ulong)itemDate.count, -1, itemDate.isBind);
|
| | | ItemAttrData itemAttrData = new ItemAttrData(itemDate.itemId, true, (ulong)itemDate.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
|
| | | });
|
| | | }
|
| | |
| | | {
|
| | | MailItemModel itemModel = exchangeModel.getItems[i];
|
| | | itemBaiscs[i].gameObject.SetActive(true);
|
| | | ItemCellModel cellModel = new ItemCellModel((int)itemModel.ItemID,false
|
| | | ,(ulong)itemModel.Count, itemModel.IsBind,"",PackType.Deleted,
|
| | | ItemCellModel cellModel = new ItemCellModel((int)itemModel.ItemID,false ,(ulong)itemModel.Count, "",PackType.Deleted,
|
| | | false,ConfigParse.Analysis(itemModel.UserData));
|
| | | itemBaiscs[i].Init(cellModel);
|
| | | itemBaiscs[i].cellBtn.RemoveAllListeners();
|
| | | itemBaiscs[i].cellBtn.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData((int)itemModel.ItemID, false
|
| | | , (ulong)itemModel.Count,-1,itemModel.IsBind,false, PackType.Deleted,
|
| | | , (ulong)itemModel.Count,-1,false, PackType.Deleted,
|
| | | "", ConfigParse.Analysis(itemModel.UserData));
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | |
| | | _cell.items[i].gameObject.SetActive(true);
|
| | | _cell.gotImages[i].gameObject.SetActive(_isGet);
|
| | | var _item = _items[i];
|
| | | ItemCellModel _ItemData = new ItemCellModel(_item.id, false, (ulong)_item.count, _item.bind?1:0);
|
| | | ItemCellModel _ItemData = new ItemCellModel(_item.id, false, (ulong)_item.count);
|
| | | _cell.items[i].Init(_ItemData);
|
| | | _cell.items[i].cellBtn.RemoveAllListeners();
|
| | | _cell.items[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData _itemPropertyData = new ItemAttrData(_item.id, false, (ulong)_item.count, -1, _item.bind ? 1 : 0);
|
| | | ItemAttrData _itemPropertyData = new ItemAttrData(_item.id, false, (ulong)_item.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(_itemPropertyData);
|
| | | });
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | var _vipAward = model.m_VipItemDict[_cell.index];
|
| | | ItemCellModel _vipDate = new ItemCellModel(_vipAward.item.id, false, (ulong)_vipAward.item.count, _vipAward.item.bind ? 1 : 0);
|
| | | ItemCellModel _vipDate = new ItemCellModel(_vipAward.item.id, false, (ulong)_vipAward.item.count);
|
| | | _cell.vipItem.Init(_vipDate);
|
| | | _cell.vipItem.cellBtn.RemoveAllListeners();
|
| | | _cell.vipItem.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData _itemPropertyData = new ItemAttrData(_vipAward.item.id, false, (ulong)_vipAward.item.count, -1, _vipAward.item.bind ? 1 : 0);
|
| | | ItemAttrData _itemPropertyData = new ItemAttrData(_vipAward.item.id, false, (ulong)_vipAward.item.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(_itemPropertyData);
|
| | | });
|
| | | _cell.vipGotImage.gameObject.SetActive(_vipGot);
|
| | |
| | | {
|
| | | itemId = (int)_item.ItemID,
|
| | | count = _item.ItemCount,
|
| | | isBind = _item.IsBind,
|
| | | });
|
| | | }
|
| | | rebate.rebateGrades.Add(rebateGrade);
|
| | |
| | | {
|
| | | public int itemId;
|
| | | public int count;
|
| | | public int isBind;
|
| | | }
|
| | | }
|
| | | } |
| | |
| | | {
|
| | | var item = new FlashSaleItem();
|
| | | item.itemId = (int)pakGift.ItemInfo[q].ItemID;
|
| | | item.isBind = pakGift.ItemInfo[q].IsBind;
|
| | | item.itemCount = pakGift.ItemInfo[q].ItemCount;
|
| | | item.isMainItem = pakGift.ItemInfo[q].IsMainItem == 1;
|
| | | gift.items[q] = item;
|
| | |
| | | {
|
| | | public int itemId;
|
| | | public int itemCount;
|
| | | public int isBind;
|
| | | public bool isMainItem;
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | ItemAttrData attrData = new ItemAttrData(itemId, true, (ulong)itemCount, -1, 1);
|
| | | ItemAttrData attrData = new ItemAttrData(itemId, true, (ulong)itemCount);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
|
| | | }
|
| | |
| | | [SerializeField] Image m_ItemBG;
|
| | | [SerializeField] RectTransform m_ContainerVip;
|
| | | [SerializeField] Text m_VipLevel;
|
| | | [SerializeField] Image m_Bind;
|
| | | [SerializeField] Text m_Day;
|
| | | [SerializeField] Text m_Count;
|
| | | [SerializeField] RectTransform m_AlreadySignIn;
|
| | |
| | | Language.Get(StringUtility.Contact("Num_CHS_", config.VipMultiple)), Language.Get("SignInTimes"));
|
| | | m_Count.text = config.OrdinaryNum[ring] <= 1 ? string.Empty : config.OrdinaryNum[ring].ToString();
|
| | | m_Day.text = Language.Get("SignIn_4", index + 1);
|
| | | m_Bind.gameObject.SetActive(config.IsBind == 1);
|
| | | m_AlreadySignIn.gameObject.SetActive(index < model.alreadySignInCount);
|
| | | m_ContainerKeepSignIn.gameObject.SetActive(index == model.alreadySignInCount && model.todaySignIn
|
| | | && model.keepSignInCount > 0);
|
| | |
| | | itemId = config.ItemID[0];
|
| | | itemCount = config.OrdinaryNum[0];
|
| | | }
|
| | | ItemAttrData attrData = new ItemAttrData(itemId, false, (ulong)itemCount, -1, 1);
|
| | | ItemAttrData attrData = new ItemAttrData(itemId, false, (ulong)itemCount);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(attrData);
|
| | | }
|
| | | }
|
| | |
| | | [SerializeField] Text m_Count;
|
| | | public Text count { get { return m_Count; } }
|
| | |
|
| | | [SerializeField] Image m_Bind;
|
| | | public Image bind { get { return m_Bind; } }
|
| | |
|
| | | [SerializeField] Image[] m_Stars;
|
| | | public Image[] stars { get { return m_Stars; } }
|
| | |
|
| | | [SerializeField] Button m_ViewDetails;
|
| | |
|
| | | [SerializeField] ItemType m_ItemType = ItemType.Rewards;
|
| | |
| | | get; private set;
|
| | | }
|
| | |
|
| | | public bool itemBind { get; private set; }
|
| | | public int itemQuality { get; private set; }
|
| | |
|
| | | private void Awake()
|
| | |
| | |
|
| | | public void SetItem(Item _item)
|
| | | {
|
| | | SetItem(_item.id, _item.count, _item.bind, _item.quality);
|
| | | SetItem(_item.id, _item.count, _item.quality);
|
| | | }
|
| | |
|
| | | public void SetItem(int _id, int _count, bool _bind = false, int _quality = 0)
|
| | | public void SetItem(int _id, int _count, int _quality = 0)
|
| | | {
|
| | | itemId = _id;
|
| | | itemCount = _count;
|
| | | itemBind = _bind;
|
| | | itemQuality = _quality;
|
| | | DisplayBaseInfo();
|
| | | DisplayCount();
|
| | |
| | | if (countContainer != null)
|
| | | {
|
| | | countContainer.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | if (m_Stars != null)
|
| | | {
|
| | | for (int i = 0; i < m_Stars.Length; i++)
|
| | | {
|
| | | m_Stars[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | catch (System.Exception ex)
|
| | |
| | | if (backGround != null)
|
| | | {
|
| | | backGround.gameObject.SetActive(true);
|
| | |
|
| | | backGround.SetItemBackGround(itemQuality != 0 ? itemQuality : itemInfo.ItemColor);
|
| | | }
|
| | |
|
| | | if (m_Stars != null)
|
| | | {
|
| | | for (int i = 0; i < m_Stars.Length; i++)
|
| | | {
|
| | | m_Stars[i].gameObject.SetActive(i < itemInfo.StarLevel);
|
| | | }
|
| | | }
|
| | |
|
| | | if (m_Bind != null)
|
| | | {
|
| | | m_Bind.gameObject.SetActive(itemBind);
|
| | | }
|
| | | }
|
| | | catch (Exception e)
|