Shake it off gives an 8% of max HP shield, 4% extra increase for every buff it consumes.

But how does this work in relation to thrill of battle? Thrill increases max HP by 20%, so when is the buff consumed? Before shake it off is applied, or after?

E.G. You have 1000 HP, thrill of battle increases that to 1200 HP, you use shake it off giving a 12% of max HP shield, is that shield 120 HP (12% of 1000, applied after Thrill of battle is removed)? Or 144 hp (12% of 1200, applied before thrill of battle is removed)?