Often times when ducks have some sort of existing leg problem, that discourages them from practicing normal duck activities, they often develop other problems related to inactivity such as bumblefoot sores on their leg or foot, wet feather, long nails, septic arthritis, among others.
Your bird is getting fairly old, so the risk of those conditions are going to increase. It would be helpful to see pictures of the swelled part of her leg, but at this point, you really want to focus on letting her bathe in water to relieve the weight off her legs, and if wanted, add Epsom salts to the water every few days to help reduce the swelling. If she only has one leg, supervision would be advised.
When she is out of the water, never keep her on any hard surface, she needs to be on something soft. I see you're located in Pakistan, so you probably won't be able to get her on a diet for poultry. It may be good to add more foods into her diet, especially greens to help her overall health. It is possible there is an infection in the joint. In which case it would be best to either take her to a vet, or start her on an antibiotic.
Basing on the picture, it looks like she may benefit from a nail trimming.