聊天频道
This commit is contained in:
@@ -9,4 +9,47 @@ using NBC.Serialize;
|
|||||||
|
|
||||||
namespace NBC
|
namespace NBC
|
||||||
{
|
{
|
||||||
|
[ProtoContract]
|
||||||
|
public partial class ChatUserInfo : AMessage, IProto
|
||||||
|
{
|
||||||
|
public static ChatUserInfo Create(Scene scene)
|
||||||
|
{
|
||||||
|
return scene.MessagePoolComponent.Rent<ChatUserInfo>();
|
||||||
|
}
|
||||||
|
public override void Dispose()
|
||||||
|
{
|
||||||
|
Id = default;
|
||||||
|
Name = default;
|
||||||
|
#if FANTASY_NET || FANTASY_UNITY
|
||||||
|
GetScene().MessagePoolComponent.Return<ChatUserInfo>(this);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
[ProtoMember(1)]
|
||||||
|
public long Id { get; set; }
|
||||||
|
[ProtoMember(2)]
|
||||||
|
public long Name { get; set; }
|
||||||
|
}
|
||||||
|
[ProtoContract]
|
||||||
|
public partial class ChatMessageInfo : AMessage, IProto
|
||||||
|
{
|
||||||
|
public static ChatMessageInfo Create(Scene scene)
|
||||||
|
{
|
||||||
|
return scene.MessagePoolComponent.Rent<ChatMessageInfo>();
|
||||||
|
}
|
||||||
|
public override void Dispose()
|
||||||
|
{
|
||||||
|
Type = default;
|
||||||
|
Trigger = default;
|
||||||
|
Content.Clear();
|
||||||
|
#if FANTASY_NET || FANTASY_UNITY
|
||||||
|
GetScene().MessagePoolComponent.Return<ChatMessageInfo>(this);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
[ProtoMember(1)]
|
||||||
|
public int Type { get; set; }
|
||||||
|
[ProtoMember(2)]
|
||||||
|
public ChatUserInfo Trigger { get; set; }
|
||||||
|
[ProtoMember(3)]
|
||||||
|
public List<string> Content = new List<string>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -291,7 +291,9 @@ namespace NBC
|
|||||||
}
|
}
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
{
|
{
|
||||||
|
Type = default;
|
||||||
Message = default;
|
Message = default;
|
||||||
|
Target = default;
|
||||||
#if FANTASY_NET || FANTASY_UNITY
|
#if FANTASY_NET || FANTASY_UNITY
|
||||||
GetScene().MessagePoolComponent.Return<C2Chat_SendMessageRequest>(this);
|
GetScene().MessagePoolComponent.Return<C2Chat_SendMessageRequest>(this);
|
||||||
#endif
|
#endif
|
||||||
@@ -302,7 +304,11 @@ namespace NBC
|
|||||||
[ProtoIgnore]
|
[ProtoIgnore]
|
||||||
public int RouteType => Fantasy.RouteType.ChatRoute;
|
public int RouteType => Fantasy.RouteType.ChatRoute;
|
||||||
[ProtoMember(1)]
|
[ProtoMember(1)]
|
||||||
|
public int Type { get; set; }
|
||||||
|
[ProtoMember(2)]
|
||||||
public string Message { get; set; }
|
public string Message { get; set; }
|
||||||
|
[ProtoMember(3)]
|
||||||
|
public long Target { get; set; }
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发送聊天响应
|
/// 发送聊天响应
|
||||||
@@ -346,6 +352,6 @@ namespace NBC
|
|||||||
[ProtoIgnore]
|
[ProtoIgnore]
|
||||||
public int RouteType => Fantasy.RouteType.ChatRoute;
|
public int RouteType => Fantasy.RouteType.ChatRoute;
|
||||||
[ProtoMember(1)]
|
[ProtoMember(1)]
|
||||||
public string Message { get; set; }
|
public ChatMessageInfo Message { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 9194a5b74ff9c1e45b6c20994dea20c6
|
guid: 14648aea12f348aea0f8a0d9348230f2
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
timeCreated: 1446193142
|
|
||||||
licenseType: Pro
|
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user