If you accept an invitation to someone's event which is generally a gift giving occasion, do not proceed to complain and whine to the host/guest of honor about having to go to the event and having to buy a gift. If you don't want to buy a gift, do not buy a gift. (And if attending the event is really that much of an issue, decline the invitation next time.)