public static bool Prefix(ItemDrop.ItemData item, UITooltip tooltip)
        {
            string tooltipText;

            if (item.IsEquipable() && !item.m_equiped && Player.m_localPlayer != null && Player.m_localPlayer.HasEquipmentOfType(item.m_shared.m_itemType) && Input.GetKey(KeyCode.LeftControl))
            {
                var otherItem = Player.m_localPlayer.GetEquipmentOfType(item.m_shared.m_itemType);
                tooltipText = item.GetTooltip() + $"\n\n<color=#AAA><i>Currently Equipped:</i></color>\n<size=18>{otherItem.GetDecoratedName()}</size>\n" + otherItem.GetTooltip();
            }
            else
            {
                tooltipText = item.GetTooltip();
            }
            tooltip.Set(item.GetDecoratedName(), tooltipText);
            return(false);
        }
        public void Show(ItemDrop.ItemData item)
        {
            gameObject.SetActive(true);

            var rarityColor = item.IsMagic() ? item.GetRarityColor() : Color.white;

            MagicBG.enabled = item.IsMagic();
            MagicBG.color   = rarityColor;

            NameText.text    = Localization.instance.Localize(item.GetDecoratedName());
            Description.text = Localization.instance.Localize(item.GetTooltip());
            Icon.sprite      = item.GetIcon();

            if (item.IsMagic())
            {
                _audioSource.PlayOneShot(EpicLoot.GetMagicItemDropSFX(item.GetRarity()));
            }
        }
Esempio n. 3
0
        public void Show(ItemDrop.ItemData item)
        {
            gameObject.SetActive(true);

            var rarityColor = item.IsMagic() ? item.GetRarityColor() : Color.white;

            if (MagicBG != null)
            {
                MagicBG.enabled = item.IsMagic();
                MagicBG.color   = rarityColor;
            }

            if (EpicLoot.HasAuga)
            {
                Auga.API.ComplexTooltip_SetItem(gameObject, item);
                EpicLoot.ExtendAugaTooltipForMagicItem(gameObject, item);
            }

            if (NameText != null)
            {
                NameText.text = Localization.instance.Localize(item.GetDecoratedName());
            }

            if (Description != null)
            {
                Description.text = Localization.instance.Localize(item.GetTooltip());
            }

            if (Icon != null)
            {
                Icon.sprite = item.GetIcon();
            }

            if (item.IsMagic())
            {
                _audioSource.PlayOneShot(EpicLoot.GetMagicItemDropSFX(item.GetRarity()));
            }
        }
Esempio n. 4
0
 // Token: 0x0600052D RID: 1325 RVA: 0x0002BE58 File Offset: 0x0002A058
 private void CreateItemTooltip(ItemDrop.ItemData item, UITooltip tooltip)
 {
     tooltip.Set(item.m_shared.m_name, item.GetTooltip());
 }
 public static bool Prefix(ItemDrop.ItemData item, UITooltip tooltip)
 {
     tooltip.Set(item.GetDecoratedName(), item.GetTooltip());
     return(false);
 }