Exemple #1
0
 public AttachmentEquipmentEntity(EnumAttachmentType attachmentType, int count, int itemCode, bool isBinding, EquipmentProperty equipmentProperty)
 {
     AttachmentType    = (int)attachmentType;
     ItemCode          = itemCode;
     IsBinding         = isBinding;
     Count             = count;
     EquipmentProperty = equipmentProperty;
 }
Exemple #2
0
        public override ItemProperty Clone()
        {
            EquipmentProperty entity = new EquipmentProperty();

            if (this.PropertyPluses != null)
            {
                entity.PropertyPluses = new List <PropertyPlusEntity>(PropertyPluses.Count);
                foreach (var propertyPlusEntity in PropertyPluses)
                {
                    entity.PropertyPluses.Add(propertyPlusEntity.Clone());
                }
            }
            if (!string.IsNullOrEmpty(StarskillPlus))
            {
                entity.StarskillPlus = this.StarskillPlus;
            }
            if (this.EquipmentSlots != null)
            {
                entity.EquipmentSlots = new List <EquipmentSlotEntity>(EquipmentSlots.Count);
                foreach (var equipmentHoleEntity in EquipmentSlots)
                {
                    entity.EquipmentSlots.Add(equipmentHoleEntity.Clone());
                }
            }
            if (this.Level > 0)
            {
                entity.Level = Level;
            }

            if (this.PrecisionCastingPropertis != null)
            {
                entity.PrecisionCastingPropertis = new List <PrecisionCastingPropertyEntity>(PrecisionCastingPropertis.Count);
                foreach (var precisioncastingProerty in PrecisionCastingPropertis)
                {
                    entity.PrecisionCastingPropertis.Add(precisioncastingProerty);
                }
            }
            return(entity);
        }
Exemple #3
0
 /// <summary>
 /// 添加附件
 /// </summary>
 /// <param name="count"></param>
 /// <param name="itemCode"></param>
 /// <param name="isBinding"></param>
 /// <param name="property"></param>
 /// <returns></returns>
 public bool AddAttachmentEquipment(int count, int itemCode, bool isBinding, EquipmentProperty property)
 {
     Attachments.Add(new AttachmentEquipmentEntity(EnumAttachmentType.Equipment, count, itemCode, isBinding, property));
     return(true);
 }