Protocol.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. using DeepCore.IO;
  2. using DeepMMO.Attributes;
  3. using DeepMMO.Protocol;
  4. using System.Collections.Generic;
  5. using DeepCore.Geometry;
  6. using DeepMMO.Data;
  7. namespace DeepMMO.Server.Area
  8. {
  9. //---------------------------------------------------------------------------------
  10. [ProtocolRoute("Logic", "Area")]
  11. public class RoleDataChangedNotify : Notify
  12. {
  13. public string roleID;
  14. public ISerializable roleData;
  15. }
  16. //---------------------------------------------------------------------------------
  17. // [ProtocolRoute("Area", "Logic")]
  18. // public class AreaSaveRoleDataNotify : Notify
  19. // {
  20. // public string roleID;
  21. // public ISerializable roleData;
  22. // }
  23. //
  24. // [ProtocolRoute("Area", "Logic")]
  25. // public class AreaSaveRoleInfoNotify : Notify
  26. // {
  27. // }
  28. /// <summary>
  29. /// 当玩家踩到传送点,或者场景内其他传送事件
  30. /// Area通知逻辑需要传送操作,一般是踩到场景传送点
  31. /// </summary>
  32. [ProtocolRoute("Area", "Logic")]
  33. public class RoleNeedTransportNotify : Notify
  34. {
  35. public int nextMapID;
  36. public int nextZoneID;
  37. public string nextZoneFlagName;
  38. public string fromAreaName;
  39. public string fromAreaNode;
  40. }
  41. /// <summary>
  42. /// 角色所在场景Game Over后,推送给Logic
  43. /// 通常推送后,当前场景即将删除,
  44. /// Logic在收到后,将玩家传送到最后的公共场景或者主城
  45. /// </summary>
  46. [ProtocolRoute("Area", "Logic")]
  47. public class AreaGameOverNotify : Notify
  48. {
  49. public int mapTemplateID;
  50. public int zoneTemplateID;
  51. public string zoneUUID;
  52. public byte winForce;
  53. public string message;
  54. // TODO some award
  55. public ISerializable expandData;
  56. }
  57. //---------------------------------------------------------------------------------
  58. /// <summary>
  59. /// 通知Session
  60. /// </summary>
  61. [ProtocolRoute("Area", "Session")]
  62. public class SessionBindAreaNotify : Notify
  63. {
  64. public string areaName;
  65. public string areaNode;
  66. }
  67. /// <summary>
  68. /// 通知Session
  69. /// </summary>
  70. [ProtocolRoute("Area", "Session")]
  71. public class SessionUnbindAreaNotify : Notify
  72. {
  73. public string areaName;
  74. public string areaNode;
  75. }
  76. /// <summary>
  77. /// 战斗Action
  78. /// </summary>
  79. [ProtocolRoute("Session", "Area")]
  80. sealed public class SessionBattleAction : Notify
  81. {
  82. public string roleID;
  83. /// <summary>
  84. /// ClientBattleAction
  85. /// </summary>
  86. public byte[] clientBattleAction;
  87. }
  88. /// <summary>
  89. /// 单位奖励信息.
  90. /// </summary>
  91. [ProtocolRoute("Area", "Logic")]
  92. public class RoleBattleAwardNotify : Notify
  93. {
  94. public class AwardItem : ISerializable
  95. {
  96. public int ItemTemplateID;
  97. public int ItemCount;
  98. }
  99. public string RoleID;
  100. public int MonsterID;
  101. public List<AwardItem> Awards;
  102. }
  103. /// <summary>
  104. /// 角色穿越地图通知(无缝切图)
  105. /// </summary>
  106. [ProtocolRoute("Area", "Logic")]
  107. public class RoleCrossMapNotify : Notify
  108. {
  109. public int NextSceneID;
  110. public ZonePosition NextScenePos;
  111. }
  112. //---------------------------------------------------------------------------------
  113. }