角色解析失败

This commit is contained in:
Sancaros 2024-11-30 17:01:09 +08:00
parent d6fd7b75b7
commit 4bd5771f5d
3 changed files with 14 additions and 15 deletions

View File

@ -61,12 +61,12 @@ namespace PSO2SERVER.Protocol.Packets
writer.Write((byte)0x00);
writer.Write((ushort)0x00);
////writer.Write((ushort)0x022F); // 0x5C
//writer.Write((byte)0x2F); // 0x5C
//writer.Write((byte)0x02);
////writer.Write((ushort)0x0132); // 0x5E
//writer.Write((byte)0x32);
//writer.Write((byte)0x01);
////writer.write((ushort)0x022f); // 0x5c
//writer.write((byte)0x2f); // 0x5c
//writer.write((byte)0x02);
////writer.write((ushort)0x0132); // 0x5e
//writer.write((byte)0x32);
//writer.write((byte)0x01);
// Character data.
writer.Write((uint)_character.AccountID); // player ID copy
@ -75,17 +75,16 @@ namespace PSO2SERVER.Protocol.Packets
writer.Write(_character.VoiceType);//4
writer.Write(_character.Unk2);//2
writer.Write(_character.VoicePitch);//2
writer.Write((uint)0);//4
writer.WriteFixedLengthUtf16(_character.Name, 16);
writer.Write((uint)0); // 0x90
writer.WriteStruct(_character.Looks);
writer.WriteStruct(_character.Jobs);
//writer.WriteFixedLengthUtf16(_character.Account.Nickname, 16); // Nickname, maybe not 16 chars?
writer.WriteFixedLengthUtf16(_character.Account.Nickname, 16); // Nickname, maybe not 16 chars?
//writer.Write((uint)0); // 0x204
//writer.Write(IsGM); // gmflag?
//for (var i = 0; i < 60; i++)
// writer.Write((byte)0);
writer.Write((uint)0); // 0x204
writer.Write(IsGM); // gmflag?
for (var i = 0; i < 60; i++)
writer.Write((byte)0);
return writer.ToArray();
}

View File

@ -51,15 +51,15 @@ namespace PSO2SERVER.Protocol.Packets
foreach (var ch in chars)
{
writer.Write((uint)ch.AccountID);//4
writer.Write((uint)ch.CharacterID);//4
writer.Write((uint)ch.AccountID);//4
writer.Write(ch.Unk1);//4
writer.Write(ch.VoiceType);//4
writer.Write(ch.Unk2);//2
writer.Write(ch.VoicePitch);//2
writer.Write((uint)0);//4
writer.Write((uint)0);//4
writer.WriteFixedLengthUtf16(ch.Name, 16);
//Logger.WriteInternal("[CHR] 新增名为 {0} 的新角色.", ch.Name);
writer.Write((uint)0); // 修改这个值 可能会触发角色不可用或变为联动角色

View File

@ -144,7 +144,7 @@ namespace PSO2SERVER.Zone
c.SendPacket(new SetAccountIDPacket(c._account.AccountId));
// Spawn Character
c.SendPacket(new CharacterSpawnPacket(c.Character, location));
c.SendPacket(new CharacterSpawnPacket(c.Character, location, true, 1));
c.CurrentLocation = location;
c.CurrentZone = this;