This repository has been archived on 2024-03-29. You can view files and clone it, but cannot push or open issues or pull requests.
FreeSR/FreeSR.Gateserver/Manager/Handlers/AvatarReqGroup.cs

41 lines
1.2 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
{
[Handler(CmdType.GetAvatarDataCsReq)]
public static void OnGetAvatarDataCsReq(NetSession session, int cmdId, object data)
{
var request = data as GetAvatarDataCsReq;
var response = new GetAvatarDataScRsp
{
Retcode = Retcode.RETCODE_RET_SUCC,
IsAll = request.IsGetAll,
AvatarList = new List<Avatar>()
};
int[] characters = new int[] { 8001, 1005, 1003 };
foreach (int id in characters)
{
response.AvatarList.Add(new Avatar
{
BaseAvatarId = id,
Exp = 0,
Level = 1,
Promotion = 0,
Rank = 6,
SkilltreeList = new List<AvatarSkillTree>(),
EquipmentUniqueId = 0
});
}
session.Send(CmdType.GetAvatarDataScRsp, response);
}
}
}