Protocol.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. using CommonRPG.Attributes;
  2. using CommonRPG.Data;
  3. using CommonRPG.Protocol;
  4. using CommonRPG.Protocol.Client;
  5. using System;
  6. using System.Collections.Generic;
  7. namespace CommonRPG.Server.Chat
  8. {
  9. public enum CHANNEL_TYPE
  10. {
  11. /// <summary>
  12. /// 无效的
  13. /// </summary>
  14. INVALID = ClientChatRequest.CHANNEL_TYPE_INVALID,
  15. /// <summary>
  16. /// 世界
  17. /// </summary>
  18. WORLD = ClientChatRequest.CHANNEL_TYPE_WORLD,
  19. /// <summary>
  20. /// 交易
  21. /// </summary>
  22. TRADE= ClientChatRequest.CHANNEL_TYPE_TRADE,
  23. /// <summary>
  24. /// 工会
  25. /// </summary>
  26. GUILD=ClientChatRequest.CHANNEL_TYPE_GUILD,
  27. /// <summary>
  28. /// 队伍
  29. /// </summary>
  30. TEAM = ClientChatRequest.CHANNEL_TYPE_TEAM,
  31. /// <summary>
  32. /// 战场 同阵营的频道
  33. /// </summary>
  34. BATTLE = ClientChatRequest.CHANNEL_TYPE_BATTLE,
  35. /// <summary>
  36. /// 区域 比如敌我都在这个频道
  37. /// </summary>
  38. AREA = ClientChatRequest.CHANNEL_TYPE_AREA,
  39. /// <summary>
  40. /// 系统
  41. /// </summary>
  42. SYSTEM,
  43. /// <summary>
  44. /// 私聊
  45. /// </summary>
  46. PRIVATE,
  47. }
  48. // [ProtocolRoute("LogicService", "ChatService")]
  49. // public class ChatRequest : Request
  50. // {
  51. // public short channel_type;
  52. // public string from_uuid;
  53. // public string from_name;
  54. // public string from_icon;
  55. // public int from_vip;
  56. // public string to_uuid;
  57. // public string content;
  58. // }
  59. [ProtocolRoute("ChatService", "LogicService")]
  60. public class ChatResponse : Response
  61. {
  62. public int errcode;
  63. public string errmsg;
  64. }
  65. [ProtocolRoute("ChatService", "LogicService")]
  66. public class ChatNotify : Notify
  67. {
  68. public short channel_type;
  69. public string from_name;
  70. public string from_uuid;
  71. public string content;
  72. public string to_uuid;
  73. }
  74. [ProtocolRoute("*", "ChatService")]
  75. public class CreateChannelRequest : Request
  76. {
  77. public short channel_type;
  78. public string creator_uuid;
  79. public bool no_member_auto_destroy;
  80. }
  81. [ProtocolRoute("ChatService", "*")]
  82. public class CreateChannelResponse : Response
  83. {
  84. public int errcode;
  85. public string errmsg;
  86. public short channel_type;
  87. public string channel_uuid;
  88. }
  89. [ProtocolRoute("*", "ChatService")]
  90. public class AddChannelMemberRequest : Request
  91. {
  92. public string uuid;
  93. }
  94. [ProtocolRoute("ChatService", "*")]
  95. public class AddChannelMemberResponse : Response
  96. {
  97. public const int CODE_INVALID_UUID = CODE_ERROR + 1;
  98. public const int CODE_ALREADY_EXIST = CODE_ERROR + 2;
  99. }
  100. [ProtocolRoute("*", "ChatService")]
  101. public class RemoveChannelMemberRequest : Request
  102. {
  103. public string uuid;
  104. }
  105. [ProtocolRoute("ChatService", "*")]
  106. public class RemoveChannelMemberResponse : Response
  107. {
  108. public const int CODE_INVALID_UUID = CODE_ERROR + 1;
  109. public const int CODE_NOT_EXIST = CODE_ERROR + 2;
  110. }
  111. }