Monte Cook's "Ptolus" as a setting, and more importantly, as one of the test-beds for D&D3e, takes magic into account. It might be worth taking a look at, if you know someone with it.
In general, though, I can't think of anything in any of the rule books that deal with this at length. I know...