From a69014977b792f4e6e3892f553ef057e54be3178 Mon Sep 17 00:00:00 2001 From: lingdar77 Date: Tue, 20 Jan 2026 11:43:33 +0800 Subject: [PATCH] listPlayers --- dist/bcm_tool.js | 6 ++++++ src/bcm_tool.ts | 7 +++++++ src/global.d.ts | 2 ++ 3 files changed, 15 insertions(+) diff --git a/dist/bcm_tool.js b/dist/bcm_tool.js index 5db00e4..1e85f96 100644 --- a/dist/bcm_tool.js +++ b/dist/bcm_tool.js @@ -73,6 +73,12 @@ class BcmTool { const data = g_game.mgr.mgr_team_player_team_info.GetPlayerData(playerId); return data.GetSingleAttribute(attri); } + listPlayers() { + const ids = Object.keys(g_game.mgr.mgr_team_player_team_info._map_player_detail); + for (const id of ids) { + console.log(this.queryName(id), id); + } + } } (() => { g_game.bcm_tool = new BcmTool(); diff --git a/src/bcm_tool.ts b/src/bcm_tool.ts index cf6ddd6..2884ab3 100644 --- a/src/bcm_tool.ts +++ b/src/bcm_tool.ts @@ -79,6 +79,13 @@ class BcmTool { return data.GetSingleAttribute(attri); } + public listPlayers() { + const ids = Object.keys(g_game.mgr.mgr_team_player_team_info._map_player_detail); + for (const id of ids) { + console.log(this.queryName(id), id); + } + } + } (()=>{ diff --git a/src/global.d.ts b/src/global.d.ts index 4070be6..526d341 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -7,7 +7,9 @@ declare global } interface MgrTeamPlayerInfo { + public _map_player_detail:{ [key:string]:CPlayerData } public GetPlayerData(player_id:string):CPlayerData; + public UpdateFromMessage(msg:BMProto.S2CGetPlayerDetailResp):void; } interface CPlayerData {