Buyable quantity wrong when buying one currency with another
KyrosKrane opened this issue ยท 2 comments
In commit 4b59613, the code for buying currencies was optimized from:
if (totalMax == 0) then
self.fit = 10000000;
else
self.fit = totalMax - select(2, GetCurrencyInfo(self.itemLink));
end
However, this makes the self.fit
get set to the amount you have owned, rather than the amount you can actually buy. The section after or
should be totalmax - select(2, GetCurrencyInfo(self.itemLink))
Thank you for this. looks like i simply forgot to include totalMax in the code.
I'll fix this and release a new version later this evening.