In the DSP (well, Topaz now) codebase, if I read it correctly it's based off the highest TH level for anyone on the hate table AND eligible for exp from the monster when it dies (so it doesn't count if you tag it then move too far to get exp). It's calculated anytime an enmity calculation/update is performed, at least I think so - check out lines 150-151 here:
https://github.com/DarkstarProject/dark ... tainer.cppAnd as far as the TH calculation itself affecting drops, check out the formulas used starting at around line 3188 here:
https://github.com/DarkstarProject/dark ... rutils.cppOf course, I'm nothing remotely close to a seasoned developer, so I could be reading these entirely wrong.
..
But, all that said, Nasomi's TH code today is based off iterations on a many-year-old fork of DSP, and who knows how much different it is now than current mainline DSP/Topaz. We know for a fact that he/they made changes that dramatically changed drop rates for all kinds of stuff (since the initial code was very... generous). The "on the hate table" part is important, and seems to still be true in Nasomi - this is most likely why TH goes to complete shit if you hide a pull in dyna/wherever and never 're-tag' the mobs. Once you hide, all enmity is removed and a new calculation performed, so it's like you were never there.