diff --git a/Server/Protocol/Handlers/11-ClientHandler/11-02-CharacterListRequest.cs b/Server/Protocol/Handlers/11-ClientHandler/11-02-CharacterListRequest.cs index 61044ca..bec0592 100644 --- a/Server/Protocol/Handlers/11-ClientHandler/11-02-CharacterListRequest.cs +++ b/Server/Protocol/Handlers/11-ClientHandler/11-02-CharacterListRequest.cs @@ -1,5 +1,6 @@ using PSO2SERVER.Database; using PSO2SERVER.Protocol.Packets; +using System.IO; using System.Linq; namespace PSO2SERVER.Protocol.Handlers @@ -14,6 +15,7 @@ namespace PSO2SERVER.Protocol.Handlers if (context._account == null) return; + //context.SendPacket(File.ReadAllBytes("packets/0000_07_45_49_217936300.bin")); context.SendPacket(new CharacterListPacket(context._account.AccountId)); } diff --git a/Server/Protocol/Packets/08-SpawnPacket/08-04-CharacterSpawnPacket.cs b/Server/Protocol/Packets/08-SpawnPacket/08-04-CharacterSpawnPacket.cs index ee7b191..560988e 100644 --- a/Server/Protocol/Packets/08-SpawnPacket/08-04-CharacterSpawnPacket.cs +++ b/Server/Protocol/Packets/08-SpawnPacket/08-04-CharacterSpawnPacket.cs @@ -108,7 +108,7 @@ namespace PSO2SERVER.Protocol.Packets pkt.Write(Unk11); pkt.Write(GmFlag); pkt.WriteFixedLengthUtf16(_client._account.Nickname, 0x10); - pkt.BaseStream.Seek(0x60 - (0x10 * 2), SeekOrigin.Current); + pkt.BaseStream.Seek(0x60, SeekOrigin.Current); pkt.Write(Unk12); return pkt.ToArray(); diff --git a/Server/Protocol/Packets/11-ClientPacket/11-03-CharacterListPacket.cs b/Server/Protocol/Packets/11-ClientPacket/11-03-CharacterListPacket.cs index 81a6d33..614b810 100644 --- a/Server/Protocol/Packets/11-ClientPacket/11-03-CharacterListPacket.cs +++ b/Server/Protocol/Packets/11-ClientPacket/11-03-CharacterListPacket.cs @@ -2,6 +2,7 @@ using PSO2SERVER.Models; using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Runtime.InteropServices; using System.Runtime.Remoting.Contexts; @@ -104,6 +105,15 @@ namespace PSO2SERVER.Protocol.Packets Characters_count = (uint)Characters.Count(); } + var rest_count = 30 - Characters_count; + + for (var i = 0; i < rest_count; i++) + { + //Character character = Characters[0]; + Characters.Add(Characters[0]); + EquippedItems.Add(EquippedItems[0]); + } + var pkt = new PacketWriter(); pkt.Write(Characters_count); // 写入玩家数量 @@ -114,14 +124,15 @@ namespace PSO2SERVER.Protocol.Packets pkt.Write(ch.BuildCharacterByteArray());//4 } - pkt.Write((uint)EquippedItems.Count()); // 写入物品数量 - foreach (var itemsArray in EquippedItems) - { - foreach (var item in itemsArray) - { - pkt.WriteStruct(item); - } - } + pkt.Write(File.ReadAllBytes("packets/charlist_rest.bin")); + //pkt.Write((uint)EquippedItems.Count()); // 写入物品数量 + //foreach (var itemsArray in EquippedItems) + //{ + // foreach (var item in itemsArray) + // { + // pkt.WriteStruct(item); + // } + //} //// Write PlayTimes //foreach (var playTime in PlayTimes) //{