修改为luban
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user