IMHO, the mechanical issues come first! I bought a 2011 Class B two months ago. It looked and ran so good that I didn't get too deep into checking out the RV systems. What I should have done before deciding on a price, though (take a ladder and a flashlight):
Remove the anode rod on the water heater and look for scale. Also crawl underneath and look at the fresh water tank (it's the white one). When I realized how crudded up they were, I did some serious flushing and ended up flushing scale through the system, clogging up the water feed to the toilet and all the faucet screens. Had to remove the toilet to get the line clear.
Check the dates on ALL tires. I looked at only the rears (2 yrs old); the fronts were 6 yrs old.
Take a ladder and look at the roof, especially the seals around everything. I had looked UP on the inside for signs of leaks. Nothing. But later I found water stains on the wall near the floor
under the sofa bed. Turns out there had apparently been a leak around the AC and it had been resealed but it would have been nice to know beforehand.
Check battery(s) dates. One of mine had no date, the other was original factory. And while you're under the hood, use your flashlight and look for signs that any rodents have nested under there.
Remove the outside appliance covers and use your flashlight to look for mud dauber nests in the water heater compartment, the furnace exhaust tube, and the fridge compartment. I checked these but one nest was so deep into a dark area of the water heater that without a flashlight, it wasn't visible. I found it when I turned it on and went out to check the flame color.
One thing I haven't done yet (am a little afraid to but it's mine now so doesn't matter) is does the fridge work on all power sources. I know this one works on AC. Haven't checked it yet on propane and DC. Wish me luck.
My biggest mistake was that it was so clean and pretty that I assumed the previous owner had maintained it well and all the systems did work. Stupid me. Lesson learned. Had I done all this beforehand, I would have dickered harder on the price.
Good luck and best wishes!
Added: if there is a generator, don't just turn it on. Turn it on and run it under a load; does it work with the house AC running? IMO, the only point of a generator is to be able to run the air conditioner. Actually, I dislike generators, they're noisy. I'd rather go someplace where AC isn't needed or just sit outside under a shade tree but there it is.