I`ve had plenty of opiates during and after surgery. I hate them and avoid them like the plague.
As endorphins act on opiate receptors in the brain, it would depend on how much opiate you took. The receptors would probably be more or less occupied if you took a standard dose, so the endorphins wouldn`t act much, assuming you produced some. As for the heat and pain, you`d care a lot less than normal, but the pain would be significantly less, hence fewer endorphins. I suspect the heat would be similar, but again, you`d care less about it. My suspicion is that there is also a release of adrenaline, normally, probably caused by the pain. It`s possibly that would be significantly reduced, but who knows.
Bottom line - I don`t know, LOL!!!
I`m also not doing the experiment!