steamutils 1.3.0 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/SteamClient.js +7 -4
  2. package/package.json +1 -1
package/SteamClient.js CHANGED
@@ -353,9 +353,9 @@ function SteamClient({
353
353
  } else {
354
354
  ownedApps = ownedApps.map(({appid}) => appid)
355
355
  ownedApps = _.shuffle(ownedApps)
356
- ownedApps.length = Math.min(ownedApps.length, MAX_GAME_PLAY)
357
- ownedApps = _.sortBy(ownedApps, app => app == 730 ? 1 : -1)
358
- gamesPlayed(ownedApps)
356
+ ownedApps.length = Math.min(ownedApps.length, MAX_GAME_PLAY - 1)
357
+ _.remove(ownedApps, app => app == 730)
358
+ gamesPlayed([...ownedApps, 730])
359
359
  }
360
360
  }
361
361
 
@@ -1434,6 +1434,7 @@ function SteamClient({
1434
1434
  }
1435
1435
 
1436
1436
  function _partyRegister(prime) {
1437
+ log("partyRegister", prime)
1437
1438
  lastTimePartyRegister = new Date().getTime()
1438
1439
  steamClient.sendToGC(730, Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_Party_Register, {}, protoEncode(Protos.csgo.CMsgGCCStrike15_v2_Party_Register, {
1439
1440
  // id : 0,
@@ -1468,9 +1469,11 @@ function SteamClient({
1468
1469
  }
1469
1470
 
1470
1471
  async function autoRequestFreeLicense(shouldLog = false, max = 10) {
1472
+ return
1471
1473
  // const mCookies = await getCookiesWait()
1472
1474
  // if (!mCookies) return
1473
- const freeAppList = Array.isArray(steamClient.licenses) ? FreeAppList.filter(appId => steamClient.licenses.every(({package_id}) => package_id !== appId)) : FreeAppList;
1475
+ // let freeAppList = Array.isArray(steamClient.licenses) ? FreeAppList.filter(appId => steamClient.licenses.every(({package_id}) => package_id !== appId)) : FreeAppList;
1476
+ const freeAppList = freeAppList.filter(appId => ownedApps.some(app => app.appid == appId))
1474
1477
  const recommendedApps = _.shuffle(freeAppList)
1475
1478
  if (max) {
1476
1479
  recommendedApps.length = Math.min(recommendedApps.length, max)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.3.00",
3
+ "version": "1.3.02",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.5.1",