Honestly, most peeps aren't going to care about why you're there in the first place. Your body language, attire, and other things might suggest to others how receptive you'd be to advances, but the reason for you being at the bar is irrelevant to everyone. THe people that will make advances will do so, without care for why you're there. The people who chat about the weather with you, will do so without care for why you're there, and the people who will ignore you, will do so without care for why you're there.
Also, honestly, what's so bad about being hit on at a bar? Sure, not everyone you meet is going to be interesting, worth talking to, or a decent human being, but you never know. Some of 'em might very well be worthwhile.
For me, it depends on body language and facial expression. That's not to say that looks don't matter, but if you're smoking hot and look like a stone cold [censored], I'll leave you alone. But body language and facial expression is what I'd try to decipher first before doing anything.
Also, this. As an extension, your clothes can also have an impact. Dressing in less flattering clothing, that lacks eye catching patterns or colors, will decrease the chances that you catch the attention of wandering eyes.