ItemTable.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // Generate By EToy
  2. // Don't Edit It!!
  3. using XGame.Framework.Database;
  4. using XGame.Framework.Serialization;
  5. namespace XGame.Database
  6. {
  7. /// <summary> Item </summary>
  8. public sealed class ItemTable : ITable
  9. {
  10. long ITable.Key => Id;
  11. public int Id { get; private set; }
  12. /// <summary> 0:资源类1:代币类2:常规道具3:宝箱4:礼包类5:头衔6:外观7:特权卡8:红包9:符石10:装备11:飞剑12:技能13:坐骑 </summary>
  13. public int Type { get; private set; }
  14. /// <summary> 0:无1:获取时自动开启2:手动开启 </summary>
  15. public int Subtype { get; private set; }
  16. public string Name { get; private set; }
  17. public string Desc { get; private set; }
  18. public string Icon { get; private set; }
  19. public EQualityLevel Quality { get; private set; }
  20. /// <summary> [1,加速时间][3,经验,积分] </summary>
  21. public int[] Effect { get; private set; }
  22. /// <summary> 回收价格 </summary>
  23. public int RecyclingPrices { get; private set; }
  24. /// <summary> 时效 </summary>
  25. public int Duration { get; private set; }
  26. void ISerializable.Deserialize(IReader reader)
  27. {
  28. Id = reader.ReadInt();
  29. Type = reader.ReadInt();
  30. Subtype = reader.ReadInt();
  31. Name = reader.ReadString();
  32. Desc = reader.ReadString();
  33. Icon = reader.ReadString();
  34. Quality = (EQualityLevel)reader.ReadInt();
  35. Effect = reader.ReadEnumerable<int[]>();
  36. RecyclingPrices = reader.ReadInt();
  37. Duration = reader.ReadInt();
  38. }
  39. void ISerializable.Serialize(IWriter writer)
  40. {
  41. writer.Write(Id);
  42. writer.Write(Type);
  43. writer.Write(Subtype);
  44. writer.Write(Name);
  45. writer.Write(Desc);
  46. writer.Write(Icon);
  47. writer.Write((int)Quality);
  48. writer.Write(Effect);
  49. writer.Write(RecyclingPrices);
  50. writer.Write(Duration);
  51. }
  52. }
  53. }