修正write函数WritePosition
This commit is contained in:
parent
c534a0e816
commit
4ca991a7ce
@ -30,7 +30,7 @@ namespace PSO2SERVER.Models
|
||||
{
|
||||
PacketWriter writer = new PacketWriter();
|
||||
writer.WriteStruct(Header);
|
||||
writer.Write(Position);
|
||||
writer.WritePosition(Position);
|
||||
writer.Seek(2, SeekOrigin.Current); // Padding I guess...
|
||||
writer.WriteFixedLengthASCII(Name, 0x34);
|
||||
writer.Write(ThingFlag);
|
||||
|
@ -41,7 +41,7 @@ namespace PSO2SERVER.Packets.PSOPackets
|
||||
writer.WriteAccountHeader((uint)_character.Account.AccountId);
|
||||
|
||||
// Spawn position
|
||||
writer.Write(Position);
|
||||
writer.WritePosition(Position);
|
||||
|
||||
writer.Write((ushort)0); // padding?
|
||||
writer.WriteFixedLengthASCII("Character", 32);
|
||||
|
@ -24,7 +24,7 @@ namespace PSO2SERVER.Packets.PSOPackets
|
||||
{
|
||||
PacketWriter writer = new PacketWriter();
|
||||
writer.WriteStruct(_obj.Header);
|
||||
writer.Write(_obj.Position);
|
||||
writer.WritePosition(_obj.Position);
|
||||
writer.Seek(2, SeekOrigin.Current); // Padding I guess...
|
||||
writer.WriteFixedLengthASCII(_obj.Name, 0x34);
|
||||
writer.Write(_obj.ThingFlag);
|
||||
|
@ -24,7 +24,7 @@ namespace PSO2SERVER.Packets.PSOPackets
|
||||
{
|
||||
PacketWriter writer = new PacketWriter();
|
||||
writer.WriteStruct(_obj.Header);
|
||||
writer.Write(_obj.Position);
|
||||
writer.WritePosition(_obj.Position);
|
||||
writer.Seek(2, SeekOrigin.Current); // Padding I guess...
|
||||
writer.WriteFixedLengthASCII(_obj.Name, 0x20);
|
||||
|
||||
|
@ -118,17 +118,6 @@ namespace PSO2SERVER.Packets
|
||||
}
|
||||
}
|
||||
|
||||
public void Write(PSOLocation s)
|
||||
{
|
||||
Write(Helper.FloatToHalfPrecision(s.RotX));
|
||||
Write(Helper.FloatToHalfPrecision(s.RotY));
|
||||
Write(Helper.FloatToHalfPrecision(s.RotZ));
|
||||
Write(Helper.FloatToHalfPrecision(s.RotW));
|
||||
Write(Helper.FloatToHalfPrecision(s.PosX));
|
||||
Write(Helper.FloatToHalfPrecision(s.PosY));
|
||||
Write(Helper.FloatToHalfPrecision(s.PosZ));
|
||||
}
|
||||
|
||||
public void WriteAccountHeader(uint id)
|
||||
{
|
||||
Write(id);
|
||||
|
Loading…
Reference in New Issue
Block a user