steamutils 1.2.88 → 1.2.89

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 +8 -7
  2. package/package.json +1 -1
package/SteamClient.js CHANGED
@@ -946,8 +946,8 @@ function SteamClient({
946
946
  if (player) {
947
947
  player.prime = !!(player.ranking?.account_id || player.player_level || player.player_cur_xp)
948
948
  player.steamId = SteamID.fromIndividualAccountID(player.account_id).getSteamID64()
949
+ callGCCallback('PlayersProfile_' + player.account_id, player)
949
950
  }
950
- callGCCallback('PlayersProfile' + player?.account_id, player)
951
951
  callEvent(events.playersProfile, player)
952
952
  break
953
953
  }
@@ -1258,18 +1258,19 @@ function SteamClient({
1258
1258
  /*
1259
1259
  * usually take 400 -> 800 miliseconds
1260
1260
  * */
1261
- function getPlayersProfile(accountid) {
1261
+ function getPlayersProfile(steamId) {
1262
+ const accountid = new SteamID(steamId).accountid
1262
1263
  steamClient.sendToGC(730, Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_ClientRequestPlayersProfile, {}, protoEncode(Protos.csgo.CMsgGCCStrike15_v2_ClientRequestPlayersProfile, {
1263
1264
  account_id: accountid, // account_id: new SteamID('76561199184696945').accountid,
1264
1265
  request_level: 32
1265
1266
  }))
1266
1267
  return new Promise(resolve => {
1267
- pushGCCallback('PlayersProfile' + accountid, resolve, 2000)
1268
+ pushGCCallback('PlayersProfile_' + accountid, resolve, 2000)
1268
1269
  })
1269
1270
  }
1270
1271
 
1271
- async function checkPlayerPrimeStatus(accountid) {
1272
- const profile = await getPlayersProfile(accountid)
1272
+ async function checkPlayerPrimeStatus(steamId) {
1273
+ const profile = await getPlayersProfile(steamId)
1273
1274
  if (!profile) return false
1274
1275
 
1275
1276
  if (profile.ranking?.account_id) {
@@ -1680,9 +1681,9 @@ function SteamClient({
1680
1681
  return steamClient
1681
1682
  },
1682
1683
  getAccountInfoName,
1683
- async getPlayersProfile(accountid, retry = 3){
1684
+ async getPlayersProfile(steamId, retry = 3){
1684
1685
  for (let i = 0; i < retry; i++) {
1685
- const profile = await getPlayersProfile(accountid)
1686
+ const profile = await getPlayersProfile(steamId)
1686
1687
  if(profile){
1687
1688
  return profile
1688
1689
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.2.88",
3
+ "version": "1.2.89",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.5.1",