The transfer switch routes electrical power from either the generator or the shore power cord to the main circuit breaker panel in the coach. If you have power from both sources, the generator takes priority.
It sounds like you have found the power transfer switch in the basement. I'm not sure leaking water can affect it, but maybe.
Our coach has an Esco ES50-65N transfer switch. Ours was noisy and I asked the Esco technician about it and he recommended a newer model: Part Number LPT50BRD.
Instead of replacing the box, I sprayed the contacts with Hosa DeoxIT spray. This quieted it down and it works much better now.
Be careful working in there. There are up to 240 volts at 50 amps per leg so it can be dangerous. If you are not comfortable with electrical, find a good electrician (even a residential electrician) and have him check the tightness of each connection and clean it with some DeoxIT.
Another thought. Make sure you trip and reset the circuit breaker located on the generator.