CustomHead and Frame impl, with GetMainDataRsp fix

This commit is contained in:
rafi1212122
2023-06-07 10:21:58 +07:00
parent f95f370a48
commit cd2087f6cb
20 changed files with 324 additions and 16 deletions

View File

@@ -1,4 +1,5 @@
using Common.Resources.Proto;
using Common.Utils.ExcelReader;
namespace PemukulPaku.GameServer.Handlers
{
@@ -8,7 +9,7 @@ namespace PemukulPaku.GameServer.Handlers
public void Handle(Session session, Packet packet)
{
GetCustomHeadDataRsp Rsp = new() { retcode = GetCustomHeadDataRsp.Retcode.Succ, IsAll = true };
Rsp.CustomHeadLists.Add(new CustomHead() { Id = 161001 });
Rsp.CustomHeadLists.AddRange(CustomHeadData.GetInstance().All.Where(x => x.HeadParaInt == 0 || session.Player.AvatarList.Select(x => x.AvatarId).ToList().Contains((uint)x.HeadParaInt) || session.Player.AvatarList.SelectMany(x => x.DressLists).ToList().Contains((uint)x.HeadParaInt)).Select(x => new CustomHead() { Id = (uint)x.HeadId }));
session.Send(Packet.FromProto(Rsp, CmdId.GetCustomHeadDataRsp));
}