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 AvatarReqGroup
|
|
|
|
|
{
|
2024-01-27 13:08:24 +00:00
|
|
|
|
[Handler(CmdType.CmdGetAvatarDataCsReq)]
|
2024-01-27 13:06:07 +00:00
|
|
|
|
public static void OnGetAvatarDataCsReq(NetSession session, int cmdId, object data)
|
|
|
|
|
{
|
|
|
|
|
var request = data as GetAvatarDataCsReq;
|
|
|
|
|
|
|
|
|
|
var response = new GetAvatarDataScRsp
|
|
|
|
|
{
|
2024-02-21 06:41:22 +00:00
|
|
|
|
Retcode = 0,
|
2024-01-27 13:08:24 +00:00
|
|
|
|
IsAll = request.IsGetAll
|
2024-01-27 13:06:07 +00:00
|
|
|
|
};
|
|
|
|
|
|
2024-01-31 04:30:01 +00:00
|
|
|
|
uint[] characters = new uint[] { 8001,8002,8003,8004,
|
|
|
|
|
1001,1002,1003,1004,1005,1006,1008,1009,1013,
|
|
|
|
|
1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,
|
|
|
|
|
1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1217,
|
2024-02-21 06:41:22 +00:00
|
|
|
|
1301,1302,1303,1304,1305,1306,1307,1308,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
|
|
|
|
var avatarData = new Avatar
|
2024-01-27 13:06:07 +00:00
|
|
|
|
{
|
|
|
|
|
BaseAvatarId = id,
|
|
|
|
|
Exp = 0,
|
2024-01-31 04:30:01 +00:00
|
|
|
|
Level = 80,
|
|
|
|
|
Promotion = 6,
|
2024-01-27 13:06:07 +00:00
|
|
|
|
Rank = 6,
|
|
|
|
|
EquipmentUniqueId = 0
|
2024-01-27 13:08:24 +00:00
|
|
|
|
};
|
|
|
|
|
List<uint> SkillIdEnds = new List<uint> { 1, 2, 3, 4, 7, 101, 102, 103, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210 };
|
|
|
|
|
foreach (uint end in SkillIdEnds)
|
|
|
|
|
{
|
|
|
|
|
avatarData.SkilltreeLists.Add(new AvatarSkillTree
|
|
|
|
|
{
|
|
|
|
|
PointId = id * 1000 + end,
|
|
|
|
|
Level = 1
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response.AvatarLists.Add(avatarData);
|
2024-01-27 13:06:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-01-27 13:08:24 +00:00
|
|
|
|
session.Send(CmdType.CmdGetAvatarDataScRsp, response);
|
2024-01-27 13:06:07 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|