Пример #1
0
    public override void RemoveItem(int amount = 1)
    {
        CollectionsHelper.RemoveItemFromCollection(this, User.Instance.Ingots, amount);

        if (amount != 0)
        {
            (Application.Current.MainWindow as GameWindow).CreateFloatingTextUtility($"-{amount}", ColorsHelper.GetRarityColor(Rarity), FloatingTextHelper.GetIngotRarityPosition(Rarity));
        }

        InterfaceHelper.RefreshSpecificEquipmentPanelTabOnCurrentPage(typeof(Ingot));
    }
Пример #2
0
    public override void RemoveItem(int amount = 1)
    {
        CollectionsHelper.RemoveItemFromCollection(this, User.Instance.CurrentHero.Artifacts, amount);

        InterfaceHelper.RefreshSpecificEquipmentPanelTabOnCurrentPage(typeof(Artifact));

        if (User.Instance.CurrentHero.ArtifactSets.Any(x => x.ArtifactIds.Any(y => y == Id)) && !User.Instance.CurrentHero.Artifacts.Contains(this))
        {
            // Special case - if Ammunition was removed (for example by consuming it in combat), do not show the popup.
            if (this.ArtifactType != ArtifactType.Ammunition)
            {
                AlertBox.Show($"{Name} has been removed from all Artifact Sets", MessageBoxButton.OK);
            }

            foreach (var artifactSet in User.Instance.CurrentHero.ArtifactSets)
            {
                artifactSet.ArtifactIds.Remove(Id);
            }
        }
    }
Пример #3
0
    public override void RemoveItem(int amount = 1)
    {
        CollectionsHelper.RemoveItemFromCollection(this, User.Instance.CurrentHero.Recipes, amount);

        InterfaceHelper.RefreshSpecificEquipmentPanelTabOnCurrentPage(typeof(Recipe));
    }