mirror of
https://github.com/rafi1212122/BLHX.Server.git
synced 2025-12-13 15:04:37 +01:00
extending command for user and prevent err in build ship menu
This commit is contained in:
@@ -22,6 +22,12 @@ namespace BLHX.Server.Game.Handlers
|
||||
{
|
||||
var req = packet.Decode<Cs50102>();
|
||||
|
||||
if (req.Content.StartsWith("/"))
|
||||
{
|
||||
Commands.CommandHandlerFactory.HandleCommand(req.Content.Substring(1), connection);
|
||||
return;
|
||||
}
|
||||
|
||||
GameServer.ChatManager.SendChat(new()
|
||||
{
|
||||
Content = req.Content,
|
||||
@@ -35,4 +41,27 @@ namespace BLHX.Server.Game.Handlers
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
static class P50ConnectionNotifyExtensions
|
||||
{
|
||||
public static void SendSystemMsg(this Connection connection, string msg)
|
||||
{
|
||||
|
||||
var ntf = new Sc50101()
|
||||
{
|
||||
Content = msg,
|
||||
Player = new()
|
||||
{
|
||||
Name = "System",
|
||||
Display = new()
|
||||
{
|
||||
Icon = 107061
|
||||
}
|
||||
},
|
||||
Type = 1
|
||||
};
|
||||
|
||||
connection.Send(ntf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user