Hello, I checked and WRobot don't regen if your character swim.
About traceline flag seem not correct on Vanilla, I'll check if I can fix it, but you can try code like:
var posToCheck = new Vector3(1, 2, 3);
Vector3 hit;
wManager.Wow.Helpers.TraceLine.TraceLineGo(posToCheck + new Vector3(0, 0, 20), posToCheck, CGWorldFrameHitFlags.HitTestAll, out hit);
if (hit.Z > ObjectManager.Me.Position.Z)
{
// out of water?
}