Beispiel #1
0
        public void SortCharacterList()
        {
            CharacterListButton[]      componentsInChildren = this.charListContents.transform.GetComponentsInChildren <CharacterListButton>(true);
            List <CharacterListButton> list = new List <CharacterListButton>();

            foreach (CharacterListButton item in componentsInChildren)
            {
                list.Add(item);
            }
            CharacterListView.CharacterButtonComparer comparer = new CharacterListView.CharacterButtonComparer();
            list.Sort(comparer);
            for (int j = 0; j < list.Count; j++)
            {
                foreach (CharacterListButton characterListButton in componentsInChildren)
                {
                    if (characterListButton.m_characterEntry.PlayerGuid == list[j].m_characterEntry.PlayerGuid)
                    {
                        characterListButton.transform.SetSiblingIndex(j);
                        break;
                    }
                }
            }
            for (int l = 0; l < list.Count; l++)
            {
                FancyEntrance component = list[l].GetComponent <FancyEntrance>();
                component.m_timeToDelayEntrance = this.m_listItemInitialEntranceDelay + this.m_listItemEntranceDelay * (float)l;
                component.Activate();
            }
        }
Beispiel #2
0
    public void SortCharacterList()
    {
        CharacterListButton[]      componentsInChildren = this.charListContents.get_transform().GetComponentsInChildren <CharacterListButton>(true);
        List <CharacterListButton> list = new List <CharacterListButton>();

        CharacterListButton[] array = componentsInChildren;
        for (int i = 0; i < array.Length; i++)
        {
            CharacterListButton characterListButton = array[i];
            list.Add(characterListButton);
        }
        CharacterListView.CharacterButtonComparer characterButtonComparer = new CharacterListView.CharacterButtonComparer();
        list.Sort(characterButtonComparer);
        for (int j = 0; j < list.get_Count(); j++)
        {
            CharacterListButton[] array2 = componentsInChildren;
            for (int k = 0; k < array2.Length; k++)
            {
                CharacterListButton characterListButton2 = array2[k];
                if (characterListButton2.m_characterEntry.PlayerGuid == list.get_Item(j).m_characterEntry.PlayerGuid)
                {
                    characterListButton2.get_transform().SetSiblingIndex(j);
                    break;
                }
            }
        }
        for (int l = 0; l < list.get_Count(); l++)
        {
            FancyEntrance component = list.get_Item(l).GetComponent <FancyEntrance>();
            component.m_timeToDelayEntrance = this.m_listItemInitialEntranceDelay + this.m_listItemEntranceDelay * (float)l;
            component.Activate();
        }
    }
        public void AddGameAccountButton(EntityId gameAccount, string name, bool isBanned, bool isSuspended)
        {
            BnLoginButton[] componentsInChildren = this.loginListContents.GetComponentsInChildren <BnLoginButton>();
            int             num        = (componentsInChildren == null ? 0 : (int)componentsInChildren.Length);
            GameObject      gameObject = UnityEngine.Object.Instantiate <GameObject>(this.gameAccountButtonPrefab);

            gameObject.transform.SetParent(this.loginListContents.transform, false);
            gameObject.GetComponent <BnGameAccountButton>().SetInfo(gameAccount, name, isBanned, isSuspended);
            FancyEntrance component = gameObject.GetComponent <FancyEntrance>();

            component.m_timeToDelayEntrance = this.m_listItemInitialEntranceDelay + this.m_listItemEntranceDelay * (float)num;
            component.Activate();
        }
        public void AddBnLoginButton(string realmName, ulong realmAddress, string subRegion, int characterCount, bool online)
        {
            BnLoginButton[] componentsInChildren = this.loginListContents.GetComponentsInChildren <BnLoginButton>();
            int             num        = (componentsInChildren == null ? 0 : (int)componentsInChildren.Length);
            GameObject      gameObject = UnityEngine.Object.Instantiate <GameObject>(this.bnLoginListItemPrefab);

            gameObject.transform.SetParent(this.loginListContents.transform, false);
            gameObject.GetComponent <BnLoginButton>().SetInfo(realmAddress, realmName, subRegion, characterCount, online);
            FancyEntrance component = gameObject.GetComponent <FancyEntrance>();

            component.m_timeToDelayEntrance = this.m_listItemInitialEntranceDelay + this.m_listItemEntranceDelay * (float)num;
            component.Activate();
        }
        private void InitFollowerExperienceDisplays()
        {
            int num = 0;

            foreach (WrapperGarrisonFollower value in PersistentFollowerData.preMissionFollowerDictionary.Values)
            {
                if (value.CurrentMissionID == this.m_garrMissionID)
                {
                    GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.m_followerExperienceDisplayPrefab);
                    FollowerExperienceDisplay component     = gameObject.GetComponent <FollowerExperienceDisplay>();
                    FancyEntrance             fancyEntrance = gameObject.GetComponent <FancyEntrance>();
                    float mExperienceDisplayEntranceDelay   = (float)num * this.m_experienceDisplayEntranceDelay;
                    fancyEntrance.m_timeToDelayEntrance = mExperienceDisplayEntranceDelay;
                    fancyEntrance.Activate();
                    component.SetFollower(value, value, mExperienceDisplayEntranceDelay);
                    component.transform.SetParent(this.m_followerExperienceDisplayArea.transform, false);
                    num++;
                }
            }
        }
        private void InitFollowerExperienceDisplays()
        {
            int num = 0;

            foreach (WrapperGarrisonFollower wrapperGarrisonFollower in PersistentFollowerData.preMissionFollowerDictionary.Values)
            {
                if (wrapperGarrisonFollower.CurrentMissionID == this.m_garrMissionID)
                {
                    GameObject gameObject = Object.Instantiate <GameObject>(this.m_followerExperienceDisplayPrefab);
                    FollowerExperienceDisplay component  = gameObject.GetComponent <FollowerExperienceDisplay>();
                    FancyEntrance             component2 = gameObject.GetComponent <FancyEntrance>();
                    float num2 = (float)num * this.m_experienceDisplayEntranceDelay;
                    component2.m_timeToDelayEntrance = num2;
                    component2.Activate();
                    component.SetFollower(wrapperGarrisonFollower, wrapperGarrisonFollower, num2);
                    component.transform.SetParent(this.m_followerExperienceDisplayArea.transform, false);
                    num++;
                }
            }
        }
        public void SortCharacterList()
        {
            CharacterListButton[]      componentsInChildren = this.charListContents.transform.GetComponentsInChildren <CharacterListButton>(true);
            List <CharacterListButton> characterListButtons = new List <CharacterListButton>();

            CharacterListButton[] characterListButtonArray = componentsInChildren;
            for (int i = 0; i < (int)characterListButtonArray.Length; i++)
            {
                characterListButtons.Add(characterListButtonArray[i]);
            }
            characterListButtons.Sort(new CharacterListView.CharacterButtonComparer());
            for (int j = 0; j < characterListButtons.Count; j++)
            {
                CharacterListButton[] characterListButtonArray1 = componentsInChildren;
                int num = 0;
                while (num < (int)characterListButtonArray1.Length)
                {
                    CharacterListButton characterListButton = characterListButtonArray1[num];
                    if (characterListButton.m_characterEntry.PlayerGuid != characterListButtons[j].m_characterEntry.PlayerGuid)
                    {
                        num++;
                    }
                    else
                    {
                        characterListButton.transform.SetSiblingIndex(j);
                        break;
                    }
                }
            }
            for (int k = 0; k < characterListButtons.Count; k++)
            {
                FancyEntrance component = characterListButtons[k].GetComponent <FancyEntrance>();
                component.m_timeToDelayEntrance = this.m_listItemInitialEntranceDelay + this.m_listItemEntranceDelay * (float)k;
                component.Activate();
            }
        }
Beispiel #8
0
    private void InitFollowerExperienceDisplays()
    {
        int num = 0;

        using (Dictionary <int, JamGarrisonFollower> .ValueCollection.Enumerator enumerator = PersistentFollowerData.preMissionFollowerDictionary.get_Values().GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                JamGarrisonFollower current = enumerator.get_Current();
                if (current.CurrentMissionID == this.m_garrMissionID)
                {
                    GameObject gameObject = Object.Instantiate <GameObject>(this.m_followerExperienceDisplayPrefab);
                    FollowerExperienceDisplay component  = gameObject.GetComponent <FollowerExperienceDisplay>();
                    FancyEntrance             component2 = gameObject.GetComponent <FancyEntrance>();
                    float num2 = (float)num * this.m_experienceDisplayEntranceDelay;
                    component2.m_timeToDelayEntrance = num2;
                    component2.Activate();
                    component.SetFollower(current, current, num2);
                    component.get_transform().SetParent(this.m_followerExperienceDisplayArea.get_transform(), false);
                    num++;
                }
            }
        }
    }
        private void InitList()
        {
            List <WrapperShipmentType> availableShipmentTypes = PersistentShipmentData.GetAvailableShipmentTypes();

            if (availableShipmentTypes == null || availableShipmentTypes.Count == 0)
            {
                this.m_noRecruitsYetMessage.gameObject.SetActive(true);
            }
            else
            {
                this.m_noRecruitsYetMessage.gameObject.SetActive(false);
            }
            TroopsListItem[] componentsInChildren = this.m_troopsListContents.GetComponentsInChildren <TroopsListItem>(true);
            TroopsListItem[] troopsListItemArray  = componentsInChildren;
            for (int i = 0; i < (int)troopsListItemArray.Length; i++)
            {
                TroopsListItem troopsListItem = troopsListItemArray[i];
                bool           flag           = true;
                if (availableShipmentTypes != null)
                {
                    foreach (WrapperShipmentType availableShipmentType in availableShipmentTypes)
                    {
                        if (troopsListItem.GetCharShipmentTypeID() != availableShipmentType.CharShipmentID)
                        {
                            continue;
                        }
                        flag = false;
                        break;
                    }
                }
                if (flag)
                {
                    UnityEngine.Object.Destroy(troopsListItem.gameObject);
                }
            }
            if (availableShipmentTypes == null)
            {
                return;
            }
            componentsInChildren = this.m_troopsListContents.GetComponentsInChildren <TroopsListItem>(true);
            for (int j = 0; j < availableShipmentTypes.Count; j++)
            {
                bool             flag1 = false;
                TroopsListItem[] troopsListItemArray1 = componentsInChildren;
                int num = 0;
                while (num < (int)troopsListItemArray1.Length)
                {
                    if (troopsListItemArray1[num].GetCharShipmentTypeID() != availableShipmentTypes[j].CharShipmentID)
                    {
                        num++;
                    }
                    else
                    {
                        flag1 = true;
                        break;
                    }
                }
                if (!flag1)
                {
                    GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.m_troopsListItemPrefab);
                    gameObject.transform.SetParent(this.m_troopsListContents.transform, false);
                    TroopsListItem component = gameObject.GetComponent <TroopsListItem>();
                    component.SetCharShipment(new WrapperShipmentType?(availableShipmentTypes[j]), false, null);
                    FancyEntrance mListItemInitialEntranceDelay = component.GetComponent <FancyEntrance>();
                    mListItemInitialEntranceDelay.m_timeToDelayEntrance = this.m_listItemInitialEntranceDelay + this.m_listItemEntranceDelay * (float)j;
                    mListItemInitialEntranceDelay.Activate();
                }
            }
            foreach (WrapperCharacterShipment value in PersistentShipmentData.shipmentDictionary.Values)
            {
                if (!PersistentShipmentData.ShipmentTypeForShipmentIsAvailable(value.ShipmentRecID))
                {
                    bool flag2 = true;
                    bool flag3 = false;
                    if (value.ShipmentRecID < 372 || value.ShipmentRecID > 383)
                    {
                        flag2 = false;
                    }
                    if (value.ShipmentRecID == 178 || value.ShipmentRecID == 179 || value.ShipmentRecID == 180 || value.ShipmentRecID == 192 || value.ShipmentRecID == 194 || value.ShipmentRecID == 195)
                    {
                        flag3 = true;
                    }
                    if (flag2 || flag3)
                    {
                        CharShipmentRec record = StaticDB.charShipmentDB.GetRecord(value.ShipmentRecID);
                        if (record != null)
                        {
                            GameObject gameObject1 = UnityEngine.Object.Instantiate <GameObject>(this.m_troopsListItemPrefab);
                            gameObject1.transform.SetParent(this.m_troopsListContents.transform, false);
                            gameObject1.GetComponent <TroopsListItem>().SetCharShipment(null, true, record);
                        }
                    }
                }
            }
        }
Beispiel #10
0
 private void InitList()
 {
     MobileClientShipmentType[] availableShipmentTypes = PersistentShipmentData.GetAvailableShipmentTypes();
     if (availableShipmentTypes == null || availableShipmentTypes.Length == 0)
     {
         this.m_noRecruitsYetMessage.get_gameObject().SetActive(true);
     }
     else
     {
         this.m_noRecruitsYetMessage.get_gameObject().SetActive(false);
     }
     TroopsListItem[] componentsInChildren = this.m_troopsListContents.GetComponentsInChildren <TroopsListItem>();
     TroopsListItem[] array = componentsInChildren;
     for (int i = 0; i < array.Length; i++)
     {
         TroopsListItem troopsListItem = array[i];
         bool           flag           = true;
         if (availableShipmentTypes != null)
         {
             MobileClientShipmentType[] array2 = availableShipmentTypes;
             for (int j = 0; j < array2.Length; j++)
             {
                 MobileClientShipmentType mobileClientShipmentType = array2[j];
                 if (troopsListItem.GetCharShipmentTypeID() == mobileClientShipmentType.CharShipmentID)
                 {
                     flag = false;
                     break;
                 }
             }
         }
         if (flag)
         {
             Object.DestroyImmediate(troopsListItem.get_gameObject());
         }
     }
     if (availableShipmentTypes == null)
     {
         return;
     }
     componentsInChildren = this.m_troopsListContents.GetComponentsInChildren <TroopsListItem>();
     for (int k = 0; k < availableShipmentTypes.Length; k++)
     {
         bool             flag2  = false;
         TroopsListItem[] array3 = componentsInChildren;
         for (int l = 0; l < array3.Length; l++)
         {
             TroopsListItem troopsListItem2 = array3[l];
             if (troopsListItem2.GetCharShipmentTypeID() == availableShipmentTypes[k].CharShipmentID)
             {
                 flag2 = true;
                 break;
             }
         }
         if (!flag2)
         {
             GameObject gameObject = Object.Instantiate <GameObject>(this.m_troopsListItemPrefab);
             gameObject.get_transform().SetParent(this.m_troopsListContents.get_transform(), false);
             TroopsListItem component = gameObject.GetComponent <TroopsListItem>();
             component.SetCharShipment(availableShipmentTypes[k]);
             FancyEntrance component2 = component.GetComponent <FancyEntrance>();
             component2.m_timeToDelayEntrance = this.m_listItemInitialEntranceDelay + this.m_listItemEntranceDelay * (float)k;
             component2.Activate();
         }
     }
 }
Beispiel #11
0
        private void InitList()
        {
            List <WrapperShipmentType> availableShipmentTypes = PersistentShipmentData.GetAvailableShipmentTypes();

            if (availableShipmentTypes == null || availableShipmentTypes.Count == 0)
            {
                this.m_noRecruitsYetMessage.gameObject.SetActive(true);
            }
            else
            {
                this.m_noRecruitsYetMessage.gameObject.SetActive(false);
            }
            TroopsListItem[] componentsInChildren = this.m_troopsListContents.GetComponentsInChildren <TroopsListItem>(true);
            foreach (TroopsListItem troopsListItem in componentsInChildren)
            {
                bool flag = true;
                if (availableShipmentTypes != null)
                {
                    foreach (WrapperShipmentType wrapperShipmentType in availableShipmentTypes)
                    {
                        if (troopsListItem.GetCharShipmentTypeID() == wrapperShipmentType.CharShipmentID)
                        {
                            flag = false;
                            break;
                        }
                    }
                }
                if (flag)
                {
                    Object.Destroy(troopsListItem.gameObject);
                }
            }
            if (availableShipmentTypes == null)
            {
                return;
            }
            componentsInChildren = this.m_troopsListContents.GetComponentsInChildren <TroopsListItem>(true);
            for (int j = 0; j < availableShipmentTypes.Count; j++)
            {
                bool flag2 = false;
                foreach (TroopsListItem troopsListItem2 in componentsInChildren)
                {
                    if (troopsListItem2.GetCharShipmentTypeID() == availableShipmentTypes[j].CharShipmentID)
                    {
                        flag2 = true;
                        break;
                    }
                }
                if (!flag2)
                {
                    GameObject gameObject = Object.Instantiate <GameObject>(this.m_troopsListItemPrefab);
                    gameObject.transform.SetParent(this.m_troopsListContents.transform, false);
                    TroopsListItem component = gameObject.GetComponent <TroopsListItem>();
                    component.SetCharShipment(new WrapperShipmentType?(availableShipmentTypes[j]), false, null);
                    FancyEntrance component2 = component.GetComponent <FancyEntrance>();
                    component2.m_timeToDelayEntrance = this.m_listItemInitialEntranceDelay + this.m_listItemEntranceDelay * (float)j;
                    component2.Activate();
                }
            }
            foreach (WrapperCharacterShipment wrapperCharacterShipment in PersistentShipmentData.shipmentDictionary.Values)
            {
                if (!PersistentShipmentData.ShipmentTypeForShipmentIsAvailable(wrapperCharacterShipment.ShipmentRecID))
                {
                    bool flag3 = true;
                    bool flag4 = false;
                    if (wrapperCharacterShipment.ShipmentRecID < 372 || wrapperCharacterShipment.ShipmentRecID > 383)
                    {
                        flag3 = false;
                    }
                    if (wrapperCharacterShipment.ShipmentRecID == 178 || wrapperCharacterShipment.ShipmentRecID == 179 || wrapperCharacterShipment.ShipmentRecID == 180 || wrapperCharacterShipment.ShipmentRecID == 192 || wrapperCharacterShipment.ShipmentRecID == 194 || wrapperCharacterShipment.ShipmentRecID == 195)
                    {
                        flag4 = true;
                    }
                    if (flag3 || flag4)
                    {
                        CharShipmentRec record = StaticDB.charShipmentDB.GetRecord(wrapperCharacterShipment.ShipmentRecID);
                        if (record != null)
                        {
                            GameObject gameObject2 = Object.Instantiate <GameObject>(this.m_troopsListItemPrefab);
                            gameObject2.transform.SetParent(this.m_troopsListContents.transform, false);
                            TroopsListItem component3 = gameObject2.GetComponent <TroopsListItem>();
                            component3.SetCharShipment(null, true, record);
                        }
                    }
                }
            }
        }
Beispiel #12
0
    private void InitList()
    {
        MobileClientShipmentType[] availableShipmentTypes = PersistentShipmentData.GetAvailableShipmentTypes();
        if (availableShipmentTypes == null || availableShipmentTypes.Length == 0)
        {
            this.m_noRecruitsYetMessage.gameObject.SetActive(true);
        }
        else
        {
            this.m_noRecruitsYetMessage.gameObject.SetActive(false);
        }
        TroopsListItem[] componentsInChildren = this.m_troopsListContents.GetComponentsInChildren <TroopsListItem>(true);
        foreach (TroopsListItem troopsListItem in componentsInChildren)
        {
            bool flag = true;
            if (availableShipmentTypes != null)
            {
                foreach (MobileClientShipmentType mobileClientShipmentType in availableShipmentTypes)
                {
                    if (troopsListItem.GetCharShipmentTypeID() == mobileClientShipmentType.CharShipmentID)
                    {
                        flag = false;
                        break;
                    }
                }
            }
            if (flag)
            {
                Object.DestroyImmediate(troopsListItem.gameObject);
            }
        }
        if (availableShipmentTypes == null)
        {
            return;
        }
        componentsInChildren = this.m_troopsListContents.GetComponentsInChildren <TroopsListItem>(true);
        for (int k = 0; k < availableShipmentTypes.Length; k++)
        {
            bool flag2 = false;
            foreach (TroopsListItem troopsListItem2 in componentsInChildren)
            {
                if (troopsListItem2.GetCharShipmentTypeID() == availableShipmentTypes[k].CharShipmentID)
                {
                    flag2 = true;
                    break;
                }
            }
            if (!flag2)
            {
                GameObject gameObject = Object.Instantiate <GameObject>(this.m_troopsListItemPrefab);
                gameObject.transform.SetParent(this.m_troopsListContents.transform, false);
                TroopsListItem component = gameObject.GetComponent <TroopsListItem>();
                component.SetCharShipment(availableShipmentTypes[k], false, null);
                FancyEntrance component2 = component.GetComponent <FancyEntrance>();
                component2.m_timeToDelayEntrance = this.m_listItemInitialEntranceDelay + this.m_listItemEntranceDelay * (float)k;
                component2.Activate();
            }
        }
        IEnumerator enumerator = PersistentShipmentData.shipmentDictionary.Values.GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                object obj = enumerator.Current;
                JamCharacterShipment jamCharacterShipment = (JamCharacterShipment)obj;
                if (!PersistentShipmentData.ShipmentTypeForShipmentIsAvailable(jamCharacterShipment.ShipmentRecID))
                {
                    bool flag3 = true;
                    bool flag4 = false;
                    if (jamCharacterShipment.ShipmentRecID < 372 || jamCharacterShipment.ShipmentRecID > 383)
                    {
                        flag3 = false;
                    }
                    if (jamCharacterShipment.ShipmentRecID == 178 || jamCharacterShipment.ShipmentRecID == 179 || jamCharacterShipment.ShipmentRecID == 180 || jamCharacterShipment.ShipmentRecID == 192 || jamCharacterShipment.ShipmentRecID == 194 || jamCharacterShipment.ShipmentRecID == 195)
                    {
                        flag4 = true;
                    }
                    if (flag3 || flag4)
                    {
                        CharShipmentRec record = StaticDB.charShipmentDB.GetRecord(jamCharacterShipment.ShipmentRecID);
                        if (record != null)
                        {
                            GameObject gameObject2 = Object.Instantiate <GameObject>(this.m_troopsListItemPrefab);
                            gameObject2.transform.SetParent(this.m_troopsListContents.transform, false);
                            TroopsListItem component3 = gameObject2.GetComponent <TroopsListItem>();
                            component3.SetCharShipment(null, true, record);
                        }
                    }
                }
            }
        }
        finally
        {
            IDisposable disposable;
            if ((disposable = (enumerator as IDisposable)) != null)
            {
                disposable.Dispose();
            }
        }
    }
Beispiel #13
0
    private void InitList()
    {
        MobileClientShipmentType[] availableShipmentTypes = PersistentShipmentData.GetAvailableShipmentTypes();
        if (availableShipmentTypes == null || availableShipmentTypes.Length == 0)
        {
            this.m_noRecruitsYetMessage.get_gameObject().SetActive(true);
        }
        else
        {
            this.m_noRecruitsYetMessage.get_gameObject().SetActive(false);
        }
        TroopsListItem[] componentsInChildren = this.m_troopsListContents.GetComponentsInChildren <TroopsListItem>(true);
        TroopsListItem[] array = componentsInChildren;
        for (int i = 0; i < array.Length; i++)
        {
            TroopsListItem troopsListItem = array[i];
            bool           flag           = true;
            if (availableShipmentTypes != null)
            {
                MobileClientShipmentType[] array2 = availableShipmentTypes;
                for (int j = 0; j < array2.Length; j++)
                {
                    MobileClientShipmentType mobileClientShipmentType = array2[j];
                    if (troopsListItem.GetCharShipmentTypeID() == mobileClientShipmentType.CharShipmentID)
                    {
                        flag = false;
                        break;
                    }
                }
            }
            if (flag)
            {
                Object.DestroyImmediate(troopsListItem.get_gameObject());
            }
        }
        if (availableShipmentTypes == null)
        {
            return;
        }
        componentsInChildren = this.m_troopsListContents.GetComponentsInChildren <TroopsListItem>(true);
        for (int k = 0; k < availableShipmentTypes.Length; k++)
        {
            bool             flag2  = false;
            TroopsListItem[] array3 = componentsInChildren;
            for (int l = 0; l < array3.Length; l++)
            {
                TroopsListItem troopsListItem2 = array3[l];
                if (troopsListItem2.GetCharShipmentTypeID() == availableShipmentTypes[k].CharShipmentID)
                {
                    flag2 = true;
                    break;
                }
            }
            if (!flag2)
            {
                GameObject gameObject = Object.Instantiate <GameObject>(this.m_troopsListItemPrefab);
                gameObject.get_transform().SetParent(this.m_troopsListContents.get_transform(), false);
                TroopsListItem component = gameObject.GetComponent <TroopsListItem>();
                component.SetCharShipment(availableShipmentTypes[k], false, null);
                FancyEntrance component2 = component.GetComponent <FancyEntrance>();
                component2.m_timeToDelayEntrance = this.m_listItemInitialEntranceDelay + this.m_listItemEntranceDelay * (float)k;
                component2.Activate();
            }
        }
        IEnumerator enumerator = PersistentShipmentData.shipmentDictionary.get_Values().GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                JamCharacterShipment jamCharacterShipment = (JamCharacterShipment)enumerator.get_Current();
                if (!PersistentShipmentData.ShipmentTypeForShipmentIsAvailable(jamCharacterShipment.ShipmentRecID))
                {
                    CharShipmentRec record = StaticDB.charShipmentDB.GetRecord(jamCharacterShipment.ShipmentRecID);
                    if (record != null)
                    {
                        GameObject gameObject2 = Object.Instantiate <GameObject>(this.m_troopsListItemPrefab);
                        gameObject2.get_transform().SetParent(this.m_troopsListContents.get_transform(), false);
                        TroopsListItem component3 = gameObject2.GetComponent <TroopsListItem>();
                        component3.SetCharShipment(null, true, record);
                    }
                }
            }
        }
        finally
        {
            IDisposable disposable = enumerator as IDisposable;
            if (disposable != null)
            {
                disposable.Dispose();
            }
        }
    }