Archived
1
0
Fork 0
forked from Moux23333/FreeSR
This repository has been archived on 2024-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
FreeSR/FreeSR.Gateserver/Manager/Handlers/AvatarReqGroup.cs
2024-01-27 21:08:24 +08:00

49 lines
1.6 KiB
C#

namespace FreeSR.Gateserver.Manager.Handlers
{
using FreeSR.Gateserver.Manager.Handlers.Core;
using FreeSR.Gateserver.Network;
using FreeSR.Proto;
internal static class AvatarReqGroup
{
[Handler(CmdType.CmdGetAvatarDataCsReq)]
public static void OnGetAvatarDataCsReq(NetSession session, int cmdId, object data)
{
var request = data as GetAvatarDataCsReq;
var response = new GetAvatarDataScRsp
{
Retcode = (uint)RetcodeStatus.RetSucc,
IsAll = request.IsGetAll
};
uint[] characters = new uint[] { 8001, 1307, 1306, 1312 };
foreach (uint id in characters)
{
var avatarData = new Avatar
{
BaseAvatarId = id,
Exp = 0,
Level = 1,
Promotion = 0,
Rank = 6,
EquipmentUniqueId = 0
};
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);
}
session.Send(CmdType.CmdGetAvatarDataScRsp, response);
}
}
}