Exemplo n.º 1
0
        public override List <string> GetTooltip()
        {
            List <string> tip = base.GetTooltip();

            tip.Add("Variant " + this.Variant.ToString());
            tip.Add("Made from:");
            if (PrimaryMaterial != null)
            {
                tip.Add(PrimaryMaterial.GetName());
            }
            if (SecondaryMaterial != null)
            {
                tip.Add(SecondaryMaterial.GetName());
            }
            if (this.Enchant != null)
            {
                tip.Add(GUI.Renderer.ColourToCode(this.Enchant.LineColour) + this.Enchant.BonusText);
            }

            foreach (ItemBonus b in this.Bonuses)
            {
                tip.Add(GUI.Renderer.ColourToCode(b.LineColour) + b.BonusText);
            }
            return(tip);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets a tooltip describing the item and its properties.
        /// </summary>
        /// <returns>Item tooltip as a list of lines.</returns>
        public override List <string> GetTooltip()
        {
            //get basic tooltip with title, description etc
            List <string> tip = base.GetTooltip();

            //debug stuff!
            tip.Add("Variant " + this.Variant.ToString());
            tip.Add("Made from:");

            if (PrimaryMaterial != null)
            {
                tip.Add(PrimaryMaterial.GetName());
            }
            if (SecondaryMaterial != null)
            {
                tip.Add(SecondaryMaterial.GetName());
            }
            //--end debug stuff

            //item "main stats" displayed if nonzero

            for (int i = 0; i < StatCount; i++)
            {
                if (StatValues[i] != 0)
                {
                    tip.Add(statnames[i] + ": " + StatValues[i] * GetRefinerMultiplier(this.RefiningLevel));
                }
            }

            //show an enchant if any, coloured with enchant colour
            if (this.Enchant != null)
            {
                tip.Add(GUI.Renderer.ColourToCode(this.Enchant.LineColour) + this.Enchant.BonusText);
            }
            //show socketed items with bonuses if any
            if (SocketCount != 0)
            {
                for (int i = 0; i < SocketCount; i++)
                {
                    tip.Add(GUI.Renderer.ColourToCode(Sockets[i].AddedEffect.LineColour) + Sockets[i].AddedEffect.BonusText);
                }
            }
            //Show item adds
            foreach (ItemBonus b in this.Bonuses)
            {
                tip.Add(GUI.Renderer.ColourToCode(b.LineColour) + b.BonusText);
            }


            return(tip);
        }