sendchat and packet handler options

This commit is contained in:
rfi
2024-02-21 23:33:11 +07:00
parent c3bcb16f72
commit 9b6673138e
6 changed files with 79 additions and 11 deletions

View File

@@ -16,5 +16,23 @@ namespace BLHX.Server.Game.Handlers
{
connection.Send(new Sc50017());
}
[PacketHandler(Command.Cs50102, IsNotifyHandler = true)]
static void SendMsgHandler(Connection connection, Packet packet)
{
var req = packet.Decode<Cs50102>();
GameServer.ChatManager.SendChat(new()
{
Content = req.Content,
Player = new()
{
Id = connection.player.Uid,
Lv = connection.player.Level,
Name = connection.player.Name,
Display = connection.player.DisplayInfo
}
});
}
}
}