listPlayers

This commit is contained in:
2026-01-20 11:43:33 +08:00
parent 28169843ef
commit a69014977b
3 changed files with 15 additions and 0 deletions
+6
View File
@@ -73,6 +73,12 @@ class BcmTool {
const data = g_game.mgr.mgr_team_player_team_info.GetPlayerData(playerId); const data = g_game.mgr.mgr_team_player_team_info.GetPlayerData(playerId);
return data.GetSingleAttribute(attri); 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(); g_game.bcm_tool = new BcmTool();
+7
View File
@@ -79,6 +79,13 @@ class BcmTool {
return data.GetSingleAttribute(attri); 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);
}
}
} }
(()=>{ (()=>{
+2
View File
@@ -7,7 +7,9 @@ declare global
} }
interface MgrTeamPlayerInfo { interface MgrTeamPlayerInfo {
public _map_player_detail:{ [key:string]:CPlayerData }
public GetPlayerData(player_id:string):CPlayerData; public GetPlayerData(player_id:string):CPlayerData;
public UpdateFromMessage(msg:BMProto.S2CGetPlayerDetailResp):void;
} }
interface CPlayerData { interface CPlayerData {