mirror of
https://github.com/rafi1212122/PemukulPaku
synced 2025-12-12 19:14:34 +01:00
CustomHead and Frame impl, with GetMainDataRsp fix
This commit is contained in:
@@ -102,6 +102,77 @@ namespace Common.Database
|
||||
}
|
||||
}
|
||||
|
||||
public AvatarDetailData ToDetailData(EquipmentScheme equipment)
|
||||
{
|
||||
Weapon? weapon = equipment.WeaponList.Where(x => x.UniqueId == WeaponUniqueId).FirstOrDefault();
|
||||
Stigmata? stigmata1 = equipment.StigmataList.Where(x => x.UniqueId == StigmataUniqueId1).FirstOrDefault();
|
||||
Stigmata? stigmata2 = equipment.StigmataList.Where(x => x.UniqueId == StigmataUniqueId2).FirstOrDefault();
|
||||
Stigmata? stigmata3 = equipment.StigmataList.Where(x => x.UniqueId == StigmataUniqueId3).FirstOrDefault();
|
||||
|
||||
AvatarDetailData detailData = new()
|
||||
{
|
||||
AvatarId = AvatarId,
|
||||
AvatarArtifact = AvatarArtifact,
|
||||
AvatarLevel = Level,
|
||||
AvatarStar = Star,
|
||||
AvatarSubStar = SubStar,
|
||||
DressId = DressId,
|
||||
};
|
||||
|
||||
if (weapon is not null)
|
||||
{
|
||||
detailData.Weapon = new()
|
||||
{
|
||||
Id = weapon.Id,
|
||||
Level = weapon.Level,
|
||||
UniqueId = weapon.UniqueId,
|
||||
SubWeaponId = weapon.SubWeaponId
|
||||
};
|
||||
}
|
||||
|
||||
if (stigmata1 is not null)
|
||||
{
|
||||
detailData.Stigmata1 = new()
|
||||
{
|
||||
Id = stigmata1.Id,
|
||||
Level = stigmata1.Level,
|
||||
UniqueId = stigmata1.UniqueId
|
||||
};
|
||||
detailData.Stigmata1.RuneLists.AddRange(stigmata1.RuneLists);
|
||||
}
|
||||
|
||||
if (stigmata2 is not null)
|
||||
{
|
||||
detailData.Stigmata2 = new()
|
||||
{
|
||||
Id = stigmata2.Id,
|
||||
Level = stigmata2.Level,
|
||||
UniqueId = stigmata2.UniqueId
|
||||
};
|
||||
detailData.Stigmata2.RuneLists.AddRange(stigmata2.RuneLists);
|
||||
}
|
||||
|
||||
if (stigmata3 is not null)
|
||||
{
|
||||
detailData.Stigmata3 = new()
|
||||
{
|
||||
Id = stigmata3.Id,
|
||||
Level = stigmata3.Level,
|
||||
UniqueId = stigmata3.UniqueId
|
||||
};
|
||||
detailData.Stigmata3.RuneLists.AddRange(stigmata3.RuneLists);
|
||||
}
|
||||
|
||||
detailData.SkillLists.AddRange(SkillLists.Select(x =>
|
||||
{
|
||||
AvatarSkillDetailData skillDetailData = new() { SkillId = x.SkillId };
|
||||
skillDetailData.SubSkillLists.AddRange(x.SubSkillLists.Select(x => new AvatarSubSkillDetailData() { IsMask = x.IsMask, Level = x.Level, SubSkillId = x.SubSkillId }));
|
||||
return skillDetailData;
|
||||
}));
|
||||
|
||||
return detailData;
|
||||
}
|
||||
|
||||
public void AddFragment(uint num) { Fragment += num; }
|
||||
|
||||
public void SetDress(uint dressId) { DressId = dressId; }
|
||||
|
||||
@@ -31,6 +31,8 @@ namespace Common.Database
|
||||
WarshipFirstAvatarId = 101,
|
||||
WarshipSecondAvatarId = 0
|
||||
},
|
||||
CustomHeadId = 161001,
|
||||
FrameId = 200001,
|
||||
AssistantAvatarId = 101,
|
||||
BirthDate = 0,
|
||||
AbyssDynamicHard = 100,
|
||||
@@ -55,6 +57,12 @@ namespace Common.Database
|
||||
return user;
|
||||
}
|
||||
|
||||
public static UserScheme? FromUid(uint uid)
|
||||
{
|
||||
UserScheme? user = collection.AsQueryable().Where(d => d.Uid == uid).FirstOrDefault();
|
||||
return user;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||
@@ -70,6 +78,8 @@ namespace Common.Database
|
||||
public string SelfDesc { get; set; }
|
||||
public bool IsFirstLogin { get; set; }
|
||||
public string Token { get; set; }
|
||||
public int CustomHeadId { get; set; }
|
||||
public int FrameId { get; set; }
|
||||
public int WarshipId { get; set; }
|
||||
public WarshipAvatarData WarshipAvatar { get; set; }
|
||||
public int AssistantAvatarId { get; set; }
|
||||
|
||||
61
Common/Utils/ExcelReader/CustomHeadData.cs
Normal file
61
Common/Utils/ExcelReader/CustomHeadData.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Utils.ExcelReader
|
||||
{
|
||||
public class CustomHeadData : BaseExcelReader<CustomHeadData, CustomHeadDataExcel>
|
||||
{
|
||||
public override string FileName { get { return "CustomHeadData.json"; } }
|
||||
}
|
||||
|
||||
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||
public partial class CustomHeadDataExcel
|
||||
{
|
||||
[JsonProperty("indexID")]
|
||||
public int IndexId { get; set; }
|
||||
|
||||
[JsonProperty("Page")]
|
||||
public int Page { get; set; }
|
||||
|
||||
[JsonProperty("headTitle")]
|
||||
public string HeadTitle { get; set; }
|
||||
|
||||
[JsonProperty("headDescription")]
|
||||
public string HeadDescription { get; set; }
|
||||
|
||||
[JsonProperty("iconPath")]
|
||||
public string IconPath { get; set; }
|
||||
|
||||
[JsonProperty("imagePath")]
|
||||
public string ImagePath { get; set; }
|
||||
|
||||
[JsonProperty("Show")]
|
||||
public bool Show { get; set; }
|
||||
|
||||
[JsonProperty("HeadType")]
|
||||
public int HeadType { get; set; }
|
||||
|
||||
[JsonProperty("HeadParaInt")]
|
||||
public int HeadParaInt { get; set; }
|
||||
|
||||
[JsonProperty("TimeType")]
|
||||
public int TimeType { get; set; }
|
||||
|
||||
[JsonProperty("During")]
|
||||
public int During { get; set; }
|
||||
|
||||
[JsonProperty("EndTime")]
|
||||
public string EndTime { get; set; }
|
||||
|
||||
[JsonProperty("BgColorPath")]
|
||||
public string BgColorPath { get; set; }
|
||||
|
||||
[JsonProperty("rarity")]
|
||||
public int Rarity { get; set; }
|
||||
|
||||
[JsonProperty("DataImpl")]
|
||||
public object DataImpl { get; set; }
|
||||
|
||||
[JsonProperty("headID")]
|
||||
public int HeadId { get; set; }
|
||||
}
|
||||
}
|
||||
43
Common/Utils/ExcelReader/FrameData.cs
Normal file
43
Common/Utils/ExcelReader/FrameData.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Common.Utils.ExcelReader
|
||||
{
|
||||
public class FrameData : BaseExcelReader<FrameData, FrameDataExcel>
|
||||
{
|
||||
public override string FileName { get { return "FrameData.json"; } }
|
||||
}
|
||||
|
||||
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||
public partial class FrameDataExcel
|
||||
{
|
||||
[JsonProperty("name")]
|
||||
public HashName Name { get; set; }
|
||||
|
||||
[JsonProperty("rarity")]
|
||||
public int Rarity { get; set; }
|
||||
|
||||
[JsonProperty("desc")]
|
||||
public HashName Desc { get; set; }
|
||||
|
||||
[JsonProperty("iconPath")]
|
||||
public string IconPath { get; set; }
|
||||
|
||||
[JsonProperty("imagePath")]
|
||||
public string ImagePath { get; set; }
|
||||
|
||||
[JsonProperty("isShow")]
|
||||
public bool IsShow { get; set; }
|
||||
|
||||
[JsonProperty("UIShowOrder")]
|
||||
public int UiShowOrder { get; set; }
|
||||
|
||||
[JsonProperty("Type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
[JsonProperty("DataImpl")]
|
||||
public object DataImpl { get; set; }
|
||||
|
||||
[JsonProperty("id")]
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,8 @@ namespace PemukulPaku.GameServer.Commands
|
||||
{
|
||||
retcode = GetMainDataRsp.Retcode.Succ,
|
||||
Level = (uint)PlayerLevelData.GetInstance().CalculateLevel(session.Player.User.Exp).Level,
|
||||
Exp = (uint)PlayerLevelData.GetInstance().CalculateLevel(session.Player.User.Exp).Exp
|
||||
Exp = (uint)PlayerLevelData.GetInstance().CalculateLevel(session.Player.User.Exp).Exp,
|
||||
TypeLists = new uint[] { 3, 4 }
|
||||
};
|
||||
session.Send(Packet.FromProto(Rsp, CmdId.GetMainDataRsp), Packet.FromProto(new PlayerLevelUpNotify() { NewLevel = Rsp.Level }, CmdId.PlayerLevelUpNotify));
|
||||
}
|
||||
|
||||
@@ -70,8 +70,8 @@ namespace PemukulPaku.GameServer.Game.Chatrooms
|
||||
chatMsg.Time = (uint)Global.GetUnixInSeconds();
|
||||
chatMsg.AvatarId = (uint)User.AssistantAvatarId;
|
||||
chatMsg.DressId = session.Player.AvatarList.Where(avatar => avatar.AvatarId == User.AssistantAvatarId).First().DressId;
|
||||
chatMsg.FrameId = 200001;
|
||||
chatMsg.CustomHeadId = 161001;
|
||||
chatMsg.FrameId = User.FrameId < 200001 ? 200001 : (uint)User.FrameId;
|
||||
chatMsg.CustomHeadId = (uint)User.CustomHeadId;
|
||||
|
||||
Broadcast(chatMsg);
|
||||
Messages.Add(chatMsg);
|
||||
|
||||
@@ -9,7 +9,8 @@ namespace PemukulPaku.GameServer.Handlers
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
SendChatMsgNotify Data = packet.GetDecodedBody<SendChatMsgNotify>();
|
||||
WorldChatroom.GetInstance().GetChatroom(session).OnSendChat(session, Data.ChatMsg);
|
||||
if (Data.ChatMsg.Channel == ChatMsg.MsgChannel.World)
|
||||
WorldChatroom.GetInstance().GetChatroom(session).OnSendChat(session, Data.ChatMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ namespace PemukulPaku.GameServer.Handlers
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
GetMainDataReq Data = packet.GetDecodedBody<GetMainDataReq>();
|
||||
UserScheme User = session.Player.User;
|
||||
|
||||
PlayerLevelData.LevelData levelData = PlayerLevelData.GetInstance().CalculateLevel(User.Exp);
|
||||
|
||||
GetMainDataRsp Rsp = new()
|
||||
@@ -23,18 +23,18 @@ namespace PemukulPaku.GameServer.Handlers
|
||||
Exp = (uint)levelData.Exp,
|
||||
FreeHcoin = (uint)User.Hcoin,
|
||||
Hcoin = (uint)User.Hcoin,
|
||||
CustomHeadId = 161001,
|
||||
CustomHeadId = (uint)User.CustomHeadId,
|
||||
Scoin = session.Player.Equipment.MaterialList.Where(mat => mat.Id == 100).FirstOrDefault()?.Num ?? 0,
|
||||
IsAll = true,
|
||||
RegisterTime = User.GetCreationTime(),
|
||||
PayHcoin = 0,
|
||||
WarshipAvatar = User.WarshipAvatar,
|
||||
SelfDesc = User.SelfDesc,
|
||||
UseFrameId = 200001,
|
||||
UseFrameId = User.FrameId < 200001 ? 200001 : (uint)User.FrameId,
|
||||
OnPhonePendantId = 350005,
|
||||
Stamina = (uint)User.Stamina,
|
||||
StaminaRecoverConfigTime = 360,
|
||||
StaminaRecoverLeftTime = 0,
|
||||
StaminaRecoverLeftTime = 360,
|
||||
EquipmentSizeLimit = 1000,
|
||||
OpenPanelActivityLists = new uint[] { 2 },
|
||||
ChatworldActivityInfo = new()
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace PemukulPaku.GameServer.Handlers
|
||||
|
||||
session.Player.User.Nick = Data.Nickname;
|
||||
|
||||
GetMainDataRsp MainDataRsp = new() { retcode = GetMainDataRsp.Retcode.Succ, Nickname = session.Player.User.Nick };
|
||||
GetMainDataRsp MainDataRsp = new() { retcode = GetMainDataRsp.Retcode.Succ, Nickname = session.Player.User.Nick, TypeLists = new uint[] { 2 } };
|
||||
session.Send(Packet.FromProto(MainDataRsp, CmdId.GetMainDataRsp), Packet.FromProto(new NicknameModifyRsp() { retcode = NicknameModifyRsp.Retcode.Succ }, CmdId.NicknameModifyRsp));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@ namespace PemukulPaku.GameServer.Handlers
|
||||
GetMainDataRsp mainDataRsp = new()
|
||||
{
|
||||
retcode = GetMainDataRsp.Retcode.Succ,
|
||||
Birthday = Data.Birthday
|
||||
Birthday = Data.Birthday,
|
||||
TypeLists = new uint[] { 21 }
|
||||
};
|
||||
ReportBirthdayRsp Rsp = new() { retcode = ReportBirthdayRsp.Retcode.Succ };
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ namespace PemukulPaku.GameServer.Handlers
|
||||
GetMainDataRsp mainDataRsp = new()
|
||||
{
|
||||
retcode = GetMainDataRsp.Retcode.Succ,
|
||||
SelfDesc = Data.SelfDesc
|
||||
SelfDesc = Data.SelfDesc,
|
||||
TypeLists = new uint[] { 16 }
|
||||
};
|
||||
SetSelfDescRsp Rsp = new() { retcode = SetSelfDescRsp.Retcode.Succ };
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace PemukulPaku.GameServer.Handlers
|
||||
session.Player.User.AssistantAvatarId = (int)Data.AvatarId;
|
||||
|
||||
UpdateAssistantAvatarIdRsp Rsp = new() { retcode = UpdateAssistantAvatarIdRsp.Retcode.Succ };
|
||||
GetMainDataRsp MainDataRsp = new() { retcode = GetMainDataRsp.Retcode.Succ, AssistantAvatarId = (uint)session.Player.User.AssistantAvatarId };
|
||||
GetMainDataRsp MainDataRsp = new() { retcode = GetMainDataRsp.Retcode.Succ, AssistantAvatarId = (uint)session.Player.User.AssistantAvatarId, TypeLists = new uint[] { 19 } };
|
||||
|
||||
session.Send(Packet.FromProto(MainDataRsp, CmdId.GetMainDataRsp), Packet.FromProto(Rsp, CmdId.UpdateAssistantAvatarIdRsp));
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
using Common.Resources.Proto;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers.Three
|
||||
{
|
||||
[PacketCmdId(CmdId.GetOtherPlayerClientSettingReq)]
|
||||
internal class GetOtherPlayerClientSettingReqHadler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
GetOtherPlayerClientSettingReq Data = packet.GetDecodedBody<GetOtherPlayerClientSettingReq>();
|
||||
GetOtherPlayerClientSettingRsp Rsp = new()
|
||||
{
|
||||
retcode = GetOtherPlayerClientSettingRsp.Retcode.Succ,
|
||||
ClientSettingType = Data.ClientSettingType,
|
||||
TargetUid = Data.TargetUid,
|
||||
IsWeeklyGuideSwitchOn = false
|
||||
};
|
||||
|
||||
session.Send(Packet.FromProto(Rsp, CmdId.GetOtherPlayerClientSettingRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
23
GameServer/Handlers/Three/SetCustomHeadReqHandler.cs
Normal file
23
GameServer/Handlers/Three/SetCustomHeadReqHandler.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Common.Resources.Proto;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers.Three
|
||||
{
|
||||
[PacketCmdId(CmdId.SetCustomHeadReq)]
|
||||
internal class SetCustomHeadReqHandler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
SetCustomHeadReq Data = packet.GetDecodedBody<SetCustomHeadReq>();
|
||||
session.Player.User.CustomHeadId = (int)Data.Id;
|
||||
|
||||
GetMainDataRsp mainDataRsp = new()
|
||||
{
|
||||
retcode = GetMainDataRsp.Retcode.Succ,
|
||||
CustomHeadId = Data.Id,
|
||||
TypeLists = new uint[] { 36 }
|
||||
};
|
||||
|
||||
session.Send(Packet.FromProto(mainDataRsp, CmdId.GetMainDataRsp), Packet.FromProto(new SetCustomHeadRsp() { retcode = SetCustomHeadRsp.Retcode.Succ }, CmdId.SetCustomHeadRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,8 @@ namespace PemukulPaku.GameServer.Handlers
|
||||
GetMainDataRsp MainDataRsp = new()
|
||||
{
|
||||
retcode = GetMainDataRsp.Retcode.Succ,
|
||||
WarshipAvatar = session.Player.User.WarshipAvatar
|
||||
WarshipAvatar = session.Player.User.WarshipAvatar,
|
||||
TypeLists = new uint[] { 35 }
|
||||
};
|
||||
|
||||
session.Send(Packet.FromProto(MainDataRsp, CmdId.GetMainDataRsp), Packet.FromProto(new SetWarshipAvatarRsp() { retcode = SetWarshipAvatarRsp.Retcode.Succ }, CmdId.SetWarshipAvatarRsp));
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace PemukulPaku.GameServer.Handlers
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
GetFrameDataRsp Rsp = new() { retcode = GetFrameDataRsp.Retcode.Succ, IsAll = true };
|
||||
Rsp.FrameLists.Add(new FrameData() { Id = 200001 });
|
||||
Rsp.FrameLists.AddRange(Common.Utils.ExcelReader.FrameData.GetInstance().All.Select(x => new FrameData() { Id = (uint)x.Id }));
|
||||
|
||||
session.Send(Packet.FromProto(Rsp, CmdId.GetFrameDataRsp));
|
||||
}
|
||||
|
||||
49
GameServer/Handlers/Two/GetOtherPlayerCardDataReqHandler.cs
Normal file
49
GameServer/Handlers/Two/GetOtherPlayerCardDataReqHandler.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using Common.Database;
|
||||
using Common.Resources.Proto;
|
||||
using Common.Utils.ExcelReader;
|
||||
using PemukulPaku.GameServer.Game;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers.Two
|
||||
{
|
||||
[PacketCmdId(CmdId.GetOtherPlayerCardDataReq)]
|
||||
internal class GetOtherPlayerCardDataReqHandler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
GetOtherPlayerCardDataReq Data = packet.GetDecodedBody<GetOtherPlayerCardDataReq>();
|
||||
UserScheme? user = User.FromUid(Data.TargetUid);
|
||||
GetOtherPlayerCardDataRsp Rsp = new() { retcode = GetOtherPlayerCardDataRsp.Retcode.Succ, TargetUid = Data.TargetUid };
|
||||
|
||||
if(user is not null)
|
||||
{
|
||||
Player player = new(user);
|
||||
Rsp.CardData = new()
|
||||
{
|
||||
Uid = player.User.Uid,
|
||||
MsgData = new()
|
||||
{
|
||||
MsgIndex = 0,
|
||||
MsgConfig = 1
|
||||
},
|
||||
OnPhonePendantId = 350005
|
||||
};
|
||||
Rsp.PlayerData = new()
|
||||
{
|
||||
Uid = player.User.Uid,
|
||||
Nickname = player.User.Nick,
|
||||
Level = (uint)PlayerLevelData.GetInstance().CalculateLevel(player.User.Exp).Level,
|
||||
SelfDesc = player.User.SelfDesc,
|
||||
CustomHeadId = (uint)player.User.CustomHeadId,
|
||||
FrameId = player.User.FrameId < 200001 ? 200001 : (uint)player.User.FrameId,
|
||||
LeaderAvatar = player.AvatarList.FirstOrDefault(x => x.AvatarId == player.User.AvatarTeamList.FirstOrDefault()?.AvatarIdLists[0])?.ToDetailData(player.Equipment) ?? new() { AvatarId = 101 }
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
Rsp.retcode = GetOtherPlayerCardDataRsp.Retcode.Fail;
|
||||
}
|
||||
|
||||
session.Send(Packet.FromProto(Rsp, CmdId.GetOtherPlayerCardDataRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
22
GameServer/Handlers/Two/SetFrameUseReqHandler.cs
Normal file
22
GameServer/Handlers/Two/SetFrameUseReqHandler.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Common.Resources.Proto;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers.Two
|
||||
{
|
||||
[PacketCmdId(CmdId.SetFrameUseReq)]
|
||||
internal class SetFrameUseReqHandler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
SetFrameUseReq Data = packet.GetDecodedBody<SetFrameUseReq>();
|
||||
session.Player.User.FrameId = (int)Data.FrameId;
|
||||
GetMainDataRsp mainDataRsp = new()
|
||||
{
|
||||
retcode = GetMainDataRsp.Retcode.Succ,
|
||||
UseFrameId = Data.FrameId,
|
||||
TypeLists = new uint[] { 26 }
|
||||
};
|
||||
|
||||
session.Send(Packet.FromProto(mainDataRsp, CmdId.GetMainDataRsp), Packet.FromProto(new SetFrameUseRsp() { FrameId = Data.FrameId, retcode = SetFrameUseRsp.Retcode.Succ }, CmdId.SetFrameUseRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,8 @@ namespace PemukulPaku.GameServer.Handlers
|
||||
GetMainDataRsp MainDataRsp = new()
|
||||
{
|
||||
retcode = GetMainDataRsp.Retcode.Succ,
|
||||
WarshipTheme = new() { WarshipId = (uint)session.Player.User.WarshipId }
|
||||
WarshipTheme = new() { WarshipId = (uint)session.Player.User.WarshipId },
|
||||
TypeLists = new uint[] { 38 }
|
||||
};
|
||||
SetWarshipRsp Rsp = new() { retcode = SetWarshipRsp.Retcode.Succ };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user