You can't fix it with flashing.It is not software problem.Water make oxide and shorting in the phone after some time,so the only solution is to take it to some private unlock/repair shop to clean it well but it is very hard to clean it if it was damaged a long time ago.You should do that at the moment when it was damaged by water.