修改为luban

This commit is contained in:
Bob.Song
2026-03-05 15:03:45 +08:00
parent 13e4315a70
commit 36067705f2
122 changed files with 10497 additions and 2216 deletions

View File

@@ -589,4 +589,93 @@ namespace Fantasy
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// Chat通知Gate发送一个全服广播的聊天信息
/// </summary>
////////// ******** 聊天 *******/////////////
[Serializable]
[ProtoContract]
public partial class Chat2G_ChatMessage : AMessage, IAddressMessage
{
public static Chat2G_ChatMessage Create(bool autoReturn = true)
{
var chat2G_ChatMessage = MessageObjectPool<Chat2G_ChatMessage>.Rent();
chat2G_ChatMessage.AutoReturn = autoReturn;
if (!autoReturn)
{
chat2G_ChatMessage.SetIsPool(false);
}
return chat2G_ChatMessage;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
ChatInfoTree = default;
MessageObjectPool<Chat2G_ChatMessage>.Return(this);
}
public uint OpCode() { return InnerOpcode.Chat2G_ChatMessage; }
[ProtoMember(1)]
public ChatInfoTree ChatInfoTree { get; set; }
}
/// <summary>
/// 其他服务器发送聊天消息到Chat
/// </summary>
[Serializable]
[ProtoContract]
public partial class Other2Chat_ChatMessage : AMessage, IAddressMessage
{
public static Other2Chat_ChatMessage Create(bool autoReturn = true)
{
var other2Chat_ChatMessage = MessageObjectPool<Other2Chat_ChatMessage>.Rent();
other2Chat_ChatMessage.AutoReturn = autoReturn;
if (!autoReturn)
{
other2Chat_ChatMessage.SetIsPool(false);
}
return other2Chat_ChatMessage;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
ChatInfoTree = default;
MessageObjectPool<Other2Chat_ChatMessage>.Return(this);
}
public uint OpCode() { return InnerOpcode.Other2Chat_ChatMessage; }
[ProtoMember(1)]
public ChatInfoTree ChatInfoTree { get; set; }
}
}

View File

@@ -18,5 +18,7 @@ namespace Fantasy
public const uint Map2G_EnterMapResponse = 1207969556;
public const uint G2Map_ExitRoomRequest = 1073751829;
public const uint Map2G_ExiRoomResponse = 1207969557;
public const uint Chat2G_ChatMessage = 939534099;
public const uint Other2Chat_ChatMessage = 939534100;
}
}

View File

@@ -2839,7 +2839,398 @@ namespace Fantasy
[ProtoMember(2)]
public long MailId { get; set; }
}
/// <summary>
/// 发送一个聊天消息给Chat服务器中间是经过Gate中转的
/// </summary>
////////// ******** 频道聊天 *******/////////////
[Serializable]
[ProtoContract]
public partial class C2Chat_SendMessageRequest : AMessage, ICustomRouteRequest
{
public static C2Chat_SendMessageRequest Create(bool autoReturn = true)
{
var c2Chat_SendMessageRequest = MessageObjectPool<C2Chat_SendMessageRequest>.Rent();
c2Chat_SendMessageRequest.AutoReturn = autoReturn;
if (!autoReturn)
{
c2Chat_SendMessageRequest.SetIsPool(false);
}
return c2Chat_SendMessageRequest;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
if (ChatInfoTree != null)
{
ChatInfoTree.Dispose();
ChatInfoTree = null;
}
MessageObjectPool<C2Chat_SendMessageRequest>.Return(this);
}
public uint OpCode() { return OuterOpcode.C2Chat_SendMessageRequest; }
[ProtoIgnore]
public Chat2C_SendMessageResponse ResponseType { get; set; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
[ProtoMember(1)]
public ChatInfoTree ChatInfoTree { get; set; }
}
[Serializable]
[ProtoContract]
public partial class Chat2C_SendMessageResponse : AMessage, ICustomRouteResponse
{
public static Chat2C_SendMessageResponse Create(bool autoReturn = true)
{
var chat2C_SendMessageResponse = MessageObjectPool<Chat2C_SendMessageResponse>.Rent();
chat2C_SendMessageResponse.AutoReturn = autoReturn;
if (!autoReturn)
{
chat2C_SendMessageResponse.SetIsPool(false);
}
return chat2C_SendMessageResponse;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
ErrorCode = 0;
MessageObjectPool<Chat2C_SendMessageResponse>.Return(this);
}
public uint OpCode() { return OuterOpcode.Chat2C_SendMessageResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
[Serializable]
[ProtoContract]
public partial class Chat2C_Message : AMessage, ICustomRouteMessage
{
public static Chat2C_Message Create(bool autoReturn = true)
{
var chat2C_Message = MessageObjectPool<Chat2C_Message>.Rent();
chat2C_Message.AutoReturn = autoReturn;
if (!autoReturn)
{
chat2C_Message.SetIsPool(false);
}
return chat2C_Message;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
if (ChatInfoTree != null)
{
ChatInfoTree.Dispose();
ChatInfoTree = null;
}
MessageObjectPool<Chat2C_Message>.Return(this);
}
public uint OpCode() { return OuterOpcode.Chat2C_Message; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.SocialRoute;
[ProtoMember(1)]
public ChatInfoTree ChatInfoTree { get; set; }
}
/// <summary>
/// 聊天消息树
/// </summary>
[Serializable]
[ProtoContract]
public partial class ChatInfoTree : AMessage, IDisposable
{
public static ChatInfoTree Create(bool autoReturn = true)
{
var chatInfoTree = MessageObjectPool<ChatInfoTree>.Rent();
chatInfoTree.AutoReturn = autoReturn;
if (!autoReturn)
{
chatInfoTree.SetIsPool(false);
}
return chatInfoTree;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
ChatChannelType = default;
ChatChannelId = default;
UnitId = default;
UserName = default;
Target.Clear();
Node.Clear();
MessageObjectPool<ChatInfoTree>.Return(this);
}
[ProtoMember(1)]
public int ChatChannelType { get; set; }
[ProtoMember(2)]
public long ChatChannelId { get; set; }
[ProtoMember(3)]
public long UnitId { get; set; }
[ProtoMember(4)]
public string UserName { get; set; }
[ProtoMember(5)]
public List<long> Target { get; set; } = new List<long>();
[ProtoMember(6)]
public List<ChatInfoNode> Node { get; set; } = new List<ChatInfoNode>();
}
/// <summary>
/// 聊天信息节点
/// </summary>
[Serializable]
[ProtoContract]
public partial class ChatInfoNode : AMessage, IDisposable
{
public static ChatInfoNode Create(bool autoReturn = true)
{
var chatInfoNode = MessageObjectPool<ChatInfoNode>.Rent();
chatInfoNode.AutoReturn = autoReturn;
if (!autoReturn)
{
chatInfoNode.SetIsPool(false);
}
return chatInfoNode;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
ChatNodeType = default;
ChatNodeEvent = default;
Content = default;
Color = default;
Data = null;
MessageObjectPool<ChatInfoNode>.Return(this);
}
[ProtoMember(1)]
public int ChatNodeType { get; set; }
[ProtoMember(2)]
public int ChatNodeEvent { get; set; }
[ProtoMember(3)]
public string Content { get; set; }
[ProtoMember(4)]
public string Color { get; set; }
[ProtoMember(5)]
public byte[] Data { get; set; }
}
/// <summary>
/// 聊天位置信息节点
/// </summary>
[Serializable]
[ProtoContract]
public partial class ChatPositionNode : AMessage, IDisposable
{
public static ChatPositionNode Create(bool autoReturn = true)
{
var chatPositionNode = MessageObjectPool<ChatPositionNode>.Rent();
chatPositionNode.AutoReturn = autoReturn;
if (!autoReturn)
{
chatPositionNode.SetIsPool(false);
}
return chatPositionNode;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
MapName = default;
PosX = default;
PosY = default;
PosZ = default;
MessageObjectPool<ChatPositionNode>.Return(this);
}
[ProtoMember(1)]
public string MapName { get; set; }
[ProtoMember(2)]
public float PosX { get; set; }
[ProtoMember(3)]
public float PosY { get; set; }
[ProtoMember(4)]
public float PosZ { get; set; }
}
/// <summary>
/// 聊天位置信息节点
/// </summary>
[Serializable]
[ProtoContract]
public partial class ChatOpenUINode : AMessage, IDisposable
{
public static ChatOpenUINode Create(bool autoReturn = true)
{
var chatOpenUINode = MessageObjectPool<ChatOpenUINode>.Rent();
chatOpenUINode.AutoReturn = autoReturn;
if (!autoReturn)
{
chatOpenUINode.SetIsPool(false);
}
return chatOpenUINode;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
UIName = default;
MessageObjectPool<ChatOpenUINode>.Return(this);
}
[ProtoMember(1)]
public string UIName { get; set; }
}
/// <summary>
/// 聊天连接信息节点
/// </summary>
[Serializable]
[ProtoContract]
public partial class ChatLinkNode : AMessage, IDisposable
{
public static ChatLinkNode Create(bool autoReturn = true)
{
var chatLinkNode = MessageObjectPool<ChatLinkNode>.Rent();
chatLinkNode.AutoReturn = autoReturn;
if (!autoReturn)
{
chatLinkNode.SetIsPool(false);
}
return chatLinkNode;
}
public void Return()
{
if (!AutoReturn)
{
SetIsPool(true);
AutoReturn = true;
}
else if (!IsPool())
{
return;
}
Dispose();
}
public void Dispose()
{
if (!IsPool()) return;
Link = default;
MessageObjectPool<ChatLinkNode>.Return(this);
}
[ProtoMember(1)]
public string Link { get; set; }
}
[Serializable]
[ProtoContract]
public partial class ChatUserInfo : AMessage, IDisposable
@@ -4581,7 +4972,7 @@ namespace Fantasy
MessageObjectPool<ItemInfo>.Return(this);
}
[ProtoMember(1)]
public uint ConfigId { get; set; }
public int ConfigId { get; set; }
[ProtoMember(2)]
public long Id { get; set; }
[ProtoMember(3)]
@@ -4631,18 +5022,18 @@ namespace Fantasy
{
if (!IsPool()) return;
ConfigId = default;
Price = default;
Currency = default;
Price1 = default;
Price2 = default;
Sort = default;
Tag = default;
MessageObjectPool<ShopItemInfo>.Return(this);
}
[ProtoMember(1)]
public uint ConfigId { get; set; }
public int ConfigId { get; set; }
[ProtoMember(2)]
public uint Price { get; set; }
public uint Price1 { get; set; }
[ProtoMember(3)]
public uint Currency { get; set; }
public uint Price2 { get; set; }
[ProtoMember(4)]
public uint Sort { get; set; }
[ProtoMember(5)]
@@ -4693,7 +5084,7 @@ namespace Fantasy
MessageObjectPool<FishInfo>.Return(this);
}
[ProtoMember(1)]
public uint ConfigId { get; set; }
public int ConfigId { get; set; }
[ProtoMember(2)]
public long Id { get; set; }
[ProtoMember(3)]
@@ -4795,7 +5186,7 @@ namespace Fantasy
MessageObjectPool<SkillInfo>.Return(this);
}
[ProtoMember(1)]
public uint ConfigId { get; set; }
public int ConfigId { get; set; }
[ProtoMember(2)]
public int Level { get; set; }
[ProtoMember(3)]

View File

@@ -61,29 +61,32 @@ namespace Fantasy
public const uint S2C_DeleteMailResponse = 2415929119;
public const uint S2C_HaveMail = 2147493663;
public const uint S2C_MailState = 2147493664;
public const uint C2S_CreateChannelRequest = 2281711392;
public const uint S2C_CreateChannelResponse = 2415929120;
public const uint C2S_JoinChannelRequest = 2281711393;
public const uint S2C_JoinChannelResponse = 2415929121;
public const uint C2S_SendMessageRequest = 2281711394;
public const uint S2C_SendMessageResponse = 2415929122;
public const uint S2C_Message = 2147493665;
public const uint C2S_CreateClubRequest = 2281711395;
public const uint S2C_CreateClubResponse = 2415929123;
public const uint C2S_GetClubInfoRequest = 2281711396;
public const uint S2C_GetClubInfoResponse = 2415929124;
public const uint C2S_GetMemberListRequest = 2281711397;
public const uint S2C_GetMemberListResponse = 2415929125;
public const uint C2S_GetClubListRequest = 2281711398;
public const uint S2C_GetClubListResponse = 2415929126;
public const uint C2S_JoinClubRequest = 2281711399;
public const uint S2C_JoinClubResponse = 2415929127;
public const uint C2S_LeaveClubRequest = 2281711400;
public const uint S2C_LeaveClubResponse = 2415929128;
public const uint C2S_DissolveClubRequest = 2281711401;
public const uint S2C_DissolveClubResponse = 2415929129;
public const uint C2S_DisposeJoinRequest = 2281711402;
public const uint S2C_DisposeJoinResponse = 2415929130;
public const uint S2C_ClubChange = 2147493666;
public const uint C2Chat_SendMessageRequest = 2281711392;
public const uint Chat2C_SendMessageResponse = 2415929120;
public const uint Chat2C_Message = 2147493665;
public const uint C2S_CreateChannelRequest = 2281711393;
public const uint S2C_CreateChannelResponse = 2415929121;
public const uint C2S_JoinChannelRequest = 2281711394;
public const uint S2C_JoinChannelResponse = 2415929122;
public const uint C2S_SendMessageRequest = 2281711395;
public const uint S2C_SendMessageResponse = 2415929123;
public const uint S2C_Message = 2147493666;
public const uint C2S_CreateClubRequest = 2281711396;
public const uint S2C_CreateClubResponse = 2415929124;
public const uint C2S_GetClubInfoRequest = 2281711397;
public const uint S2C_GetClubInfoResponse = 2415929125;
public const uint C2S_GetMemberListRequest = 2281711398;
public const uint S2C_GetMemberListResponse = 2415929126;
public const uint C2S_GetClubListRequest = 2281711399;
public const uint S2C_GetClubListResponse = 2415929127;
public const uint C2S_JoinClubRequest = 2281711400;
public const uint S2C_JoinClubResponse = 2415929128;
public const uint C2S_LeaveClubRequest = 2281711401;
public const uint S2C_LeaveClubResponse = 2415929129;
public const uint C2S_DissolveClubRequest = 2281711402;
public const uint S2C_DissolveClubResponse = 2415929130;
public const uint C2S_DisposeJoinRequest = 2281711403;
public const uint S2C_DisposeJoinResponse = 2415929131;
public const uint S2C_ClubChange = 2147493667;
}
}