协议提交

This commit is contained in:
2025-08-11 16:29:23 +08:00
parent 7a93c0f8f1
commit 9b95f48102
14 changed files with 71 additions and 35 deletions

View File

@@ -1,4 +1,5 @@
using Fantasy;
using System.Text;
using Fantasy;
using Fantasy.Async;
using Fantasy.Network.Interface;
@@ -10,7 +11,10 @@ public sealed class
protected override async FTask Run(ChatUnit chatUnit, C2Chat_SendMessageRequest request,
Caht2C_SendMessageResponse response, Action reply)
{
// ChatSceneHelper.Broadcast(chatUnit.Scene, request.Message);
ChatSceneHelper.Broadcast(chatUnit.Scene, new ChatMessageInfo()
{
Content = request.Message,
});
await FTask.CompletedTask;
}
}

View File

@@ -20,7 +20,7 @@ public static class ChatChannelCenterComponentSystem
}
channel = Entity.Create<ChatChannel>(self.Scene, channelId, true, true);
channel.Creator = unit.RoleId;
channel.Creator = unit.Role.RoleId;
channel.CreateTime = TimeHelper.Now;
self.Channels.Add(channelId, channel);
return channel;

View File

@@ -28,11 +28,7 @@ public static class ChatUnitManageComponentSystem
if (account != null)
{
account.GateRouteId = gateRouteId;
account.RoleId = accountId;
account.Head = roleSimpleInfo.Head;
account.Level = roleSimpleInfo.Level;
account.NickName = roleSimpleInfo.NickName;
account.Country = roleSimpleInfo.Country;
account.Role = roleSimpleInfo;
}
await FTask.CompletedTask;

View File

@@ -13,8 +13,9 @@ public class Chat2G_ChatMessageHandler : Route<Scene, Chat2G_ChatMessage>
{
var chatMessage = new Chat2C_Message()
{
Message = new ChatMessageInfo(),
Message = message.Message,
};
var gateUnitManage = scene.GetComponent<GateUnitManageComponent>();