Пример #1
0
 public void Read(IPacketReader reader)
 {
     Locale         = reader.ReadString().ToString();
     RenderDistance = reader.ReadUInt8();
     ChatMode       = reader.ReadVarInt();
     ChatColors     = reader.ReadBoolean();
     SkinParts      = reader.ReadUInt8();
     MainHand       = reader.ReadVarInt();
 }
Пример #2
0
        public void HandleWorldTeleport(ref IPacketReader packet, ref IWorldManager manager)
        {
            packet.ReadUInt32();
            byte zone = packet.ReadUInt8();

            var character = manager.Account.ActiveCharacter;

            character.Location.Update(packet, true);
            character.Teleport(character.Location, ref manager);
        }
Пример #3
0
        public void HandleMovementStatus(ref IPacketReader packet, ref IWorldManager manager)
        {
            if (manager.Account.ActiveCharacter.IsTeleporting)
            {
                return;
            }

            uint opcode = packet.Opcode;
            long pos    = packet.Position;

            var   character = manager.Account.ActiveCharacter;
            ulong Flags     = packet.ReadUInt64();

            packet.ReadUInt8();
            character.Location.Update(packet, true);

            //packet.Position = pos;
            //PacketWriter writer = new PacketWriter(opcode, Sandbox.Instance.Opcodes[opcode].ToString());
            //writer.Write(packet.ReadToEnd());
            //manager.Send(writer);
        }
Пример #4
0
        public void HandleWorldTeleport(ref IPacketReader packet, ref IWorldManager manager)
        {
            packet.ReadUInt32();
            byte  zone = packet.ReadUInt8();
            float x    = packet.ReadFloat();
            float y    = packet.ReadFloat();
            float z    = packet.ReadFloat();
            float o    = packet.ReadFloat();

            PacketWriter movementStatus = new PacketWriter(Sandbox.Instance.Opcodes[global::Opcodes.SMSG_MOVE_WORLDPORT_ACK], "SMSG_MOVE_WORLDPORT_ACK");

            movementStatus.WriteUInt64(0);
            movementStatus.WriteFloat(0);
            movementStatus.WriteFloat(0);
            movementStatus.WriteFloat(0);
            movementStatus.WriteFloat(0);
            movementStatus.WriteFloat(x);
            movementStatus.WriteFloat(y);
            movementStatus.WriteFloat(z);
            movementStatus.WriteFloat(o);
            movementStatus.WriteFloat(0);
            movementStatus.WriteUInt32(0);
            manager.Send(movementStatus);
        }