1A 4D数据集测试修正
This commit is contained in:
parent
936ef8a40a
commit
a0c9a9651a
@ -35,4 +35,44 @@ namespace PSO2SERVER.Models
|
||||
public uint Unk14;
|
||||
public uint Unk15;
|
||||
}
|
||||
|
||||
public struct MissionPassItem
|
||||
{
|
||||
/// Reward ID (?).
|
||||
public uint Id { get; set; }
|
||||
|
||||
/// Reward tier.
|
||||
public uint Tier { get; set; }
|
||||
|
||||
/// Gold pass only flag.
|
||||
public uint IsGold { get; set; }
|
||||
|
||||
public uint Unk4 { get; set; }
|
||||
|
||||
/// Group ID.
|
||||
public uint Group { get; set; }
|
||||
|
||||
public uint Unk6 { get; set; }
|
||||
|
||||
public uint Unk7 { get; set; }
|
||||
|
||||
public uint Unk8 { get; set; }
|
||||
|
||||
/// Item data.
|
||||
public PSO2Items Item { get; set; }
|
||||
|
||||
// Constructor for struct
|
||||
public MissionPassItem(uint id, uint tier, uint isGold, uint unk4, uint group, uint unk6, uint unk7, uint unk8, PSO2Items item)
|
||||
{
|
||||
Id = id;
|
||||
Tier = tier;
|
||||
IsGold = isGold;
|
||||
Unk4 = unk4;
|
||||
Group = group;
|
||||
Unk6 = unk6;
|
||||
Unk7 = unk7;
|
||||
Unk8 = unk8;
|
||||
Item = item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,10 +27,10 @@ namespace PSO2SERVER.Protocol.Handlers
|
||||
|
||||
List<MailHeader> Headers = new List<MailHeader>
|
||||
{
|
||||
new MailHeader(1234, 5678, 1001, new byte[0x14], 1111, 2222, TimeSpan.FromDays(1), 3333, "SenderName", "MailSubject")
|
||||
new MailHeader(1, 0, (uint)context._account.AccountId, new byte[0x14], 0, 0, TimeSpan.FromDays(1), 0, context.Character.Name, "MailSubject")
|
||||
};
|
||||
|
||||
MailListPacket packet = new MailListPacket(1, 2, 3, 4, new byte[0x4], 100, "PlayerName", "CharacterName", Headers);
|
||||
MailListPacket packet = new MailListPacket(1, 2, 3, 4, new byte[0x4], 100, context.Character.Name, context._account.Nickname, Headers);
|
||||
|
||||
context.SendPacket(packet);
|
||||
}
|
||||
|
@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PSO2SERVER.Models;
|
||||
using PSO2SERVER.Protocol.Packets;
|
||||
|
||||
namespace PSO2SERVER.Protocol.Handlers
|
||||
{
|
||||
[PacketHandlerAttr(0x1A, 0x06)]
|
||||
public class MailBodyRequest : PacketHandler
|
||||
{
|
||||
public struct MailBodyRequestPacket
|
||||
{
|
||||
public MailId id;
|
||||
}
|
||||
|
||||
public override void HandlePacket(Client context, byte flags, byte[] data, uint position, uint size)
|
||||
{
|
||||
var info = string.Format("[<--] 接收到的数据 (hex): {0} 字节", data.Length);
|
||||
Logger.WriteHex(info, data);
|
||||
|
||||
var reader = new PacketReader(data, position, size);
|
||||
var pkt = reader.ReadStruct<MailBodyRequestPacket>();
|
||||
|
||||
Logger.WriteObj(pkt);
|
||||
|
||||
context.SendPacket(new MailBodyPacket(pkt.id, "????", 0));
|
||||
}
|
||||
}
|
||||
}
|
@ -15,9 +15,7 @@ namespace PSO2SERVER.Protocol.Handlers
|
||||
var info = string.Format("[<--] 接收到的数据 (hex): {0} 字节", data.Length);
|
||||
Logger.WriteHex(info, data);
|
||||
|
||||
//Mission mission = new Mission();
|
||||
|
||||
//context.SendPacket(new ARKSMissionListPacket(mission));
|
||||
context.SendPacket(new MissionPassInfoPacket());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,9 +15,7 @@ namespace PSO2SERVER.Protocol.Handlers
|
||||
var info = string.Format("[<--] 接收到的数据 (hex): {0} 字节", data.Length);
|
||||
Logger.WriteHex(info, data);
|
||||
|
||||
//Mission mission = new Mission();
|
||||
|
||||
//context.SendPacket(new ARKSMissionListPacket(mission));
|
||||
context.SendPacket(new MissionPassPacket());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,9 +8,20 @@ namespace PSO2SERVER.Protocol.Packets
|
||||
{
|
||||
public class MailBodyPacket : Packet
|
||||
{
|
||||
public MailId Id { get; set; } = new MailId();
|
||||
public string Messaga { get; set; } = string.Empty;
|
||||
public uint Unk3 { get; set; } = 0;
|
||||
|
||||
public MailBodyPacket()
|
||||
{
|
||||
Id = new MailId();
|
||||
}
|
||||
|
||||
public MailBodyPacket(MailId id, string messaga, uint unk3)
|
||||
{
|
||||
Id = id;
|
||||
Messaga = messaga;
|
||||
Unk3 = unk3;
|
||||
}
|
||||
|
||||
#region implemented abstract members of Packet
|
||||
@ -18,12 +29,15 @@ namespace PSO2SERVER.Protocol.Packets
|
||||
public override byte[] Build()
|
||||
{
|
||||
var pkt = new PacketWriter();
|
||||
pkt.WriteStruct(Id);
|
||||
pkt.WriteUtf16(Messaga, 0x5913, 0x82);
|
||||
pkt.Write(Unk3);
|
||||
return pkt.ToArray();
|
||||
}
|
||||
|
||||
public override PacketHeader GetHeader()
|
||||
{
|
||||
return new PacketHeader(0x1A, 0x07, PacketFlags.None);
|
||||
return new PacketHeader(0x1A, 0x07, PacketFlags.PACKED);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -8,9 +8,11 @@ namespace PSO2SERVER.Protocol.Packets
|
||||
{
|
||||
public class MissionPassInfoPacket : Packet
|
||||
{
|
||||
public FixedList<uint> unk { get; set; } = new FixedList<uint>(0x2F);
|
||||
|
||||
public MissionPassInfoPacket()
|
||||
{
|
||||
unk = new FixedList<uint>(0x2F);
|
||||
}
|
||||
|
||||
#region implemented abstract members of Packet
|
||||
@ -18,6 +20,7 @@ namespace PSO2SERVER.Protocol.Packets
|
||||
public override byte[] Build()
|
||||
{
|
||||
var pkt = new PacketWriter();
|
||||
pkt.WriteList(unk);
|
||||
return pkt.ToArray();
|
||||
}
|
||||
|
||||
|
@ -8,16 +8,165 @@ namespace PSO2SERVER.Protocol.Packets
|
||||
{
|
||||
public class MissionPassPacket : Packet
|
||||
{
|
||||
public uint Unk1 { get; set; }
|
||||
|
||||
// Ongoing season ID.
|
||||
public uint CurSeasonId { get; set; }
|
||||
|
||||
// Ongoing season name.
|
||||
public string CurSeason { get; set; }
|
||||
|
||||
// Stars required to advance to the next tier.
|
||||
public uint StarsPerTier { get; set; }
|
||||
|
||||
// Regular tier count.
|
||||
public uint Tiers { get; set; }
|
||||
|
||||
// Overrun tier count.
|
||||
public uint OverrunTiers { get; set; }
|
||||
|
||||
// Total tier count.
|
||||
public uint TotalTiers { get; set; }
|
||||
|
||||
// Pass start timestamp.
|
||||
public uint StartDate { get; set; }
|
||||
|
||||
// Pass end timestamp.
|
||||
public uint EndDate { get; set; }
|
||||
|
||||
// Catchup period start timestamp.
|
||||
public uint CatchupStart { get; set; }
|
||||
|
||||
public uint Unk11 { get; set; }
|
||||
|
||||
// Banner ID for the ongoing season.
|
||||
public string CurBanner { get; set; }
|
||||
|
||||
// SG price per tier.
|
||||
public uint PricePerTier { get; set; }
|
||||
|
||||
// SG price for gold pass.
|
||||
public uint GoldPassPrice { get; set; }
|
||||
|
||||
// Mission Pass rewards.
|
||||
public List<MissionPassItem> CurItems { get; set; }
|
||||
|
||||
// Previous season ID.
|
||||
public uint LastSeasonId { get; set; }
|
||||
|
||||
// Previous season name.
|
||||
public string LastSeason { get; set; }
|
||||
|
||||
// Stars required to advance to the next tier (previous season).
|
||||
public uint LastStarsPerTier { get; set; }
|
||||
|
||||
// Regular tier count (previous season).
|
||||
public uint LastTiers { get; set; }
|
||||
|
||||
// Overrun tier count (previous season).
|
||||
public uint LastOverrunTiers { get; set; }
|
||||
|
||||
// Total tier count (previous season).
|
||||
public uint LastTotalTiers { get; set; }
|
||||
|
||||
// Pass start timestamp (previous season).
|
||||
public uint LastStartDate { get; set; }
|
||||
|
||||
// Pass end timestamp (previous season).
|
||||
public uint LastEndDate { get; set; }
|
||||
|
||||
// Catchup period start timestamp (previous season).
|
||||
public uint LastCatchupStart { get; set; }
|
||||
|
||||
// Catchup period end timestamp (previous season).
|
||||
public uint LastCatchupEnd { get; set; }
|
||||
|
||||
// Banner ID for the previous season.
|
||||
public string LastBanner { get; set; }
|
||||
|
||||
// SG price per tier (previous season).
|
||||
public uint LastPricePerTier { get; set; }
|
||||
|
||||
// SG price for gold pass (previous season).
|
||||
public uint LastGoldPassPrice { get; set; }
|
||||
|
||||
// Mission Pass rewards (previous season).
|
||||
public List<MissionPassItem> LastItems { get; set; }
|
||||
|
||||
public uint Unk30 { get; set; }
|
||||
|
||||
public uint Unk31 { get; set; }
|
||||
|
||||
// Default constructor
|
||||
public MissionPassPacket()
|
||||
{
|
||||
CurItems = new List<MissionPassItem>();
|
||||
LastItems = new List<MissionPassItem>();
|
||||
}
|
||||
|
||||
|
||||
#region implemented abstract members of Packet
|
||||
|
||||
public override byte[] Build()
|
||||
{
|
||||
var pkt = new PacketWriter();
|
||||
pkt.Write(Unk1);
|
||||
pkt.Write(CurSeasonId);
|
||||
pkt.WriteUtf16(CurSeason, 0xB0C, 0x35);
|
||||
// Stars required to advance to the next tier.
|
||||
pkt.Write(StarsPerTier);
|
||||
// Regular tier count.
|
||||
pkt.Write(Tiers);
|
||||
// Overrun tier count.
|
||||
pkt.Write(OverrunTiers);
|
||||
// Total tier count.
|
||||
pkt.Write(TotalTiers);
|
||||
// Pass start timestamp.
|
||||
pkt.Write(StartDate);
|
||||
// Pass end timestamp.
|
||||
pkt.Write(EndDate);
|
||||
// Catchup period start timestamp.
|
||||
pkt.Write(CatchupStart);
|
||||
pkt.Write(Unk11);
|
||||
// Banner ID for the ongoing season.
|
||||
pkt.WriteUtf16(CurBanner, 0xB0C, 0x35);
|
||||
// SG price per tier.
|
||||
pkt.Write(PricePerTier);
|
||||
// SG price for gold pass.
|
||||
pkt.Write(GoldPassPrice);
|
||||
|
||||
// Write CurItems count and each item
|
||||
pkt.WriteMagic(CurItems.Count, 0xB0C, 0x35);
|
||||
foreach (var item in CurItems)
|
||||
{
|
||||
pkt.WriteStruct(item);
|
||||
}
|
||||
|
||||
// Write other properties
|
||||
pkt.Write(LastSeasonId);
|
||||
pkt.WriteUtf16(LastSeason, 0xB0C, 0x35);
|
||||
pkt.Write(LastStarsPerTier);
|
||||
pkt.Write(LastTiers);
|
||||
pkt.Write(LastOverrunTiers);
|
||||
pkt.Write(LastTotalTiers);
|
||||
pkt.Write(LastStartDate);
|
||||
pkt.Write(LastEndDate);
|
||||
pkt.Write(LastCatchupStart);
|
||||
pkt.Write(LastCatchupEnd);
|
||||
pkt.WriteUtf16(LastBanner, 0xB0C, 0x35);
|
||||
pkt.Write(LastPricePerTier);
|
||||
pkt.Write(LastGoldPassPrice);
|
||||
|
||||
// Write LastItems count and each item
|
||||
pkt.WriteMagic(LastItems.Count, 0xB0C, 0x35);
|
||||
foreach (var item in LastItems)
|
||||
{
|
||||
pkt.WriteStruct(item);
|
||||
}
|
||||
|
||||
// Write Unk30 and Unk31
|
||||
pkt.Write(Unk30);
|
||||
pkt.Write(Unk31);
|
||||
return pkt.ToArray();
|
||||
}
|
||||
|
||||
|
@ -353,6 +353,7 @@
|
||||
<Compile Include="Protocol\Handlers\11-ClientHandler\11-EB-NicknameCheckRequest - 复制.cs" />
|
||||
<Compile Include="Protocol\Handlers\11-ClientHandler\11-52-CreateCharacterInviteNickname.cs" />
|
||||
<Compile Include="Protocol\Handlers\11-ClientHandler\11-C7-CharacterShipInfoRequest.cs" />
|
||||
<Compile Include="Protocol\Handlers\1A-MailHandler\1A-06-MailBodyRequest.cs" />
|
||||
<Compile Include="Protocol\Handlers\1A-MailHandler\1A-02-DeleteMailRequest.cs" />
|
||||
<Compile Include="Protocol\Handlers\1A-MailHandler\1A-00-MailListRequest.cs" />
|
||||
<Compile Include="Protocol\Handlers\1C-CharacterInfoHandler\1C-64-UNK.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user