Exemple #1
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(String.Format("{0} {1}", ItemCode, ItemDefs.GetItemDescription(ItemCode)));

            if (this.IsSocketed)
            {
                sb.Append(" Soc: " + this.SocketsFilled + "/" + this.SocketCount);
            }
            if (!this.IsIndestructable)
            {
                sb.Append(" Dur: " + this.Durability + " / " + this.MaxDurability);
            }

            return(sb.ToString());
        }
Exemple #2
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(String.Format("{0} {1}", ItemCode, ItemDefs.GetItemDescription(ItemCode)));

            if (sockets.Count > 0)
            {
                sb.Append(" { ");
                for (int i = 0; i < sockets.Count; i++)
                {
                    sb.Append(ItemDefs.GetItemDescription(sockets[i].ItemCode));

                    if (i < sockets.Count - 1)
                    {
                        sb.Append(", ");
                    }
                }
                sb.Append(" }");
            }

            return(sb.ToString());
        }