Пример #1
0
        public void AddAffix()
        {
            int cost = CalculateCost(ForgeAction.AddAffix);

            if (CanForge(cost))
            {
                AffixItemItem pomItem = modifiedItem.GetGlobalItem <AffixItemItem>();
                if (pomItem.AddRandomAffix(modifiedItem))
                {
                    modifierItem.stack -= cost;

                    ItemText.NewText(modifiedItem, modifiedItem.stack, true, false);
                    Main.PlaySound(SoundID.Item37, -1, -1);
                    ModifierForgeUI.Instance.SetItemSlots(modifiedItem.Clone(), modifierItem.Clone());
                    SendModifiedItemToServer();
                    SendModifierItemToServer();
                }
            }
        }