query owner
This commit is contained in:
Vendored
+13
-4
@@ -132,11 +132,14 @@ class BcmTool {
|
||||
if (maxIterate < 0) {
|
||||
break;
|
||||
}
|
||||
const info = this.mgrMarket._map_player_infos[id];
|
||||
const info = this.mgrMarket.GetSellPlayer(id);
|
||||
if (!this.CheckInfo(info.playerId)) {
|
||||
yield this.RefreshPlayerInTransaction(info.teamId, info.playerId);
|
||||
yield this.Wait(100);
|
||||
maxIterate -= 1;
|
||||
if (!this.CheckInfo(info.playerId)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (conditions.every((e, i) => e(info.playerId, requireAttributes[i], requireValues[i]))) {
|
||||
results.push(info);
|
||||
@@ -150,10 +153,12 @@ class BcmTool {
|
||||
const value = this.QueryInfo(result.playerId, requireAttributes[idx]);
|
||||
return `${search}:${value}`;
|
||||
});
|
||||
console.log(`${result.playerName}(${result.playerAge})`, ...displayStr);
|
||||
console.log(`${result.playerName}(${this.QueryPlayerOwner(result.playerId)})`, ...displayStr);
|
||||
}
|
||||
});
|
||||
}
|
||||
QuickOpenPlayer(name) {
|
||||
}
|
||||
RefreshPlayerInTransaction(teamId, playerId) {
|
||||
return new Promise(resolve => {
|
||||
this.mgrTeamInfo.OpenPlayerDetailInTransaction(teamId, playerId, e => {
|
||||
@@ -170,11 +175,15 @@ class BcmTool {
|
||||
}
|
||||
QueryName(playerId) {
|
||||
const data = this.mgrTeamInfo.GetPlayerData(playerId);
|
||||
return data.playerName;
|
||||
return data === null || data === void 0 ? void 0 : data.playerName;
|
||||
}
|
||||
QueryInfo(playerId, attri) {
|
||||
const data = this.mgrTeamInfo.GetPlayerData(playerId);
|
||||
return data.GetSingleAttribute(attri);
|
||||
return data === null || data === void 0 ? void 0 : data.GetSingleAttribute(attri);
|
||||
}
|
||||
QueryPlayerOwner(playerId) {
|
||||
const data = this.mgrTeamInfo.GetPlayerData(playerId);
|
||||
return data === null || data === void 0 ? void 0 : data.teamName;
|
||||
}
|
||||
GetPlayerIds() {
|
||||
return Object.keys(this.mgrTeamInfo._map_player_detail);
|
||||
|
||||
Reference in New Issue
Block a user