equipmentTable.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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> Equipment </summary>
  8. public sealed class EquipmentTable : ITable
  9. {
  10. long ITable.Key => Id;
  11. /// <summary> 部位*100000+类型*10000+品质*100+序号定制ID:1000000+部位*100000+类型*10000+品质*100+序号 </summary>
  12. public int Id { get; private set; }
  13. /// <summary> 名称 </summary>
  14. public string Name { get; private set; } // c
  15. /// <summary> 图标 </summary>
  16. public string Icon { get; private set; } // c
  17. /// <summary> 1普通:正常掉落2活动:定制 </summary>
  18. public int Type { get; private set; } // c
  19. /// <summary> 生成等级0:跟随角色(对应类型的1)非0:定制到对应等级 </summary>
  20. public int Level { get; private set; }
  21. /// <summary> 部位1:武器2:头3:衣服4:手5:裤子6:鞋子 </summary>
  22. public EEquipType Part { get; private set; } // sc
  23. /// <summary> 品质1:白2:绿3:蓝4:紫5:黄6:橙7:红8:粉9:蓝钻10:鎏金11:璀璨 </summary>
  24. public EQualityLevel Quality { get; private set; } // sc
  25. void ISerializable.Deserialize(IReader reader)
  26. {
  27. Id = reader.ReadInt();
  28. Name = reader.ReadString();
  29. Icon = reader.ReadString();
  30. Type = reader.ReadInt();
  31. Level = reader.ReadInt();
  32. Part = (EEquipType)reader.ReadInt();
  33. Quality = (EQualityLevel)reader.ReadInt();
  34. }
  35. void ISerializable.Serialize(IWriter writer)
  36. {
  37. writer.Write(Id);
  38. writer.Write(Name);
  39. writer.Write(Icon);
  40. writer.Write(Type);
  41. writer.Write(Level);
  42. writer.Write((int)Part);
  43. writer.Write((int)Quality);
  44. }
  45. }
  46. }