Period spacings of gravity modes in rapidly rotating magnetic stars