Пример #1
0
        private string _getDetails(ItemDetailsEntry item)
        {
            StringBuilder sb = new StringBuilder();

            if (item.ArmorDetails != null)
            {
                sb.Append(item.ArmorDetails.GetType().Name + "\n" + item.ArmorDetails.ToString());
            }
            if (item.BackDetails != null)
            {
                sb.Append(item.BackDetails.GetType().Name + "\n" + item.BackDetails.ToString());
            }
            if (item.BagDetails != null)
            {
                sb.Append(item.BagDetails.GetType().Name + "\n" + item.BagDetails.ToString());
            }
            if (item.ConsumableDetails != null)
            {
                sb.Append(item.ConsumableDetails.GetType().Name + "\n" + item.ConsumableDetails.ToString());
            }
            if (item.ContainerDetails != null)
            {
                sb.Append(item.ContainerDetails.GetType().Name + "\n" + item.ContainerDetails.ToString());
            }
            if (item.CraftingMaterialDetails != null)
            {
                sb.Append(item.CraftingMaterialDetails.GetType().Name + "\n" + item.CraftingMaterialDetails.ToString());
            }
            if (item.GizmoDetails != null)
            {
                sb.Append(item.GizmoDetails.GetType().Name + "\n" + item.GizmoDetails.ToString());
            }
            if (item.ToolDetails != null)
            {
                sb.Append(item.ToolDetails.GetType().Name + "\n" + item.ToolDetails.ToString());
            }
            if (item.TrinketDetails != null)
            {
                sb.Append(item.TrinketDetails.GetType().Name + "\n" + item.TrinketDetails.ToString());
            }
            if (item.TrophyDetails != null)
            {
                sb.Append(item.TrophyDetails.GetType().Name + "\n" + item.TrophyDetails.ToString());
            }
            if (item.WeaponDetails != null)
            {
                sb.Append(item.WeaponDetails.GetType().Name + "\n" + item.WeaponDetails.ToString());
            }
            return(sb.ToString());
        }
        public override string ToString()
        {
            var sb = new StringBuilder();
            ItemDetailsEntry outputItem = GwApi.GetItemDetails(OutputItemId);

            sb.AppendFormat("{0}: {1} x{2}\n", "Name", outputItem.Name, OutputCount);
            sb.AppendFormat(_defaultPropertyFormat, "Type", RecipeType);
            sb.AppendFormat(_defaultPropertyFormat, "Skill Needed", MinRating);
            sb.AppendFormat(_defaultPropertyFormat, "Craft Time(s)", TimeToCraftMsec / 1000.0);
            sb.AppendLine("Diciplines:");
            foreach (var dicipline in Diciplines)
            {
                sb.AppendFormat("  {0}", dicipline);
            }
            sb.AppendLine("Flags: " + string.Join(", ", Flags));
            sb.AppendLine("Ingredients:");
            foreach (var ingredient in Ingredients)
            {
                sb.AppendLine("  " + ingredient);
            }
            return(sb.ToString());
        }
Пример #3
0
 private string _getDetails(ItemDetailsEntry item)
 {
     StringBuilder sb = new StringBuilder();
     if (item.ArmorDetails != null)
         sb.Append(item.ArmorDetails.GetType().Name + "\n" + item.ArmorDetails.ToString());
     if (item.BackDetails != null)
         sb.Append(item.BackDetails.GetType().Name + "\n" + item.BackDetails.ToString());
     if (item.BagDetails != null)
         sb.Append(item.BagDetails.GetType().Name + "\n" + item.BagDetails.ToString());
     if (item.ConsumableDetails != null)
         sb.Append(item.ConsumableDetails.GetType().Name + "\n" + item.ConsumableDetails.ToString());
     if (item.ContainerDetails != null)
         sb.Append(item.ContainerDetails.GetType().Name + "\n" + item.ContainerDetails.ToString());
     if (item.CraftingMaterialDetails != null)
         sb.Append(item.CraftingMaterialDetails.GetType().Name + "\n" + item.CraftingMaterialDetails.ToString());
     if (item.GizmoDetails != null)
         sb.Append(item.GizmoDetails.GetType().Name + "\n" + item.GizmoDetails.ToString());
     if (item.ToolDetails != null)
         sb.Append(item.ToolDetails.GetType().Name + "\n" + item.ToolDetails.ToString());
     if (item.TrinketDetails != null)
         sb.Append(item.TrinketDetails.GetType().Name + "\n" + item.TrinketDetails.ToString());
     if (item.TrophyDetails != null)
         sb.Append(item.TrophyDetails.GetType().Name + "\n" + item.TrophyDetails.ToString());
     if (item.WeaponDetails != null)
         sb.Append(item.WeaponDetails.GetType().Name + "\n" + item.WeaponDetails.ToString());
     return sb.ToString();
 }