The use of past perfect simple for something that happened before something else in the past and past perfect continuous to talk about how long something had been happening before something else in the past.
The use of past perfect simple for something that happened before something else in the past and past perfect continuous to talk about how long something had been happening before something else in the past.