mirror of
https://github.com/rafi1212122/BLHX.Server.git
synced 2025-12-12 22:44:36 +01:00
sendchat and packet handler options
This commit is contained in:
@@ -18,12 +18,11 @@ namespace BLHX.Server.Game.Handlers
|
||||
});
|
||||
}
|
||||
|
||||
[PacketHandler(Command.Cs11009)]
|
||||
[PacketHandler(Command.Cs11009, SaveDataAfterRun = true)]
|
||||
static void ChangeManifestoHandler(Connection connection, Packet packet)
|
||||
{
|
||||
var req = packet.Decode<Cs11009>();
|
||||
connection.player.Adv = req.Adv;
|
||||
DBManager.PlayerContext.SaveChanges();
|
||||
|
||||
connection.Send(new Sc11010());
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user