コード例 #1
0
        //[Parser(OpCodes.SMSG_INIT_WORLD_STATES)]
        public void SMSG_INIT_WORLD_STATES(Parser packet)
        {
            var mapId = packet.ReadInt32();
            WriteLine("Map ID: " + mapId);

            var zoneId = packet.ReadInt32();
            WriteLine("Zone ID: " + zoneId);

            var areaId = packet.ReadInt32();
            WriteLine("Area ID: " + areaId);

            var numFields = packet.ReadInt16();
            WriteLine("Field Count: " + numFields);

            for (var i = 0; i < numFields; i++)
                ReadWorldStateBlock(packet);
        }
コード例 #2
0
        public void HandleVoiceRosterUpdate(Parser packet)
        {
            var unk64 = packet.ReadInt64();
            WriteLine("Unk Int64: " + unk64);

            var chanId = packet.ReadInt16();
            WriteLine("Channel ID: " + chanId);

            var chanName = packet.ReadCString();
            WriteLine("Channel Name: " + chanName);

            var key = Encoding.UTF8.GetString(packet.ReadBytes(16));
            WriteLine("Encryption Key: " + key);

            var ip = packet.ReadInt32();
            WriteLine("Voice Server IP: " + ip);

            var count = packet.ReadByte();
            WriteLine("Player Count: " + count);

            var leaderGuid = packet.ReadGuid();
            WriteLine("Leader GUID: " + leaderGuid);

            var leaderFlags = packet.ReadByte();
            WriteLine("Leader Flags: 0x" + leaderFlags.ToString("X2"));

            var unk = packet.ReadByte();
            WriteLine("Unk Byte 1: " + unk);

            for (var i = 0; i < count - 1; i++)
            {
                var guid = packet.ReadGuid();
                WriteLine("Player GUID: " + guid);

                var idx = packet.ReadByte();
                WriteLine("Index: " + idx);

                var flags = packet.ReadByte();
                WriteLine("Flags: 0x" + flags.ToString("X2"));

                var unk2 = packet.ReadByte();
                WriteLine("Unk Byte 2: " + unk2);
            }
        }