extending command for user and prevent err in build ship menu

This commit is contained in:
rfi
2024-02-22 21:22:48 +07:00
parent db93c8f49d
commit bdc8785fe1
8 changed files with 133 additions and 17 deletions

View File

@@ -113,5 +113,10 @@ namespace BLHX.Server.Game.Handlers
{
connection.Send(new Sc11752());
}
public static void NotifyActivityData(this Connection connection)
{
connection.Send(new Sc11200());
}
}
}

View File

@@ -48,5 +48,10 @@ namespace BLHX.Server.Game.Handlers
});
}
}
public static void NotifyBuildShipData(this Connection connection)
{
connection.Send(new Sc12024());
}
}
}

View File

@@ -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);
}
}
}