DropTable.cs 1003 B

12345678910111213141516171819202122232425262728293031323334353637
  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> Drop </summary>
  8. public sealed class DropTable : ITable
  9. {
  10. long ITable.Key => Id;
  11. /// <summary> id </summary>
  12. public int Id { get; private set; }
  13. /// <summary> 类型1:根据组内的权重随机掉落1个 </summary>
  14. public int Type { get; private set; }
  15. /// <summary> 掉落数组[物品ID,数量,权重……] </summary>
  16. public int[] Group { get; private set; }
  17. void ISerializable.Deserialize(IReader reader)
  18. {
  19. Id = reader.ReadInt();
  20. Type = reader.ReadInt();
  21. Group = reader.ReadEnumerable<int[]>();
  22. }
  23. void ISerializable.Serialize(IWriter writer)
  24. {
  25. writer.Write(Id);
  26. writer.Write(Type);
  27. writer.Write(Group);
  28. }
  29. }
  30. }