forked from PGR/ascnet
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; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace AscNet.GameServer.Handlers
|
||||||
|
|
||||||
[MessagePackObject(true)]
|
[MessagePackObject(true)]
|
||||||
public class Operation
|
public class Operation
|
||||||
{
|
{
|
||||||
public bool? MoveOperated { get; set; }
|
public bool? MoveOperated { get; set; }
|
||||||
public int MoveOperation { get; set; }
|
public int MoveOperation { get; set; }
|
||||||
public int CameraRotationX { get; set; }
|
public int CameraRotationX { get; set; }
|
||||||
|
@ -119,7 +119,7 @@ namespace AscNet.GameServer.Handlers
|
||||||
public dynamic? EpisodeFightResults { get; set; }
|
public dynamic? EpisodeFightResults { get; set; }
|
||||||
public dynamic? CustomData { get; set; }
|
public dynamic? CustomData { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[MessagePackObject(true)]
|
[MessagePackObject(true)]
|
||||||
public class FightSettleRequest
|
public class FightSettleRequest
|
||||||
{
|
{
|
||||||
|
@ -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