forked from PGR/ascnet
save comms progress
This commit is contained in:
parent
1a77d304a0
commit
726af535e1
|
@ -17,6 +17,12 @@ namespace AscNet.GameServer.Handlers
|
|||
{
|
||||
public int Code;
|
||||
}
|
||||
|
||||
[MessagePackObject(true)]
|
||||
public class ChangeCommunicationRequest
|
||||
{
|
||||
public long Id;
|
||||
}
|
||||
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||
#endregion
|
||||
|
||||
|
@ -40,6 +46,9 @@ namespace AscNet.GameServer.Handlers
|
|||
[RequestPacketHandler("ChangeCommunicationRequest")]
|
||||
public static void ChangeCommunicationRequestHandler(Session session, Packet.Request packet)
|
||||
{
|
||||
ChangeCommunicationRequest request = MessagePackSerializer.Deserialize<ChangeCommunicationRequest>(packet.Content);
|
||||
session.player.PlayerData.Communications.Add(request.Id);
|
||||
|
||||
session.SendResponse(new ChangeCommunicationResponse(), packet.Id);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue