Esempio n. 1
0
        public ItemInstance GetItemInstance(Item item, int randomSuffixId, Enchant enchant, Reforging reforging, Tinkering tinkering, bool blacksmithingSocket)
        {
            if (item == null)
            {
                return(null);
            }
            Item gem1     = null;
            Item gem2     = null;
            Item gem3     = null;
            bool cog1used = false;

            switch (item.SocketColor1)
            {
            case ItemSlot.Meta: gem1 = MetaGem; break;

            case ItemSlot.Red: gem1 = RedGem; break;

            case ItemSlot.Yellow: gem1 = YellowGem; break;

            case ItemSlot.Blue: gem1 = BlueGem; break;

            case ItemSlot.Prismatic: gem1 = PrismaticGem; break;

            case ItemSlot.Cogwheel: gem1 = Cogwheel; cog1used = true; break;

            case ItemSlot.Hydraulic: gem1 = Hydraulic; break;

            case ItemSlot.None:
                if (blacksmithingSocket)
                {
                    gem1 = PrismaticGem;
                    blacksmithingSocket = false;
                }
                break;
            }
            switch (item.SocketColor2)
            {
            case ItemSlot.Meta: gem2 = MetaGem; break;

            case ItemSlot.Red: gem2 = RedGem; break;

            case ItemSlot.Yellow: gem2 = YellowGem; break;

            case ItemSlot.Blue: gem2 = BlueGem; break;

            case ItemSlot.Prismatic: gem2 = PrismaticGem; break;

            case ItemSlot.Cogwheel: if (cog1used)
                {
                    gem2 = Cogwheel2;
                }
                else
                {
                    gem2 = Cogwheel; cog1used = true;
                } break;

            case ItemSlot.Hydraulic: gem2 = Hydraulic; break;

            case ItemSlot.None:
                if (blacksmithingSocket)
                {
                    gem2 = PrismaticGem;
                    blacksmithingSocket = false;
                }
                break;
            }
            switch (item.SocketColor3)
            {
            case ItemSlot.Meta: gem3 = MetaGem; break;

            case ItemSlot.Red: gem3 = RedGem; break;

            case ItemSlot.Yellow: gem3 = YellowGem; break;

            case ItemSlot.Blue: gem3 = BlueGem; break;

            case ItemSlot.Prismatic: gem3 = PrismaticGem; break;

            case ItemSlot.Cogwheel: if (cog1used)
                {
                    gem3 = Cogwheel2;
                }
                else
                {
                    gem3 = Cogwheel; cog1used = true;
                } break;

            case ItemSlot.Hydraulic: gem3 = Hydraulic; break;

            case ItemSlot.None:
                if (blacksmithingSocket)
                {
                    gem3 = PrismaticGem;
                    blacksmithingSocket = false;
                }
                break;
            }
            return(new ItemInstance(item, randomSuffixId, gem1, gem2, gem3, enchant, reforging, tinkering));
        }
Esempio n. 2
0
 public ItemInstance GetItemInstance(Item item, int randomSuffixId, Reforging reforging, bool blacksmithingSocket)
 {
     return(GetItemInstance(item, randomSuffixId, null, reforging, null, blacksmithingSocket));
 }