Working team setup
This commit is contained in:
parent
e7b9d4ac04
commit
8bcb27b3ad
|
@ -2351,7 +2351,7 @@ namespace AscNet.Common.MsgPack
|
||||||
{
|
{
|
||||||
public Int32 TeamId { get; set; }
|
public Int32 TeamId { get; set; }
|
||||||
public Int32 CaptainPos { 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 Int32 FirstFightPos { get; set; }
|
||||||
public String TeamName { get; set; }
|
public String TeamName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,6 +191,18 @@ namespace AscNet.GameServer.Handlers
|
||||||
[RequestPacketHandler("TeamSetTeamRequest")]
|
[RequestPacketHandler("TeamSetTeamRequest")]
|
||||||
public static void HandleTeamSetTeamRequestHandler(Session session, Packet.Request packet)
|
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);
|
session.SendResponse(new TeamSetTeamResponse(), packet.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue