Next time. And this is how we fix Jeep alternators which ALWAYS die in water/Mud.
While engine is running, spray water (water bottle with spray type nozzle on the end-Aquafina) at and into the alternator, rev the engine up to 3k and do it again. Watch out for the fan blades. After it's done let the truck idle for a few mins. That generally does it for us. But that's on JeepJunk so maybe quality parts are different. But generally 2-3 times max and it's fixed. Last thing you want is the mud to dry on the contacts, after that it's rebuild time.