File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -26,18 +26,16 @@ class historicalPricesAPI extends WorkerKVSplit {
2626 let prices = cache . historicalPricePoint [ itemId ] ;
2727 if ( ! prices ) {
2828 return [ ] ;
29- }
30- else if ( days === this . maxDays ) {
29+ }
30+ /* if (days === this.maxDays) {
3131 return prices;
32+ }*/
33+ const cutoffTimestamp = new Date ( ) . setDate ( new Date ( ) . getDate ( ) - days ) ;
34+ let dayFiltered = prices . filter ( hp => hp . timestamp >= cutoffTimestamp ) ;
35+ if ( halfResults ) {
36+ dayFiltered = dayFiltered . filter ( ( hp , index ) => index % 2 === 0 ) ;
3237 }
33- else {
34- const cutoffTimestamp = new Date ( ) . setDate ( new Date ( ) . getDate ( ) - days ) ;
35- let dayFiltered = prices . filter ( hp => hp . timestamp >= cutoffTimestamp ) ;
36- if ( halfResults ) {
37- dayFiltered = dayFiltered . filter ( ( hp , index ) => index % 2 === 0 ) ;
38- }
39- return dayFiltered ;
40- }
38+ return dayFiltered ;
4139 }
4240}
4341
Original file line number Diff line number Diff line change @@ -1042,6 +1042,8 @@ type Task {
10421042 minPlayerLevel: Int
10431043 taskRequirements: [TaskStatusRequirement]!
10441044 traderRequirements: [RequirementTrader]!
1045+ availableDelaySecondsMin: Int
1046+ availableDelaySecondsMax: Int
10451047 objectives: [TaskObjective]!
10461048 startRewards: TaskRewards
10471049 finishRewards: TaskRewards
You can’t perform that action at this time.
0 commit comments