public void Read(IPacketReader reader) { Locale = reader.ReadString().ToString(); RenderDistance = reader.ReadUInt8(); ChatMode = reader.ReadVarInt(); ChatColors = reader.ReadBoolean(); SkinParts = reader.ReadUInt8(); MainHand = reader.ReadVarInt(); }
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); }
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); }
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); }