Struct.cs 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. namespace ET.Server
  2. {
  3. /// <summary>
  4. /// 游戏服数据结构
  5. /// </summary>
  6. public class Struct
  7. {
  8. /// <summary>
  9. /// 数据结构 int_int
  10. /// </summary>
  11. public class IntIntData
  12. {
  13. public int value1 { get; set; }
  14. public int value2 { get; set; }
  15. public IntIntData(int value1, int value2)
  16. {
  17. this.value1 = value1;
  18. this.value2 = value2;
  19. }
  20. }
  21. /// <summary>
  22. /// 玩家技能数据
  23. /// </summary>
  24. public class SkillInfo
  25. {
  26. /** 技能id **/
  27. public int id { get; set; }
  28. /** 技能等级 **/
  29. public int level { get; set; }
  30. /** 斩妖特殊含义: 冷却时间减少,触发几率增加,持续时间增加 **/
  31. public int[] talentLevel = new int[3];
  32. /** 技能类型 **/
  33. public int type { get; set; }
  34. /** 技能到期时间戳 **/
  35. public long skillTime { get; set; }
  36. /** 技能cd变更,万分比 **/
  37. public int cdTime { get; set; }
  38. public int flag { get; set; }
  39. }
  40. /// <summary>
  41. /// 玩家技能存储数据
  42. /// </summary>
  43. public class PlayerSkillBaseData
  44. {
  45. /** 技能id **/
  46. public int id { get; set; }
  47. /** 技能等级 **/
  48. public int level { get; set; }
  49. /** 是否已解锁 */
  50. public bool unlock { get; set; }
  51. /** 技能到期时间戳 **/
  52. public long skillTime { get; set; }
  53. public PlayerSkillBaseData(int skillId, int level, bool unlock, long skillTime)
  54. {
  55. this.id = skillId;
  56. this.level = level;
  57. this.unlock = unlock;
  58. this.skillTime = skillTime;
  59. }
  60. /** 是否已解锁 */
  61. public bool isUnlock() {
  62. return this.unlock;
  63. }
  64. }
  65. /// <summary>
  66. /// 怪物单位数据
  67. /// </summary>
  68. public class MonsterUnit
  69. {
  70. /** 怪物名字 **/
  71. public string name{ get; set; }
  72. /** 怪物模板ID **/
  73. public int id{ get; set; }
  74. /** 阵营信息 **/
  75. public int force{ get; set; }
  76. /** 刷新点名字,为空才去读x, y **/
  77. public string flag{ get; set; }
  78. public bool autoGuard{ get; set; }
  79. /** 同一个Area是否只能同时有一个怪存在 **/
  80. public bool unique = false;
  81. /** 坐标x **/
  82. public int x{ get; set; }
  83. /** 坐标y **/
  84. public int y{ get; set; }
  85. /** 是否是任务 共享怪 **/
  86. public int shareType{ get; set; }
  87. /** 动态怪物等级,战斗服根据此计算怪物的动态数值 **/
  88. public int level{ get; set; }
  89. /** 初始朝向 **/
  90. public float birthDirection{ get; set; }
  91. /** 服务器标记字段,怪物死亡时,会回传回来 **/
  92. public int gsFlag{ get; set; }
  93. /** 指定血量 **/
  94. public int hp{ get; set; }
  95. public int maxHP{ get; set; }
  96. /** 指定追击玩家id(必须是无限追击怪才会联动生效) **/
  97. public string attackPlayer{ get; set; }
  98. /** 创建护卫怪,主人ObjectId(主人脱战或者死亡消失) **/
  99. public int masterID{ get; set; }
  100. public MonsterUnit() {
  101. }
  102. public MonsterUnit(int monsterID, int force, bool unique, int x, int y) {
  103. this.id = monsterID;
  104. this.force = force;
  105. this.unique = unique;
  106. this.x = x;
  107. this.y = y;
  108. }
  109. public MonsterUnit(int monsterID, string refrushEvent, bool unique, int force) {
  110. this.id = monsterID;
  111. this.force = force;
  112. this.unique = unique;
  113. this.flag = refrushEvent;
  114. }
  115. public MonsterUnit(int monsterID, string refrushEvent, bool unique, int force, float birthDirection) {
  116. this.id = monsterID;
  117. this.force = force;
  118. this.unique = unique;
  119. this.flag = refrushEvent;
  120. this.birthDirection = birthDirection;
  121. }
  122. }
  123. /// <summary>
  124. /// 战报数据
  125. /// </summary>
  126. public class BattleReports
  127. {
  128. public uint ID { get; set; }
  129. public string PlayerUUID { get; set; }
  130. /** 模板id **/
  131. public int TemplateId { get; set; }
  132. /** 单位名称 **/
  133. public string Name { get; set; }
  134. /** 阵营 **/
  135. public int Force { get; set; }
  136. /** 对所有单位输出的总伤害 **/
  137. public int TotalDamage { get; set; }
  138. /** 对所有单位输出的总治疗量 **/
  139. public int TotalHealing { get; set; }
  140. public BattleReports(uint id, string PlayerUUID, int templateId, string name, int force, int totalDamage)
  141. {
  142. this.ID = id;
  143. this.PlayerUUID = PlayerUUID;
  144. this.TemplateId = templateId;
  145. this.Name = name;
  146. this.Force = force;
  147. this.TotalDamage = totalDamage;
  148. }
  149. }
  150. }
  151. }