Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

Commit

Permalink
fix: search minimum BIN
Browse files Browse the repository at this point in the history
- Clear transfer cache before querying market.
- Use new DTO.

fixes #204
  • Loading branch information
furkick authored and Mardaneus86 committed Nov 20, 2019
1 parent 5079b54 commit a5be0d1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fut/transferMarket.js
@@ -1,5 +1,5 @@
/* globals
enums transferobjects factories communication gUserModel models repositories services
enums factories communication gUserModel models repositories services
*/
import { mean } from 'math-statistics';

Expand All @@ -24,6 +24,8 @@ export class TransferMarket {
/* eslint-enable class-methods-use-this */

async searchMinBuy(item, itemsForMean = 3, lowUp = false) {
services.Item.clearTransferMarketCache();

this._logger.log(`Searching min buy for ${item.type} ${item._staticData.name} from low upward first ${lowUp}`, 'Core - Transfermarket');
let minBuy = 0;

Expand Down Expand Up @@ -198,7 +200,8 @@ export class TransferMarket {
/* eslint-disable class-methods-use-this */
_defineSearchCriteria(item, maxBuy = -1) {
// TODO: check if this can handle other items as well
const searchCriteria = new transferobjects.SearchCriteria();
// eslint-disable-next-line no-undef
const searchCriteria = new UTSearchCriteriaDTO();

searchCriteria.count = 30;
searchCriteria.maskedDefId = item.getMaskedResourceId();
Expand Down

0 comments on commit a5be0d1

Please sign in to comment.