public void SetArmament(WrapperFollowerArmamentExt item, int garrFollowerID)
        {
            this.m_garrFollowerID = garrFollowerID;
            this.m_item           = item;
            ItemRec record = StaticDB.itemDB.GetRecord(item.ItemID);

            this.m_armamentName.text = record.Display;
            SpellTooltipRec spellTooltipRec = StaticDB.spellTooltipDB.GetRecord(item.SpellID);

            if (spellTooltipRec == null)
            {
                this.m_armamentDescription.text = string.Concat(new object[] { "ERROR. Unknown Spell ID: ", item.SpellID, " Item ID:", item.ItemID });
            }
            else
            {
                this.m_armamentDescription.text = spellTooltipRec.Description;
            }
            this.m_armamentDescription.text = WowTextParser.parser.Parse(this.m_armamentDescription.text, item.SpellID);
            if (this.m_iconErrorText != null)
            {
                this.m_iconErrorText.gameObject.SetActive(false);
            }
            Sprite sprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, record.IconFileDataID);

            if (sprite != null)
            {
                this.m_armamentIcon.sprite = sprite;
            }
            else if (this.m_iconErrorText != null)
            {
                this.m_iconErrorText.gameObject.SetActive(true);
                this.m_iconErrorText.text = string.Concat(string.Empty, record.IconFileDataID);
            }
            this.m_armamentQuantity.text = (item.Quantity <= 1 ? string.Empty : string.Concat(string.Empty, item.Quantity));
        }
Пример #2
0
    public void SetSpell(int spellID)
    {
        VW_MobileSpellRec record = StaticDB.vw_mobileSpellDB.GetRecord(spellID);

        if (record == null)
        {
            this.m_abilityNameText.text = "Err Spell ID " + spellID;
            Debug.LogWarning("Invalid spellID " + spellID);
            return;
        }
        Sprite sprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, record.SpellIconFileDataID);

        if (sprite != null)
        {
            this.m_abilityIcon.sprite = sprite;
        }
        else
        {
            Debug.LogWarning("Invalid or missing icon: " + record.SpellIconFileDataID);
        }
        this.m_abilityNameText.text = record.Name;
        SpellTooltipRec record2 = StaticDB.spellTooltipDB.GetRecord(spellID);

        if (record2 == null)
        {
            this.m_abilityNameText.text = "Err Tooltip ID " + spellID;
            Debug.LogWarning("Invalid Tooltip " + spellID);
            return;
        }
        this.m_abilityDescription.text = WowTextParser.parser.Parse(record2.Description, 0);
    }
Пример #3
0
        public static string GetItemDescription(ItemRec itemRec)
        {
            string str;
            string empty = string.Empty;
            int    num   = (
                from effectRec in StaticDB.itemEffectDB.GetRecordsByParentID(itemRec.ID)
                select effectRec.SpellID).FirstOrDefault <int>((int id) => id != 0);

            if (num > 0)
            {
                SpellTooltipRec record = StaticDB.spellTooltipDB.GetRecord(num);
                if (record == null)
                {
                    Debug.Log(string.Concat("GetItemDescription: spellID ", num, " not found in spellTooltipDB."));
                }
                else
                {
                    str   = empty;
                    empty = string.Concat(new string[] { str, "<color=#", GeneralHelpers.s_friendlyColor, ">", WowTextParser.parser.Parse(record.Description, num), "</color>" });
                }
            }
            if (itemRec.Description != null && itemRec.Description != string.Empty)
            {
                if (empty != string.Empty)
                {
                    empty = string.Concat(empty, "\n\n");
                }
                if (itemRec.ID != 141028 && itemRec.ID != 137565 && itemRec.ID != 137560 && itemRec.ID != 137561)
                {
                    str   = empty;
                    empty = string.Concat(new string[] { str, "<color=#", GeneralHelpers.s_defaultColor, ">\"", WowTextParser.parser.Parse(itemRec.Description, 0), "\"</color>" });
                }
            }
            return(empty);
        }
    public void SetArmament(MobileFollowerArmament item, FollowerDetailView followerDetailView)
    {
        this.m_armamentItem       = item;
        this.m_followerDetailView = followerDetailView;
        ItemRec record = StaticDB.itemDB.GetRecord(item.ItemID);

        this.m_equipmentName.set_text(GeneralHelpers.GetItemQualityColorTag(record.OverallQualityID) + record.Display + "</color>");
        SpellTooltipRec record2 = StaticDB.spellTooltipDB.GetRecord(item.SpellID);

        if (record2 != null)
        {
            this.m_equipmentDescription.set_text(record2.Description);
        }
        else
        {
            this.m_equipmentDescription.set_text(string.Concat(new object[]
            {
                "ERROR. Unknown Spell ID: ",
                item.SpellID,
                " Item ID:",
                item.ItemID
            }));
        }
        this.m_equipmentDescription.set_text(WowTextParser.parser.Parse(this.m_equipmentDescription.get_text(), item.SpellID));
        this.m_equipmentDescription.set_supportRichText(WowTextParser.parser.IsRichText());
        if (this.m_iconErrorText != null)
        {
            this.m_iconErrorText.get_gameObject().SetActive(false);
        }
        Sprite sprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, record.IconFileDataID);

        if (sprite != null)
        {
            this.m_equipmentIcon.set_sprite(sprite);
        }
        else if (this.m_iconErrorText != null)
        {
            this.m_iconErrorText.get_gameObject().SetActive(true);
            this.m_iconErrorText.set_text(string.Empty + record.IconFileDataID);
        }
        this.m_equipmentQuantity.set_text((item.Quantity <= 1) ? string.Empty : (string.Empty + item.Quantity));
        JamGarrisonFollower jamGarrisonFollower = PersistentFollowerData.followerDictionary.get_Item(this.m_followerDetailView.GetCurrentFollower());

        if (jamGarrisonFollower != null && jamGarrisonFollower.CurrentMissionID != 0)
        {
            this.m_useItemButtonLabel.set_text(StaticDB.GetString("ON_MISSION", null));
            this.m_useItemButtonLabel.set_color(new Color(0.5f, 0.5f, 0.5f, 1f));
            this.m_useItemButton.set_interactable(false);
        }
        else if (jamGarrisonFollower != null && (jamGarrisonFollower.ItemLevelArmor + jamGarrisonFollower.ItemLevelWeapon) / 2 >= 850)
        {
            this.m_useItemButtonLabel.set_text(FollowerInventoryListItem.m_maxiLevelString);
            this.m_useItemButtonLabel.set_color(new Color(0.5f, 0.5f, 0.5f, 1f));
            this.m_useItemButton.set_interactable(false);
        }
        else
        {
            this.m_useItemButtonLabel.set_text(StaticDB.GetString("USE_ITEM", null));
        }
    }
Пример #5
0
    public static string GetItemDescription(ItemRec itemRec)
    {
        string text    = string.Empty;
        int    spellID = 0;

        StaticDB.itemEffectDB.EnumRecordsByParentID(itemRec.ID, delegate(ItemEffectRec effectRec)
        {
            if (effectRec.SpellID == 0)
            {
                return(true);
            }
            spellID = effectRec.SpellID;
            return(false);
        });
        if (spellID > 0)
        {
            SpellTooltipRec record = StaticDB.spellTooltipDB.GetRecord(spellID);
            if (record != null)
            {
                string text2 = text;
                text = string.Concat(new string[]
                {
                    text2,
                    "<color=#",
                    GeneralHelpers.s_friendlyColor,
                    ">",
                    WowTextParser.parser.Parse(record.Description, spellID),
                    "</color>"
                });
            }
            else
            {
                Debug.Log("GetItemDescription: spellID " + spellID + " not found in spellTooltipDB.");
            }
        }
        if (itemRec.Description != null && itemRec.Description != string.Empty)
        {
            if (text != string.Empty)
            {
                text += "\n\n";
            }
            if (itemRec.ID != 141028 && itemRec.ID != 137565 && itemRec.ID != 137560 && itemRec.ID != 137561)
            {
                string text2 = text;
                text = string.Concat(new string[]
                {
                    text2,
                    "<color=#",
                    GeneralHelpers.s_defaultColor,
                    ">\"",
                    WowTextParser.parser.Parse(itemRec.Description, 0),
                    "\"</color>"
                });
            }
        }
        return(text);
    }
        public void SetEquipment(WrapperFollowerEquipment item, FollowerDetailView followerDetailView, int abilityToReplace)
        {
            this.m_abilityToReplace   = abilityToReplace;
            this.m_equipmentItem      = new WrapperFollowerEquipment?(item);
            this.m_followerDetailView = followerDetailView;
            ItemRec record = StaticDB.itemDB.GetRecord(item.ItemID);

            this.m_equipmentName.text = string.Concat(GeneralHelpers.GetItemQualityColorTag(record.OverallQualityID), record.Display, "</color>");
            GarrAbilityRec garrAbilityRec = StaticDB.garrAbilityDB.GetRecord(item.GarrAbilityID);

            if (garrAbilityRec == null)
            {
                SpellTooltipRec spellTooltipRec = StaticDB.spellTooltipDB.GetRecord(item.SpellID);
                if (spellTooltipRec == null)
                {
                    this.m_equipmentDescription.text = string.Concat(new object[] { "ERROR. Ability ID:", item.GarrAbilityID, " Spell ID: ", item.SpellID, " Item ID:", item.ItemID });
                }
                else
                {
                    this.m_equipmentDescription.text = spellTooltipRec.Description;
                }
            }
            else
            {
                this.m_equipmentDescription.text = garrAbilityRec.Description;
            }
            this.m_equipmentDescription.text            = GeneralHelpers.LimitZhLineLength(WowTextParser.parser.Parse(this.m_equipmentDescription.text, 0), 18);
            this.m_equipmentDescription.supportRichText = WowTextParser.parser.IsRichText();
            if (this.m_iconErrorText != null)
            {
                this.m_iconErrorText.gameObject.SetActive(false);
            }
            Sprite sprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, record.IconFileDataID);

            if (sprite != null)
            {
                this.m_equipmentIcon.sprite = sprite;
            }
            else if (this.m_iconErrorText != null)
            {
                this.m_iconErrorText.gameObject.SetActive(true);
                this.m_iconErrorText.text = string.Concat(string.Empty, record.IconFileDataID);
            }
            this.m_equipmentQuantity.text = (item.Quantity <= 1 ? string.Empty : string.Concat(string.Empty, item.Quantity));
            if (PersistentFollowerData.followerDictionary[this.m_followerDetailView.GetCurrentFollower()].CurrentMissionID == 0)
            {
                this.m_useItemButtonLabel.text = StaticDB.GetString("USE_ITEM", null);
            }
            else
            {
                this.m_useItemButtonLabel.text    = StaticDB.GetString("ON_MISSION", null);
                this.m_useItemButtonLabel.color   = new Color(0.5f, 0.5f, 0.5f, 1f);
                this.m_useItemButton.interactable = false;
            }
        }
    public void SetArmament(MobileFollowerArmament item, int garrFollowerID)
    {
        this.m_garrFollowerID = garrFollowerID;
        this.m_item           = item;
        ItemRec record = StaticDB.itemDB.GetRecord(item.ItemID);

        this.m_armamentName.set_text(record.Display);
        SpellTooltipRec record2 = StaticDB.spellTooltipDB.GetRecord(item.SpellID);

        if (record2 != null)
        {
            this.m_armamentDescription.set_text(record2.Description);
        }
        else
        {
            this.m_armamentDescription.set_text(string.Concat(new object[]
            {
                "ERROR. Unknown Spell ID: ",
                item.SpellID,
                " Item ID:",
                item.ItemID
            }));
        }
        this.m_armamentDescription.set_text(WowTextParser.parser.Parse(this.m_armamentDescription.get_text(), item.SpellID));
        if (this.m_iconErrorText != null)
        {
            this.m_iconErrorText.get_gameObject().SetActive(false);
        }
        Sprite sprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, record.IconFileDataID);

        if (sprite != null)
        {
            this.m_armamentIcon.set_sprite(sprite);
        }
        else if (this.m_iconErrorText != null)
        {
            this.m_iconErrorText.get_gameObject().SetActive(true);
            this.m_iconErrorText.set_text(string.Empty + record.IconFileDataID);
        }
        this.m_armamentQuantity.set_text((item.Quantity <= 1) ? string.Empty : (string.Empty + item.Quantity));
    }
Пример #8
0
    public void SetEquipment(MobileFollowerEquipment item, int garrFollowerID)
    {
        this.m_garrFollowerID = garrFollowerID;
        this.m_item           = item;
        ItemRec record = StaticDB.itemDB.GetRecord(item.ItemID);

        this.m_equipmentName.text = record.Display;
        GarrAbilityRec record2 = StaticDB.garrAbilityDB.GetRecord(item.GarrAbilityID);

        if (record2 != null)
        {
            this.m_equipmentDescription.text = record2.Description;
        }
        else
        {
            SpellTooltipRec record3 = StaticDB.spellTooltipDB.GetRecord(item.SpellID);
            if (record3 != null)
            {
                this.m_equipmentDescription.text = record3.Description;
            }
            else
            {
                this.m_equipmentDescription.text = string.Concat(new object[]
                {
                    "ERROR. Ability ID:",
                    item.GarrAbilityID,
                    " Spell ID: ",
                    item.SpellID,
                    " Item ID:",
                    item.ItemID
                });
            }
        }
        this.m_equipmentDescription.text = WowTextParser.parser.Parse(this.m_equipmentDescription.text, 0);
        if (this.m_iconErrorText != null)
        {
            this.m_iconErrorText.gameObject.SetActive(false);
        }
        Sprite sprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, record.IconFileDataID);

        if (sprite != null)
        {
            this.m_equipmentIcon.sprite = sprite;
        }
        else if (this.m_iconErrorText != null)
        {
            this.m_iconErrorText.gameObject.SetActive(true);
            this.m_iconErrorText.text = string.Empty + record.IconFileDataID;
        }
        this.m_equipmentQuantity.text = ((item.Quantity <= 1) ? string.Empty : (string.Empty + item.Quantity));
        FollowerEquipmentReplacementSlot[] componentsInChildren = this.m_followerEquipmentReplacementSlotArea.GetComponentsInChildren <FollowerEquipmentReplacementSlot>(true);
        foreach (FollowerEquipmentReplacementSlot followerEquipmentReplacementSlot in componentsInChildren)
        {
            Object.DestroyImmediate(followerEquipmentReplacementSlot.gameObject);
        }
        JamGarrisonFollower jamGarrisonFollower = PersistentFollowerData.followerDictionary[garrFollowerID];

        for (int j = 0; j < jamGarrisonFollower.AbilityID.Length; j++)
        {
            GarrAbilityRec record4 = StaticDB.garrAbilityDB.GetRecord(jamGarrisonFollower.AbilityID[j]);
            if ((record4.Flags & 1u) != 0u)
            {
                GameObject gameObject = Object.Instantiate <GameObject>(this.m_followerEquipmentReplacementSlotPrefab);
                gameObject.transform.SetParent(this.m_followerEquipmentReplacementSlotArea.transform, false);
                FollowerEquipmentReplacementSlot component = gameObject.GetComponent <FollowerEquipmentReplacementSlot>();
                component.SetAbility(jamGarrisonFollower.AbilityID[j]);
            }
        }
        FollowerEquipmentReplacementSlot[] componentsInChildren2 = this.m_followerEquipmentReplacementSlotArea.GetComponentsInChildren <FollowerEquipmentReplacementSlot>(true);
        bool flag = componentsInChildren2 != null && componentsInChildren2.Length > 0;

        this.m_noEquipmentSlotsMessage.gameObject.SetActive(!flag);
        this.m_tapASlotSlotMessage.gameObject.SetActive(flag);
    }
        public void SetArmament(WrapperFollowerArmamentExt item, FollowerDetailView followerDetailView)
        {
            this.m_armamentItem       = new WrapperFollowerArmamentExt?(item);
            this.m_followerDetailView = followerDetailView;
            ItemRec record = StaticDB.itemDB.GetRecord(item.ItemID);

            if (record == null)
            {
                this.m_equipmentName.text = string.Concat("Unknown Item ", item.ItemID);
            }
            else
            {
                this.m_equipmentName.text = string.Concat(GeneralHelpers.GetItemQualityColorTag(record.OverallQualityID), record.Display, "</color>");
            }
            SpellTooltipRec spellTooltipRec = StaticDB.spellTooltipDB.GetRecord(item.SpellID);

            if (spellTooltipRec == null)
            {
                this.m_equipmentDescription.text = string.Concat(new object[] { "ERROR. Unknown Spell ID: ", item.SpellID, " Item ID:", item.ItemID });
            }
            else
            {
                this.m_equipmentDescription.text = spellTooltipRec.Description;
            }
            this.m_equipmentDescription.text            = WowTextParser.parser.Parse(this.m_equipmentDescription.text, item.SpellID);
            this.m_equipmentDescription.supportRichText = WowTextParser.parser.IsRichText();
            if (this.m_iconErrorText != null)
            {
                this.m_iconErrorText.gameObject.SetActive(false);
            }
            if (record != null)
            {
                Sprite sprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, record.IconFileDataID);
                if (sprite != null)
                {
                    this.m_equipmentIcon.sprite = sprite;
                }
                else if (this.m_iconErrorText != null)
                {
                    this.m_iconErrorText.gameObject.SetActive(true);
                    this.m_iconErrorText.text = string.Concat(string.Empty, record.IconFileDataID);
                }
            }
            this.m_equipmentQuantity.text = (item.Quantity <= 1 ? string.Empty : string.Concat(string.Empty, item.Quantity));
            WrapperGarrisonFollower wrapperGarrisonFollower = PersistentFollowerData.followerDictionary[this.m_followerDetailView.GetCurrentFollower()];
            bool flag = false;

            if (wrapperGarrisonFollower.CurrentMissionID != 0)
            {
                GarrMissionRec garrMissionRec = StaticDB.garrMissionDB.GetRecord(wrapperGarrisonFollower.CurrentMissionID);
                if (garrMissionRec != null && (garrMissionRec.Flags & 16) != 0)
                {
                    flag = true;
                }
            }
            int  itemLevelArmor = (wrapperGarrisonFollower.ItemLevelArmor + wrapperGarrisonFollower.ItemLevelWeapon) / 2;
            bool flag1          = (itemLevelArmor < item.MinItemLevel ? false : itemLevelArmor < item.MaxItemLevel);

            if (wrapperGarrisonFollower.CurrentMissionID != 0 && !flag)
            {
                this.m_useItemButtonLabel.text    = StaticDB.GetString("ON_MISSION", null);
                this.m_useItemButtonLabel.color   = new Color(0.5f, 0.5f, 0.5f, 1f);
                this.m_useItemButton.interactable = false;
            }
            else if (!flag1 || (long)itemLevelArmor >= (ulong)GeneralHelpers.GetMaxFollowerItemLevel())
            {
                this.m_useItemButtonLabel.text    = FollowerInventoryListItem.m_maxiLevelString;
                this.m_useItemButtonLabel.color   = new Color(0.5f, 0.5f, 0.5f, 1f);
                this.m_useItemButton.interactable = false;
            }
            else
            {
                this.m_useItemButtonLabel.text = StaticDB.GetString("USE_ITEM", null);
            }
        }
Пример #10
0
    public void SetArmament(MobileFollowerArmamentExt item, FollowerDetailView followerDetailView)
    {
        this.m_armamentItem       = item;
        this.m_followerDetailView = followerDetailView;
        ItemRec record = StaticDB.itemDB.GetRecord(item.ItemID);

        if (record != null)
        {
            this.m_equipmentName.text = GeneralHelpers.GetItemQualityColorTag(record.OverallQualityID) + record.Display + "</color>";
        }
        else
        {
            this.m_equipmentName.text = "Unknown Item " + item.ItemID;
        }
        SpellTooltipRec record2 = StaticDB.spellTooltipDB.GetRecord(item.SpellID);

        if (record2 != null)
        {
            this.m_equipmentDescription.text = record2.Description;
        }
        else
        {
            this.m_equipmentDescription.text = string.Concat(new object[]
            {
                "ERROR. Unknown Spell ID: ",
                item.SpellID,
                " Item ID:",
                item.ItemID
            });
        }
        this.m_equipmentDescription.text            = WowTextParser.parser.Parse(this.m_equipmentDescription.text, item.SpellID);
        this.m_equipmentDescription.supportRichText = WowTextParser.parser.IsRichText();
        if (this.m_iconErrorText != null)
        {
            this.m_iconErrorText.gameObject.SetActive(false);
        }
        if (record != null)
        {
            Sprite sprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, record.IconFileDataID);
            if (sprite != null)
            {
                this.m_equipmentIcon.sprite = sprite;
            }
            else if (this.m_iconErrorText != null)
            {
                this.m_iconErrorText.gameObject.SetActive(true);
                this.m_iconErrorText.text = string.Empty + record.IconFileDataID;
            }
        }
        this.m_equipmentQuantity.text = ((item.Quantity <= 1) ? string.Empty : (string.Empty + item.Quantity));
        JamGarrisonFollower jamGarrisonFollower = PersistentFollowerData.followerDictionary[this.m_followerDetailView.GetCurrentFollower()];
        bool flag = false;

        if (jamGarrisonFollower != null && jamGarrisonFollower.CurrentMissionID != 0)
        {
            GarrMissionRec record3 = StaticDB.garrMissionDB.GetRecord(jamGarrisonFollower.CurrentMissionID);
            if (record3 != null && (record3.Flags & 16u) != 0u)
            {
                flag = true;
            }
        }
        int  num   = (jamGarrisonFollower.ItemLevelArmor + jamGarrisonFollower.ItemLevelWeapon) / 2;
        bool flag2 = num >= item.MinItemLevel && num < item.MaxItemLevel;

        if (jamGarrisonFollower != null && jamGarrisonFollower.CurrentMissionID != 0 && !flag)
        {
            this.m_useItemButtonLabel.text    = StaticDB.GetString("ON_MISSION", null);
            this.m_useItemButtonLabel.color   = new Color(0.5f, 0.5f, 0.5f, 1f);
            this.m_useItemButton.interactable = false;
        }
        else if (!flag2 || (long)num >= (long)((ulong)GeneralHelpers.GetMaxFollowerItemLevel()))
        {
            this.m_useItemButtonLabel.text    = FollowerInventoryListItem.m_maxiLevelString;
            this.m_useItemButtonLabel.color   = new Color(0.5f, 0.5f, 0.5f, 1f);
            this.m_useItemButton.interactable = false;
        }
        else
        {
            this.m_useItemButtonLabel.text = StaticDB.GetString("USE_ITEM", null);
        }
    }
Пример #11
0
        public void SetEquipment(WrapperFollowerEquipment item, int garrFollowerID)
        {
            this.m_garrFollowerID = garrFollowerID;
            this.m_item           = item;
            ItemRec record = StaticDB.itemDB.GetRecord(item.ItemID);

            this.m_equipmentName.text = record.Display;
            GarrAbilityRec garrAbilityRec = StaticDB.garrAbilityDB.GetRecord(item.GarrAbilityID);

            if (garrAbilityRec == null)
            {
                SpellTooltipRec spellTooltipRec = StaticDB.spellTooltipDB.GetRecord(item.SpellID);
                if (spellTooltipRec == null)
                {
                    this.m_equipmentDescription.text = string.Concat(new object[] { "ERROR. Ability ID:", item.GarrAbilityID, " Spell ID: ", item.SpellID, " Item ID:", item.ItemID });
                }
                else
                {
                    this.m_equipmentDescription.text = spellTooltipRec.Description;
                }
            }
            else
            {
                this.m_equipmentDescription.text = garrAbilityRec.Description;
            }
            this.m_equipmentDescription.text = WowTextParser.parser.Parse(this.m_equipmentDescription.text, 0);
            if (this.m_iconErrorText != null)
            {
                this.m_iconErrorText.gameObject.SetActive(false);
            }
            Sprite sprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, record.IconFileDataID);

            if (sprite != null)
            {
                this.m_equipmentIcon.sprite = sprite;
            }
            else if (this.m_iconErrorText != null)
            {
                this.m_iconErrorText.gameObject.SetActive(true);
                this.m_iconErrorText.text = string.Concat(string.Empty, record.IconFileDataID);
            }
            this.m_equipmentQuantity.text = (item.Quantity <= 1 ? string.Empty : string.Concat(string.Empty, item.Quantity));
            FollowerEquipmentReplacementSlot[] componentsInChildren = this.m_followerEquipmentReplacementSlotArea.GetComponentsInChildren <FollowerEquipmentReplacementSlot>(true);
            for (int i = 0; i < (int)componentsInChildren.Length; i++)
            {
                UnityEngine.Object.Destroy(componentsInChildren[i].gameObject);
            }
            WrapperGarrisonFollower wrapperGarrisonFollower = PersistentFollowerData.followerDictionary[garrFollowerID];

            for (int j = 0; j < wrapperGarrisonFollower.AbilityIDs.Count; j++)
            {
                if ((StaticDB.garrAbilityDB.GetRecord(wrapperGarrisonFollower.AbilityIDs[j]).Flags & 1) != 0)
                {
                    GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.m_followerEquipmentReplacementSlotPrefab);
                    gameObject.transform.SetParent(this.m_followerEquipmentReplacementSlotArea.transform, false);
                    gameObject.GetComponent <FollowerEquipmentReplacementSlot>().SetAbility(wrapperGarrisonFollower.AbilityIDs[j]);
                }
            }
            FollowerEquipmentReplacementSlot[] followerEquipmentReplacementSlotArray = this.m_followerEquipmentReplacementSlotArea.GetComponentsInChildren <FollowerEquipmentReplacementSlot>(true);
            bool flag = (followerEquipmentReplacementSlotArray == null ? false : (int)followerEquipmentReplacementSlotArray.Length > 0);

            this.m_noEquipmentSlotsMessage.gameObject.SetActive(!flag);
            this.m_tapASlotSlotMessage.gameObject.SetActive(flag);
        }