Power adapters are covered under the same warranty as the MacBook. If it has been two years then you would have needed to purchase AppleCare, otherwise it's out of warranty and will not be replaced.
Buying an aftermarket power adapter is risky because there are many counterfeit ones on the market. They may break prematurely and could even damage your MacBook. Take care of your power adapter and it will last for many years.
For example - find the fake iPad charger:
That was easy - this one is less so:
Apple has several lawsuits pending against their manufacturers.
Troubleshooting MagSafe adapters
Using and maintaining your Apple MagSafe Adapter
Reducing cable strain on your MagSafe power adapter