Esempio n. 1
0
        private void Update()
        {
            NewIcon.Visible = false;

            if (Item == null || Item.Info == null)
            {
                return;
            }
            NameLabel.Text  = Item.Info.FriendlyName;
            CountLabel.Text = (Item.Count <= 1) ? "" : Item.Count.ToString();

            NewIcon.Visible = !Item.IsShopItem || MultipleAvailable;

            if (UsePearls)
            {
                PriceLabel.Text = string.Format("Price: {0} pearl{1}", (uint)(Item.Price() * GameScene.NPCRate), Item.Price() > 1 ? "s" : "");
            }
            else if (Recipe)
            {
                ClientRecipeInfo recipe = GameScene.RecipeInfoList.SingleOrDefault(x => x.Item.ItemIndex == Item.ItemIndex);

                PriceLabel.Text = string.Format("Price: {0} gold", (uint)(recipe.Gold * GameScene.NPCRate));
            }
            else
            {
                PriceLabel.Text = string.Format("Price: {0} gold", (uint)(Item.Price() * GameScene.NPCRate));
            }
        }
Esempio n. 2
0
        public ClientRecipeInfo CreateClientRecipeInfo()
        {
            ClientRecipeInfo clientInfo = new ClientRecipeInfo
            {
                Item        = Item.Clone(),
                Ingredients = Ingredients.Select(x => x).ToList()
            };

            return(clientInfo);
        }
Esempio n. 3
0
        public ClientRecipeInfo CreateClientRecipeInfo()
        {
            ClientRecipeInfo clientInfo = new ClientRecipeInfo
            {
                Gold        = Gold,
                Chance      = Chance,
                Item        = Item.Clone(),
                Tools       = Tools.Select(x => x).ToList(),
                Ingredients = Ingredients.Select(x => x).ToList()
            };

            return(clientInfo);
        }