What function do you have your code in, in Player.cpp? As far as I see, removing both returns will solve the forcing value to boolean. If your function was VendorItemData and not bool you could return VendorItemData. Probably have to think of some other way to return what you want.
It did solve the forcing value to boolean.
However, server crashes.
I don't quite understand what you mean by "What function do you have your code in".
What part of the code is a function, or what are you reffering to?