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

50 lines
1.6 KiB
C#
Raw Normal View History

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-01-27 13:08:24 +00:00
Retcode = (uint)RetcodeStatus.RetSucc,
IsAll = request.IsGetAll
2024-01-27 13:06:07 +00:00
};
2024-01-27 13:08:24 +00:00
uint[] 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
var avatarData = new Avatar
2024-01-27 13:06:07 +00:00
{
BaseAvatarId = id,
Exp = 0,
Level = 1,
Promotion = 0,
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
}
}
}