I'm having a little bit of trouble understanding the following sentence (namely the って言った and そういうことだった):
「メル、トレガーの養女になってお城に上がったんだってね。
僕のうちに来られない、って言ったのはそういうことだったんだ…」
I think the speaker might be quoting a third-party because it looks like "he said" and then followed by "it was said". Is that about right...?
メル: a female character
トレガー: male character
The speaker is a 3rd character.