public static WeapArmorBaseInfo Copyme(WeapArmorBaseInfo copy) { WeapArmorBaseInfo temp = new WeapArmorBaseInfo(); temp.BaseBeauty = copy.BaseBeauty; temp.name = copy.name; temp.BaseDamage = copy.BaseDamage; temp.BaseDurablity = copy.BaseDurablity; temp.BaseRange = copy.BaseRange; temp.BaseDefense = copy.BaseDefense; foreach (Partinfo temper in copy.Parts) { Partinfo tempy = new Partinfo(); tempy.Mat = MatInfo.copyMe(temper.Mat); tempy.Name = temper.Name; tempy.DamagePercent = temper.DamagePercent; tempy.DefPercent = temper.DefPercent; tempy.DurPercent = temper.DurPercent; tempy.WeightPercent = temper.WeightPercent; tempy.PricePercent = temper.PricePercent; temp.Parts.Add(tempy); } temp.BaseWeight = copy.BaseWeight; temp.Onehand = copy.Onehand; temp.CostToCraftPerSlot = copy.CostToCraftPerSlot; temp.TimeToCraft = copy.TimeToCraft; temp.Price = copy.Price; return(temp); }
public WeapArmorBaseInfo(string namey, int BaseDam, int BaseDur, int BaseRan, int BaseDef, int BaseWe, bool One, List <Partinfo> Party, int CraftPerSlot, int TimetoC, int baseprice, int basebeaut) { BaseBeauty = basebeaut; BaseDefense = BaseDef; name = namey; BaseWeight = BaseWe; Onehand = One; BaseDamage = BaseDam; BaseDurablity = BaseDur; BaseRange = BaseRan; Parts = new List <Partinfo>(); foreach (Partinfo temper in Party) { Partinfo temp = new Partinfo(); temp.Mat = MatInfo.copyMe(temper.Mat); temp.Name = temper.Name; temp.DamagePercent = temper.DamagePercent; temp.DefPercent = temper.DefPercent; temp.DurPercent = temper.DurPercent; temp.WeightPercent = temper.WeightPercent; temp.PricePercent = temper.PricePercent; Parts.Add(temp); } CostToCraftPerSlot = CraftPerSlot; TimeToCraft = TimetoC; Price = baseprice; }