public void InitializeContentList() { this.ReleaseContentList(); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_ContentController, (UnityEngine.Object)null)) { return; } this.m_ContentSource = new FriendPresentWantWindow.Content.ItemSource(); FriendPresentItemParam[] presentItemParams = MonoSingleton <GameManager> .Instance.MasterParam.GetFriendPresentItemParams(); List <FriendPresentItemParam> list = new List <FriendPresentItemParam>(); for (int index = 0; index < presentItemParams.Length; ++index) { if (!presentItemParams[index].IsDefault() && presentItemParams[index].IsValid(Network.GetServerTime())) { list.Add(presentItemParams[index]); } } long serverTime = Network.GetServerTime(); SortUtility.StableSort <FriendPresentItemParam>(list, (Comparison <FriendPresentItemParam>)((p1, p2) => (!p1.HasTimeLimit() ? long.MaxValue : p1.GetRestTime(serverTime)).CompareTo(!p2.HasTimeLimit() ? long.MaxValue : p2.GetRestTime(serverTime)))); for (int index = 0; index < list.Count; ++index) { FriendPresentWantWindow.Content.ItemSource.ItemParam itemParam = new FriendPresentWantWindow.Content.ItemSource.ItemParam(list[index]); if (itemParam.IsValid()) { this.m_ContentSource.Add(itemParam); } } this.m_ContentController.Initialize((ContentSource)this.m_ContentSource, Vector2.get_zero()); }
public void Add(FriendPresentWantWindow.Content.ItemSource.ItemParam param) { if (!param.IsValid()) { return; } this.m_Params.Add(param); }
public void InitializeContentList() { this.ReleaseContentList(); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_ContentController, (UnityEngine.Object)null)) { return; } // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type FriendPresentWantWindow.\u003CInitializeContentList\u003Ec__AnonStorey331 listCAnonStorey331 = new FriendPresentWantWindow.\u003CInitializeContentList\u003Ec__AnonStorey331(); this.m_ContentSource = new FriendPresentWantWindow.Content.ItemSource(); FriendPresentItemParam[] presentItemParams = MonoSingleton <GameManager> .Instance.MasterParam.GetFriendPresentItemParams(); List <FriendPresentItemParam> list = new List <FriendPresentItemParam>(); for (int index = 0; index < presentItemParams.Length; ++index) { if (!presentItemParams[index].IsDefault() && presentItemParams[index].IsValid(Network.GetServerTime())) { list.Add(presentItemParams[index]); } } // ISSUE: reference to a compiler-generated field listCAnonStorey331.serverTime = Network.GetServerTime(); // ISSUE: reference to a compiler-generated method SortUtility.StableSort <FriendPresentItemParam>(list, new Comparison <FriendPresentItemParam>(listCAnonStorey331.\u003C\u003Em__378)); for (int index = 0; index < list.Count; ++index) { FriendPresentWantWindow.Content.ItemSource.ItemParam itemParam = new FriendPresentWantWindow.Content.ItemSource.ItemParam(list[index]); if (itemParam.IsValid()) { this.m_ContentSource.Add(itemParam); } } this.m_ContentController.Initialize((ContentSource)this.m_ContentSource, Vector2.get_zero()); }