Esempio n. 1
0
 /// <summary>
 /// 添加附件,点券和游戏币
 /// </summary>
 /// <param name="attachmentType"></param>
 /// <param name="count"></param>
 public bool AddAttachment(EnumAttachmentType attachmentType, int count)
 {
     Attachments.Add(new AttachmentEntity()
     {
         AttachmentType = (int)attachmentType, Count = count
     });
     return(true);
 }
Esempio n. 2
0
 public AttachmentEquipmentEntity(EnumAttachmentType attachmentType, int count, int itemCode, bool isBinding, EquipmentProperty equipmentProperty)
 {
     AttachmentType    = (int)attachmentType;
     ItemCode          = itemCode;
     IsBinding         = isBinding;
     Count             = count;
     EquipmentProperty = equipmentProperty;
 }
Esempio n. 3
0
 public AttachmentItemEntity(EnumAttachmentType attachmentType, int count, int itemCode, bool isBinding, int strength)
 {
     AttachmentType = (int)attachmentType;
     Count          = count;
     ItemCode       = itemCode;
     IsBinding      = isBinding;
     Strength       = strength;
 }
Esempio n. 4
0
        /// <summary>
        /// 添加附件,已使用的物品,如拍卖行里的
        /// </summary>
        /// <param name="attachmentType"></param>
        /// <param name="count"></param>
        /// <param name="itemUsedEntity"></param>
        /// <returns></returns>
        public bool AddAttachmentUsedItem(EnumAttachmentType attachmentType, int count, ItemUsedEntity itemUsedEntity)
        {
            var attachment = new AttachmentUsedItemEntity(attachmentType, count);

            attachment.ItemProperty = itemUsedEntity;
            Attachments.Add(attachment);
            return(true);
        }
Esempio n. 5
0
        /// <summary>
        /// 添加附件,已使用的物品,如拍卖行里的
        /// </summary>
        /// <param name="attachmentType"></param>
        /// <param name="count"></param>
        /// <param name="itemInfoEntity"></param>
        public bool AddAttachmentUsedItem(EnumAttachmentType attachmentType, int count, ItemInfoEntity itemInfoEntity)
        {
            ItemUsedEntity usedEntity = null;

            switch (attachmentType)
            {
            case EnumAttachmentType.UsedPlayerCard:
                usedEntity = new PlayerCardUsedEntity(itemInfoEntity);
                break;

            case EnumAttachmentType.UsedEquipment:
                usedEntity = new EquipmentUsedEntity(itemInfoEntity);
                break;
            }
            if (usedEntity == null)
            {
                return(false);
            }
            return(AddAttachmentUsedItem(attachmentType, count, usedEntity));
        }
Esempio n. 6
0
 public AttachmentUsedItemEntity(EnumAttachmentType attachmentType, int count)
 {
     AttachmentType = (int)attachmentType;
     Count          = count;
 }