41 lines
964 B
C#
41 lines
964 B
C#
using PSO2SERVER.Models;
|
|
using PSO2SERVER.Zone;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using static PSO2SERVER.Zone.Map;
|
|
|
|
namespace PSO2SERVER.Protocol.Packets
|
|
{
|
|
public class MapTransferPacket : Packet
|
|
{
|
|
private readonly Map _map;
|
|
private readonly int _playerid;
|
|
|
|
public MapTransferPacket(Map map, int PlayerId)
|
|
{
|
|
_map = map;
|
|
_playerid = PlayerId;
|
|
}
|
|
|
|
#region implemented abstract members of Packet
|
|
|
|
public override byte[] Build()
|
|
{
|
|
PacketWriter pkt = new PacketWriter();
|
|
pkt.WriteStruct(Map);
|
|
pkt.WriteStruct(target);
|
|
pkt.WriteStruct(settings);
|
|
return pkt.ToArray();
|
|
}
|
|
|
|
public override PacketHeader GetHeader()
|
|
{
|
|
return new PacketHeader(0x03, 0x00, PacketFlags.None);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
} |