public static void HandleWorldTeleport(ref PacketReader packet, ref WorldManager 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(Opcodes.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(0x08000000); manager.Send(movementStatus); }
public static void HandleMovementStatus(ref PacketReader packet, ref WorldManager manager) { Opcodes MoveMessage = packet.Opcode; UInt64 TransportGuid = packet.ReadUInt64(); Single TransportX = packet.ReadFloat(); Single TransportY = packet.ReadFloat(); Single TransportZ = packet.ReadFloat(); Single TransportO = packet.ReadFloat(); Single X = packet.ReadFloat(); Single Y = packet.ReadFloat(); Single Z = packet.ReadFloat(); Single O = packet.ReadFloat(); Single Pitch = packet.ReadFloat(); UInt32 Flags = packet.ReadUInt32(); PacketWriter movementStatus = new PacketWriter(MoveMessage); movementStatus.WriteUInt64(TransportGuid); movementStatus.WriteFloat(TransportX); movementStatus.WriteFloat(TransportY); movementStatus.WriteFloat(TransportZ); movementStatus.WriteFloat(TransportO); movementStatus.WriteFloat(X); movementStatus.WriteFloat(Y); movementStatus.WriteFloat(Z); movementStatus.WriteFloat(O); movementStatus.WriteFloat(Pitch); movementStatus.WriteUInt32(Flags); manager.Send(movementStatus); var result = CharacterObject.GetOnlineCharacter(manager.account); result.X = X; result.Y = Y; result.Z = Z; result.O = O; DB.Characters.Save(result); }