Exemple #1
0
        public void ChangeSuffix(ItemModifier suffix)
        {
            Suffix = suffix;

            if (Level >= 2)
            {
                Suffix.RollQuality();
            }

            AnyItemStatsUpdated?.Invoke(this);
        }
Exemple #2
0
        public void InsertSocket(Item item)
        {
            if (!item.IsGem)
            {
                return;
            }

            var index = Sockets.FindIndex(s => s.IsEmpty);

            if (index == -1)
            {
                return;
            }

            Sockets[index] = item.Clone().SetStack(1);
            item.Inventory.Remove(item, 1);

            SocketInserted?.Invoke(this, item);
            AnyItemStatsUpdated?.Invoke(this);
        }
Exemple #3
0
        public void RollSuffix()
        {
            if (IsIdentified)
            {
                return;
            }

            var suffix = Container.Instance.Resolve <IItemModifierRepository>().RandomSuffix();

            if (suffix == null)
            {
                return;
            }

            Suffix = suffix;

            if (Level >= 2)
            {
                Suffix.RollQuality();
            }

            AnyItemStatsUpdated?.Invoke(this);
        }