ItemTable.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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:坐骑14:混沌秘宝15:元素核心 </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. /// <summary> 前往跳转 </summary>
  27. public int[] Jump { get; private set; } // c
  28. void ISerializable.Deserialize(IReader reader)
  29. {
  30. Id = reader.ReadInt();
  31. Type = reader.ReadInt();
  32. Subtype = reader.ReadInt();
  33. Name = reader.ReadString();
  34. Desc = reader.ReadString();
  35. Icon = reader.ReadString();
  36. Quality = (EQualityLevel)reader.ReadInt();
  37. Effect = reader.ReadEnumerable<int[]>();
  38. RecyclingPrices = reader.ReadInt();
  39. Duration = reader.ReadInt();
  40. Jump = reader.ReadEnumerable<int[]>();
  41. }
  42. void ISerializable.Serialize(IWriter writer)
  43. {
  44. writer.Write(Id);
  45. writer.Write(Type);
  46. writer.Write(Subtype);
  47. writer.Write(Name);
  48. writer.Write(Desc);
  49. writer.Write(Icon);
  50. writer.Write((int)Quality);
  51. writer.Write(Effect);
  52. writer.Write(RecyclingPrices);
  53. writer.Write(Duration);
  54. writer.Write(Jump);
  55. }
  56. }
  57. }