2024-01-27 13:06:07 +00:00
|
|
|
|
namespace FreeSR.Gateserver.Manager.Handlers
|
|
|
|
|
{
|
|
|
|
|
using FreeSR.Gateserver.Manager.Handlers.Core;
|
|
|
|
|
using FreeSR.Gateserver.Network;
|
|
|
|
|
using FreeSR.Proto;
|
|
|
|
|
|
|
|
|
|
internal static class LineupReqGroup
|
|
|
|
|
{
|
2024-01-27 13:08:24 +00:00
|
|
|
|
[Handler(CmdType.CmdGetCurLineupDataCsReq)]
|
2024-01-27 13:06:07 +00:00
|
|
|
|
public static void OnGetCurLineupDataCsReq(NetSession session, int cmdId, object _)
|
|
|
|
|
{
|
|
|
|
|
var response = new GetCurLineupDataScRsp
|
|
|
|
|
{
|
2024-01-27 13:08:24 +00:00
|
|
|
|
Retcode = (uint)RetcodeStatus.RetSucc
|
2024-01-27 13:06:07 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
response.Lineup = new LineupInfo
|
|
|
|
|
{
|
2024-01-27 13:08:24 +00:00
|
|
|
|
ExtraLineupType = ExtraLineupType.LineupNone,
|
2024-01-27 13:06:07 +00:00
|
|
|
|
Name = "Squad 1",
|
2024-01-27 13:08:24 +00:00
|
|
|
|
LeaderSlot = 0,
|
2024-01-28 03:58:19 +00:00
|
|
|
|
Mp = 5,
|
|
|
|
|
MaxMp = 5
|
2024-01-27 13:06:07 +00:00
|
|
|
|
};
|
|
|
|
|
|
2024-01-27 13:08:24 +00:00
|
|
|
|
var characters = new uint[] { 8001, 1307, 1306, 1312 };
|
2024-01-27 13:06:07 +00:00
|
|
|
|
|
2024-01-27 13:08:24 +00:00
|
|
|
|
foreach (uint id in characters)
|
2024-01-27 13:06:07 +00:00
|
|
|
|
{
|
2024-01-27 13:08:24 +00:00
|
|
|
|
response.Lineup.AvatarLists.Add(new LineupAvatar
|
2024-01-27 13:06:07 +00:00
|
|
|
|
{
|
2024-01-27 13:08:24 +00:00
|
|
|
|
AvatarType = AvatarType.AvatarFormalType,
|
|
|
|
|
Hp = 10000,
|
|
|
|
|
Sp = new AmountInfo { CurAmount = 10000,MaxAmount = 10000},
|
2024-01-27 13:06:07 +00:00
|
|
|
|
Satiety = 100,
|
|
|
|
|
Id = id,
|
2024-01-27 13:08:24 +00:00
|
|
|
|
Slot = (uint)response.Lineup.AvatarLists.Count
|
2024-01-27 13:06:07 +00:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-27 13:08:24 +00:00
|
|
|
|
session.Send(CmdType.CmdGetCurLineupDataScRsp, response);
|
2024-01-27 13:06:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-01-27 13:08:24 +00:00
|
|
|
|
[Handler(CmdType.CmdGetAllLineupDataCsReq)]
|
2024-01-27 13:06:07 +00:00
|
|
|
|
public static void OnGetAllLineupDataCsReq(NetSession session, int cmdId, object data)
|
|
|
|
|
{
|
|
|
|
|
var response = new GetAllLineupDataScRsp
|
|
|
|
|
{
|
2024-01-27 13:08:24 +00:00
|
|
|
|
Retcode = (uint)RetcodeStatus.RetSucc,
|
2024-01-27 13:06:07 +00:00
|
|
|
|
CurIndex = 0,
|
|
|
|
|
};
|
|
|
|
|
|
2024-01-27 13:08:24 +00:00
|
|
|
|
response.LineupLists.Add(new LineupInfo
|
2024-01-27 13:06:07 +00:00
|
|
|
|
{
|
2024-01-27 13:08:24 +00:00
|
|
|
|
ExtraLineupType = ExtraLineupType.LineupNone,
|
2024-01-27 13:06:07 +00:00
|
|
|
|
Name = "Squad 1",
|
2024-01-27 13:08:24 +00:00
|
|
|
|
Mp = 5,
|
2024-01-28 03:58:19 +00:00
|
|
|
|
MaxMp = 5,
|
2024-01-27 13:08:24 +00:00
|
|
|
|
LeaderSlot = 0
|
2024-01-27 13:06:07 +00:00
|
|
|
|
});
|
|
|
|
|
|
2024-01-27 13:08:24 +00:00
|
|
|
|
var characters = new uint[] { 8001, 1307, 1306, 1312 };
|
2024-01-27 13:06:07 +00:00
|
|
|
|
|
2024-01-27 13:08:24 +00:00
|
|
|
|
foreach (uint id in characters)
|
2024-01-27 13:06:07 +00:00
|
|
|
|
{
|
2024-01-27 13:08:24 +00:00
|
|
|
|
response.LineupLists[0].AvatarLists.Add(new LineupAvatar
|
2024-01-27 13:06:07 +00:00
|
|
|
|
{
|
2024-01-27 13:08:24 +00:00
|
|
|
|
AvatarType = AvatarType.AvatarFormalType,
|
|
|
|
|
Sp = new AmountInfo { CurAmount = 10000, MaxAmount = 10000 },
|
|
|
|
|
Hp = 10000,
|
2024-01-27 13:06:07 +00:00
|
|
|
|
Satiety = 100,
|
|
|
|
|
Id = id,
|
2024-01-27 13:08:24 +00:00
|
|
|
|
Slot = (uint)response.LineupLists[0].AvatarLists.Count
|
2024-01-27 13:06:07 +00:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-27 13:08:24 +00:00
|
|
|
|
session.Send(CmdType.CmdGetAllLineupDataScRsp, response);
|
2024-01-27 13:06:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-01-27 13:08:24 +00:00
|
|
|
|
[Handler(CmdType.CmdChangeLineupLeaderCsReq)]
|
2024-01-27 13:06:07 +00:00
|
|
|
|
public static void OnChangeLineupLeaderCsReq(NetSession session, int cmdId, object data)
|
|
|
|
|
{
|
|
|
|
|
var request = data as ChangeLineupLeaderCsReq;
|
2024-01-27 13:08:24 +00:00
|
|
|
|
session.Send(CmdType.CmdChangeLineupLeaderScRsp, new ChangeLineupLeaderScRsp
|
2024-01-27 13:06:07 +00:00
|
|
|
|
{
|
|
|
|
|
Slot = request.Slot,
|
2024-01-27 13:08:24 +00:00
|
|
|
|
Retcode = (uint)RetcodeStatus.RetSucc
|
2024-01-27 13:06:07 +00:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|