角色列表还需要进一步修正 生成角色也需要修正 还有地图的载入也有问题
This commit is contained in:
parent
6528623190
commit
cf622beedc
@ -1,5 +1,6 @@
|
|||||||
using PSO2SERVER.Database;
|
using PSO2SERVER.Database;
|
||||||
using PSO2SERVER.Protocol.Packets;
|
using PSO2SERVER.Protocol.Packets;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace PSO2SERVER.Protocol.Handlers
|
namespace PSO2SERVER.Protocol.Handlers
|
||||||
@ -14,6 +15,7 @@ namespace PSO2SERVER.Protocol.Handlers
|
|||||||
if (context._account == null)
|
if (context._account == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
//context.SendPacket(File.ReadAllBytes("packets/0000_07_45_49_217936300.bin"));
|
||||||
context.SendPacket(new CharacterListPacket(context._account.AccountId));
|
context.SendPacket(new CharacterListPacket(context._account.AccountId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ namespace PSO2SERVER.Protocol.Packets
|
|||||||
pkt.Write(Unk11);
|
pkt.Write(Unk11);
|
||||||
pkt.Write(GmFlag);
|
pkt.Write(GmFlag);
|
||||||
pkt.WriteFixedLengthUtf16(_client._account.Nickname, 0x10);
|
pkt.WriteFixedLengthUtf16(_client._account.Nickname, 0x10);
|
||||||
pkt.BaseStream.Seek(0x60 - (0x10 * 2), SeekOrigin.Current);
|
pkt.BaseStream.Seek(0x60, SeekOrigin.Current);
|
||||||
pkt.Write(Unk12);
|
pkt.Write(Unk12);
|
||||||
|
|
||||||
return pkt.ToArray();
|
return pkt.ToArray();
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
using PSO2SERVER.Models;
|
using PSO2SERVER.Models;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Runtime.Remoting.Contexts;
|
using System.Runtime.Remoting.Contexts;
|
||||||
@ -104,6 +105,15 @@ namespace PSO2SERVER.Protocol.Packets
|
|||||||
Characters_count = (uint)Characters.Count();
|
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();
|
var pkt = new PacketWriter();
|
||||||
|
|
||||||
pkt.Write(Characters_count); // 写入玩家数量
|
pkt.Write(Characters_count); // 写入玩家数量
|
||||||
@ -114,14 +124,15 @@ namespace PSO2SERVER.Protocol.Packets
|
|||||||
pkt.Write(ch.BuildCharacterByteArray());//4
|
pkt.Write(ch.BuildCharacterByteArray());//4
|
||||||
}
|
}
|
||||||
|
|
||||||
pkt.Write((uint)EquippedItems.Count()); // 写入物品数量
|
pkt.Write(File.ReadAllBytes("packets/charlist_rest.bin"));
|
||||||
foreach (var itemsArray in EquippedItems)
|
//pkt.Write((uint)EquippedItems.Count()); // 写入物品数量
|
||||||
{
|
//foreach (var itemsArray in EquippedItems)
|
||||||
foreach (var item in itemsArray)
|
//{
|
||||||
{
|
// foreach (var item in itemsArray)
|
||||||
pkt.WriteStruct(item);
|
// {
|
||||||
}
|
// pkt.WriteStruct(item);
|
||||||
}
|
// }
|
||||||
|
//}
|
||||||
//// Write PlayTimes
|
//// Write PlayTimes
|
||||||
//foreach (var playTime in PlayTimes)
|
//foreach (var playTime in PlayTimes)
|
||||||
//{
|
//{
|
||||||
|
Loading…
Reference in New Issue
Block a user