steamutils 1.4.32 → 1.4.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/gbrowser_project.xml +11 -0
- package/package.json +1 -1
- package/utils.js +18 -0
package/package.json
CHANGED
package/utils.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EAuthTokenPlatformType, LoginApprover, LoginSession } from "steam-session";
|
|
2
|
+
import moment from "moment";
|
|
2
3
|
|
|
3
4
|
const isBrowser = typeof window !== "undefined";
|
|
4
5
|
|
|
@@ -247,3 +248,20 @@ export function getBonusXpTimeRefresh() {
|
|
|
247
248
|
}
|
|
248
249
|
return resetDay;
|
|
249
250
|
}
|
|
251
|
+
|
|
252
|
+
export function estimateNextXp(currentXp, xpEarned) {
|
|
253
|
+
//estimate next xp
|
|
254
|
+
let bonusTime = 1;
|
|
255
|
+
if (xpEarned < 4500) {
|
|
256
|
+
bonusTime = 4;
|
|
257
|
+
} else if (xpEarned < 7500) {
|
|
258
|
+
bonusTime = 2;
|
|
259
|
+
} else if (xpEarned < 11200) {
|
|
260
|
+
bonusTime = 1;
|
|
261
|
+
} else {
|
|
262
|
+
bonusTime = 0.175;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const nextXp = 30 * 13 * bonusTime;
|
|
266
|
+
return nextXp + currentXp;
|
|
267
|
+
}
|