item manager: fix active price threshold calculation

This was meant to keep items within 5x of their Jagex price, but the
logic was only correct if activePriceThreshold <= 1.0.
This commit is contained in:
Adam
2022-02-27 12:32:41 -05:00
parent ffc5380f28
commit 5d7edacd21
2 changed files with 99 additions and 2 deletions

View File

@@ -328,8 +328,7 @@ public class ItemManager
{
return wikiPrice;
}
int d = jagPrice - (int) (jagPrice * activePriceThreshold);
return wikiPrice >= jagPrice - d && wikiPrice <= jagPrice + d ? wikiPrice : jagPrice;
return wikiPrice < jagPrice * activePriceThreshold ? wikiPrice : jagPrice;
}
/**