Example #1
0
        public ItemData(ItemData item)
        {
            Name       = item.Name;
            Key        = item.Key;
            Type       = item.Type;
            NameFormat = item.NameFormat;

            IconKey        = item.IconKey;
            MeshKey        = item.MeshKey;
            TextureKey     = item.TextureKey;
            particleEffect = item.particleEffect;

            Slot          = item.Slot;
            DurabilityCur = item.DurabilityCur;
            DurabilityMax = item.DurabilityMax;
            StackSize     = item.StackSize;

            Hardness     = item.Hardness;
            Power        = item.Power;
            Actions      = item.Actions;
            HoursToBuild = item.HoursToBuild;
            Rarity       = item.Rarity;

            description       = item.description;
            attributesTooltip = item.attributesTooltip;
            effectsTooltip    = item.effectsTooltip;

            if (item.WeaponData != null)
            {
                WeaponData = new WeaponData(item.WeaponData);
            }
            else
            {
                WeaponData = null;
            }

            if (item.AmmoData != null)
            {
                AmmoData = new AmmoData(item.AmmoData);
            }
            else
            {
                AmmoData = null;
            }

            if (item.WearableData != null)
            {
                WearableData = new WearableData(item.WearableData);
            }
            else
            {
                WearableData = null;
            }

            if (item.AccessoryData != null)
            {
                AccessoryData = new AccessoryData(item.AccessoryData);
            }
            else
            {
                AccessoryData = null;
            }

            if (item.IngredientData != null)
            {
                IngredientData = new IngredientData(item.IngredientData);
            }
            else
            {
                IngredientData = null;
            }

            if (item.Material != null)
            {
                Material = new ItemModifier(item.Material);
            }
            else
            {
                Material = null;
            }

            if (item.Quality != null)
            {
                Quality = new ItemModifier(item.Quality);
            }
            else
            {
                Quality = null;
            }

            if (item.PreEnchant != null)
            {
                PreEnchant = new ItemModifier(item.PreEnchant);
            }
            else
            {
                PreEnchant = null;
            }

            if (item.PostEnchant != null)
            {
                PostEnchant = new ItemModifier(item.PostEnchant);
            }
            else
            {
                PostEnchant = null;
            }

            SkillRequirements = new List <SkillRequirement>();
            for (int i = 0; i < item.SkillRequirements.Count; i++)
            {
                SkillRequirements.Add(new SkillRequirement(item.SkillRequirements[i]));
            }

            if (item.ArtifactData != null)
            {
                ArtifactData = new ArtifactData(item.ArtifactData);
            }
            else
            {
                ArtifactData = null;
            }

            if (item.SetData != null)
            {
                SetData = new ItemSetData(item.SetData);
            }
            else
            {
                SetData = null;
            }

            if (item.UsableData != null)
            {
                UsableData = new UsableData(item.UsableData);
            }
            else
            {
                UsableData = null;
            }

            portraitRotation = item.portraitRotation;
            portraitPosition = item.portraitPosition;

            worldRotation = item.worldRotation;
            worldPosition = item.worldPosition;
        }