steamutils 1.3.27 → 1.3.28
Sign up to get free protection for your applications and to get access to all the features.
- package/SteamClient.js +28 -3
- package/package.json +1 -1
package/SteamClient.js
CHANGED
@@ -345,7 +345,22 @@ function SteamClient({
|
|
345
345
|
}
|
346
346
|
|
347
347
|
async function gamePlay() {
|
348
|
-
|
348
|
+
let ownedApps = []
|
349
|
+
for (let i = 0; i < 5; i++) {
|
350
|
+
ownedApps = await getUserOwnedApps()
|
351
|
+
if (ownedApps?.length) {
|
352
|
+
break
|
353
|
+
}
|
354
|
+
}
|
355
|
+
if (!ownedApps?.length) {
|
356
|
+
gamesPlayed(730)
|
357
|
+
} else {
|
358
|
+
ownedApps = ownedApps.map(({appid}) => appid)
|
359
|
+
ownedApps = _.shuffle(ownedApps)
|
360
|
+
ownedApps.length = Math.min(ownedApps.length, MAX_GAME_PLAY - 1)
|
361
|
+
_.remove(ownedApps, app => app == 730)
|
362
|
+
gamesPlayed([...ownedApps, 730])
|
363
|
+
}
|
349
364
|
}
|
350
365
|
|
351
366
|
async function autoGamePlay() {
|
@@ -410,7 +425,10 @@ function SteamClient({
|
|
410
425
|
}
|
411
426
|
|
412
427
|
async function createLobby() {
|
413
|
-
|
428
|
+
if (!steamClient.steamID) {
|
429
|
+
return
|
430
|
+
}
|
431
|
+
|
414
432
|
steamClient._send(
|
415
433
|
{
|
416
434
|
msg: Protos.csgo.EMsg.k_EMsgClientMMSCreateLobby,
|
@@ -453,7 +471,10 @@ function SteamClient({
|
|
453
471
|
}
|
454
472
|
|
455
473
|
async function updateLobby(lobbyID) {
|
456
|
-
|
474
|
+
if (!steamClient.steamID) {
|
475
|
+
return
|
476
|
+
}
|
477
|
+
|
457
478
|
steamClient._send(
|
458
479
|
{
|
459
480
|
msg: Protos.csgo.EMsg.k_EMsgClientMMSSetLobbyData,
|
@@ -504,6 +525,10 @@ function SteamClient({
|
|
504
525
|
}
|
505
526
|
|
506
527
|
async function invite2Lobby(lobbyID, steamId) {
|
528
|
+
if (!steamClient.steamID) {
|
529
|
+
return
|
530
|
+
}
|
531
|
+
|
507
532
|
steamClient._send(
|
508
533
|
{
|
509
534
|
msg: Protos.csgo.EMsg.k_EMsgClientMMSInviteToLobby,
|