forked from PGR/ascnet
1
0
Fork 0

Working team setup

This commit is contained in:
Kyle Belanger 2023-12-02 05:54:49 -05:00
parent e7b9d4ac04
commit 8bcb27b3ad
2 changed files with 15 additions and 3 deletions

View File

@ -2351,7 +2351,7 @@ namespace AscNet.Common.MsgPack
{
public Int32 TeamId { get; set; }
public Int32 CaptainPos { get; set; }
public Dictionary<dynamic, dynamic> TeamData { get; set; }
public Dictionary<int, long> TeamData { get; set; }
public Int32 FirstFightPos { get; set; }
public String TeamName { get; set; }
}

View File

@ -191,6 +191,18 @@ namespace AscNet.GameServer.Handlers
[RequestPacketHandler("TeamSetTeamRequest")]
public static void HandleTeamSetTeamRequestHandler(Session session, Packet.Request packet)
{
TeamSetTeamRequest req = MessagePackSerializer.Deserialize<TeamSetTeamRequest>(packet.Content);
session.player.TeamGroups[(int)session.player.PlayerData.CurrTeamId] = new()
{
CaptainPos = req.TeamData.CaptainPos,
FirstFightPos = req.TeamData.FirstFightPos,
TeamId = req.TeamData.TeamId,
TeamType = 1,
TeamName = req.TeamData.TeamName,
TeamData = req.TeamData.TeamData
};
session.SendResponse(new TeamSetTeamResponse(), packet.Id);
}