using PSO2SERVER.Models; using PSO2SERVER.Zone; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; namespace PSO2SERVER.Protocol.Packets { public class LoadingLevelPacket : Packet { private readonly string _file; /// Initial zone object. public ObjectHeader map_object { get; set; } = new ObjectHeader(); /// Receiving player. public ObjectHeader receiver { get; set; } = new ObjectHeader(); /// settings for the initial zone (i.e. first zone that the player will appear in). public ZoneSettings settings { get; set; } = new ZoneSettings(); public byte[] unk4 { get; set; } = new byte[0x0C]; public byte[] unk5 { get; set; } = new byte[0x0C]; public byte[] unk6 { get; set; } = new byte[0x0C]; public string unk7 { get; set; } = string.Empty;//Ascii /// settings for other zones. public List other_settings { get; set; } = new List(); public List warps { get; set; } = new List(); public List unk10 { get; set; } = new List(); public List unk11 { get; set; } = new List(); public List unk12 { get; set; } = new List(); public List unk13 { get; set; } = new List(); public List unk14 { get; set; } = new List(); public List unk15 { get; set; } = new List(); public List unk16 { get; set; } = new List(); public string unk17 { get; set; } = string.Empty;//Ascii public uint unk18 { get; set; } = 0; public uint unk19 { get; set; } = 0; public uint unk20 { get; set; } = 0; // Fixed length array: C# doesn't have a direct equivalent, but we can use List or byte[]. // If the length is fixed, it's better to use byte[] and document its length. public List unk21 { get; set; } = new List(new byte[0x3C]); public uint unk22 { get; set; } = 0; public byte[] unk23 { get; set; } = new byte[0x10]; public byte[] unk24 { get; set; } = new byte[0x10]; public List unk25 { get; set; } = new List { }; // Fixed length array: 0x200 bytes. public List unk26 { get; set; } = new List(new byte[0x200]); public List unk27 { get; set; } = new List { }; public string unk28 { get; set; } = string.Empty;//Ascii public string unk29 { get; set; } = string.Empty;//Ascii public ulong unk30 { get; set; } = 0; public ulong unk31 { get; set; } = 0; public byte unk32 { get; set; } = 0; public byte unk33 { get; set; } = 0; public byte unk34 { get; set; } = 0; public byte unk35 { get; set; } = 0; public uint unk36 { get; set; } = 0; public byte[] unk37 { get; set; } = new byte[0x14]; public ulong unk38 { get; set; } = 0; public uint unk39 { get; set; } = 0; public uint unk40 { get; set; } = 0; public byte[] unk41 { get; set; } = new byte[0x12]; public ulong unk42 { get; set; } = 0; public byte unk43 { get; set; } = 0; public byte unk44 { get; set; } = 0; public List unk45 { get; set; } = new List(); public string unk46 { get; set; } = string.Empty;//Ascii public List unk47 { get; set; } = new List { }; public uint unk48 { get; set; } = 0; public byte[] unk49 { get; set; } = new byte[0x14]; public byte[] unk50 { get; set; } = new byte[0x14]; public uint unk51 { get; set; } = 0; public LoadingLevelPacket(string file) { _file = file; } public LoadingLevelPacket() { } #region implemented abstract members of Packet public override byte[] Build() { var setAreaPacket = File.ReadAllBytes("Resources\\quests\\" + _file + ".bin"); return setAreaPacket; } public override PacketHeader GetHeader() { return new PacketHeader(0x03, 0x24, PacketFlags.PACKED); } #endregion } }