Item.cs 764 B

123456789101112131415161718192021222324252627282930313233343536
  1. using XGame.Database;
  2. namespace FL.Data.Items
  3. {
  4. public class Item : IItem
  5. {
  6. /// <summary>
  7. /// 道具唯一id
  8. /// </summary>
  9. public long Id { get; private set; }
  10. public ItemTable Table { get; private set; }
  11. public int TableId => Table.Id;
  12. public EItemType ItemType => (EItemType)Table.Type;
  13. public EQualityLevel Quality => Table.Quality;
  14. public string Name => Table.Name;
  15. public string Icon => Table.Icon;
  16. public int Level { set; get; }
  17. public string Description => Table.Desc;
  18. public string Count { get; set; }
  19. public void Init(ItemTable table, long id)
  20. {
  21. Table = table;
  22. Id = id;
  23. }
  24. }
  25. }