inject
This commit is contained in:
Vendored
+75
-70
@@ -1,74 +1,79 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
function queryPlayerInfo(playersToQuery) {
|
class BcmTool {
|
||||||
const attributes = [
|
queryPlayerInfo(playersToQuery) {
|
||||||
['速度', 1],
|
const attributes = [
|
||||||
['力量', 2],
|
['速度', 1],
|
||||||
['内攻', 3],
|
['力量', 2],
|
||||||
['中投', 4],
|
['内攻', 3],
|
||||||
['三分', 5],
|
['中投', 4],
|
||||||
['三分急停跳投倾向', 6],
|
['三分', 5],
|
||||||
['内线防守能力', 7],
|
['三分急停跳投倾向', 6],
|
||||||
['外线防守能力', 8],
|
['内线防守能力', 7],
|
||||||
['突破能力', 9],
|
['外线防守能力', 8],
|
||||||
['上篮能力', 10],
|
['突破能力', 9],
|
||||||
['控球能力', 11],
|
['上篮能力', 10],
|
||||||
['传球能力', 12],
|
['控球能力', 11],
|
||||||
['传球视野', 13],
|
['传球能力', 12],
|
||||||
['干扰投篮', 14],
|
['传球视野', 13],
|
||||||
['篮板能力', 15],
|
['干扰投篮', 14],
|
||||||
['*出手时间', 16],
|
['篮板能力', 15],
|
||||||
['*进攻IQ', 17],
|
['*出手时间', 16],
|
||||||
['*防守IQ', 18],
|
['*进攻IQ', 17],
|
||||||
['体能', 19],
|
['*防守IQ', 18],
|
||||||
['卡位能力', 20],
|
['体能', 19],
|
||||||
['罚球能力', 21],
|
['卡位能力', 20],
|
||||||
['抢断能力', 22],
|
['罚球能力', 21],
|
||||||
['盖帽能力', 23],
|
['抢断能力', 22],
|
||||||
['*进攻犯规', 24],
|
['盖帽能力', 23],
|
||||||
['*防守犯规', 25],
|
['*进攻犯规', 24],
|
||||||
['扣篮能力', 26],
|
['*防守犯规', 25],
|
||||||
['勾手倾向', 27],
|
['扣篮能力', 26],
|
||||||
['*后仰倾向', 28],
|
['勾手倾向', 27],
|
||||||
['打板倾向', 29],
|
['*后仰倾向', 28],
|
||||||
['*反应时间', 30],
|
['打板倾向', 29],
|
||||||
['拉开空间', 31],
|
['*反应时间', 30],
|
||||||
['补防、协防', 32],
|
['拉开空间', 31],
|
||||||
['*造进攻犯规', 33],
|
['补防、协防', 32],
|
||||||
['快下', 34],
|
['*造进攻犯规', 33],
|
||||||
['无球跑动', 35],
|
['快下', 34],
|
||||||
['挡拆', 36],
|
['无球跑动', 35],
|
||||||
['*造防守犯规', 37],
|
['挡拆', 36],
|
||||||
['无球掩护', 38],
|
['*造防守犯规', 37],
|
||||||
['进攻篮板', 39],
|
['无球掩护', 38],
|
||||||
['*假动作', 40],
|
['进攻篮板', 39],
|
||||||
['攻转守', 41],
|
['*假动作', 40],
|
||||||
['进攻技能', 44],
|
['攻转守', 41],
|
||||||
['防守技能', 48],
|
['进攻技能', 44],
|
||||||
['身体素质', 50],
|
['防守技能', 48],
|
||||||
];
|
['身体素质', 50],
|
||||||
for (const playerId of playersToQuery) {
|
];
|
||||||
if (!checkInfo(playerId)) {
|
for (const playerId of playersToQuery) {
|
||||||
console.log('找不到id', playerId);
|
if (!this.checkInfo(playerId)) {
|
||||||
continue;
|
console.log('找不到id', playerId);
|
||||||
}
|
continue;
|
||||||
console.log(queryName(playerId));
|
}
|
||||||
for (const info of attributes) {
|
console.log(this.queryName(playerId));
|
||||||
const name = info[0];
|
for (const info of attributes) {
|
||||||
const id = info[1];
|
const name = info[0];
|
||||||
const record = queryInfo(playerId, id);
|
const id = info[1];
|
||||||
console.log(name, record);
|
const record = this.queryInfo(playerId, id);
|
||||||
|
console.log(name, record);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
checkInfo(playerId) {
|
||||||
|
const data = g_game.mgr.mgr_team_player_team_info.GetPlayerData(playerId);
|
||||||
|
return data != null;
|
||||||
|
}
|
||||||
|
queryName(playerId) {
|
||||||
|
const data = g_game.mgr.mgr_team_player_team_info.GetPlayerData(playerId);
|
||||||
|
return data.playerName;
|
||||||
|
}
|
||||||
|
queryInfo(playerId, attri) {
|
||||||
|
const data = g_game.mgr.mgr_team_player_team_info.GetPlayerData(playerId);
|
||||||
|
return data.GetSingleAttribute(attri);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function checkInfo(playerId) {
|
(() => {
|
||||||
const data = g_game.mgr.mgr_team_player_team_info.GetPlayerData(playerId);
|
g_game.bcm_tool = new BcmTool();
|
||||||
return data != null;
|
})();
|
||||||
}
|
|
||||||
function queryName(playerId) {
|
|
||||||
const data = g_game.mgr.mgr_team_player_team_info.GetPlayerData(playerId);
|
|
||||||
return data.playerName;
|
|
||||||
}
|
|
||||||
function queryInfo(playerId, attri) {
|
|
||||||
const data = g_game.mgr.mgr_team_player_team_info.GetPlayerData(playerId);
|
|
||||||
return data.GetSingleAttribute(attri);
|
|
||||||
}
|
|
||||||
|
|||||||
+80
-72
@@ -1,78 +1,86 @@
|
|||||||
|
|
||||||
function queryPlayerInfo(playersToQuery:string[]) {
|
class BcmTool {
|
||||||
const attributes = [
|
|
||||||
['速度', 1],
|
|
||||||
['力量', 2],
|
|
||||||
['内攻', 3],
|
|
||||||
['中投', 4],
|
|
||||||
['三分', 5],
|
|
||||||
['三分急停跳投倾向', 6],
|
|
||||||
['内线防守能力', 7],
|
|
||||||
['外线防守能力', 8],
|
|
||||||
['突破能力', 9],
|
|
||||||
['上篮能力', 10],
|
|
||||||
['控球能力', 11],
|
|
||||||
['传球能力', 12],
|
|
||||||
['传球视野', 13],
|
|
||||||
['干扰投篮', 14],
|
|
||||||
['篮板能力', 15],
|
|
||||||
['*出手时间', 16],
|
|
||||||
['*进攻IQ', 17],
|
|
||||||
['*防守IQ', 18],
|
|
||||||
['体能', 19],
|
|
||||||
['卡位能力', 20],
|
|
||||||
['罚球能力', 21],
|
|
||||||
['抢断能力', 22],
|
|
||||||
['盖帽能力', 23],
|
|
||||||
['*进攻犯规', 24],
|
|
||||||
['*防守犯规', 25],
|
|
||||||
['扣篮能力', 26],
|
|
||||||
['勾手倾向', 27],
|
|
||||||
['*后仰倾向', 28],
|
|
||||||
['打板倾向', 29],
|
|
||||||
['*反应时间', 30],
|
|
||||||
['拉开空间', 31],
|
|
||||||
['补防、协防', 32],
|
|
||||||
['*造进攻犯规', 33],
|
|
||||||
['快下', 34],
|
|
||||||
['无球跑动', 35],
|
|
||||||
['挡拆', 36],
|
|
||||||
['*造防守犯规', 37],
|
|
||||||
['无球掩护', 38],
|
|
||||||
['进攻篮板', 39],
|
|
||||||
['*假动作', 40],
|
|
||||||
['攻转守', 41],
|
|
||||||
['进攻技能', 44],
|
|
||||||
['防守技能', 48],
|
|
||||||
['身体素质', 50],
|
|
||||||
];
|
|
||||||
|
|
||||||
for (const playerId of playersToQuery) {
|
public queryPlayerInfo(playersToQuery:string[]) {
|
||||||
if (!checkInfo(playerId)) {
|
const attributes = [
|
||||||
console.log('找不到id', playerId);
|
['速度', 1],
|
||||||
continue;
|
['力量', 2],
|
||||||
}
|
['内攻', 3],
|
||||||
console.log(queryName(playerId));
|
['中投', 4],
|
||||||
for (const info of attributes) {
|
['三分', 5],
|
||||||
const name = info[0];
|
['三分急停跳投倾向', 6],
|
||||||
const id = info[1];
|
['内线防守能力', 7],
|
||||||
const record = queryInfo(playerId, id as number);
|
['外线防守能力', 8],
|
||||||
console.log(name, record);
|
['突破能力', 9],
|
||||||
|
['上篮能力', 10],
|
||||||
|
['控球能力', 11],
|
||||||
|
['传球能力', 12],
|
||||||
|
['传球视野', 13],
|
||||||
|
['干扰投篮', 14],
|
||||||
|
['篮板能力', 15],
|
||||||
|
['*出手时间', 16],
|
||||||
|
['*进攻IQ', 17],
|
||||||
|
['*防守IQ', 18],
|
||||||
|
['体能', 19],
|
||||||
|
['卡位能力', 20],
|
||||||
|
['罚球能力', 21],
|
||||||
|
['抢断能力', 22],
|
||||||
|
['盖帽能力', 23],
|
||||||
|
['*进攻犯规', 24],
|
||||||
|
['*防守犯规', 25],
|
||||||
|
['扣篮能力', 26],
|
||||||
|
['勾手倾向', 27],
|
||||||
|
['*后仰倾向', 28],
|
||||||
|
['打板倾向', 29],
|
||||||
|
['*反应时间', 30],
|
||||||
|
['拉开空间', 31],
|
||||||
|
['补防、协防', 32],
|
||||||
|
['*造进攻犯规', 33],
|
||||||
|
['快下', 34],
|
||||||
|
['无球跑动', 35],
|
||||||
|
['挡拆', 36],
|
||||||
|
['*造防守犯规', 37],
|
||||||
|
['无球掩护', 38],
|
||||||
|
['进攻篮板', 39],
|
||||||
|
['*假动作', 40],
|
||||||
|
['攻转守', 41],
|
||||||
|
['进攻技能', 44],
|
||||||
|
['防守技能', 48],
|
||||||
|
['身体素质', 50],
|
||||||
|
];
|
||||||
|
|
||||||
|
for (const playerId of playersToQuery) {
|
||||||
|
if (!this.checkInfo(playerId)) {
|
||||||
|
console.log('找不到id', playerId);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
console.log(this.queryName(playerId));
|
||||||
|
for (const info of attributes) {
|
||||||
|
const name = info[0];
|
||||||
|
const id = info[1];
|
||||||
|
const record = this.queryInfo(playerId, id as number);
|
||||||
|
console.log(name, record);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public checkInfo(playerId:string) {
|
||||||
|
const data = g_game.mgr.mgr_team_player_team_info.GetPlayerData(playerId);
|
||||||
|
return data != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public queryName(playerId:string) {
|
||||||
|
const data = g_game.mgr.mgr_team_player_team_info.GetPlayerData(playerId);
|
||||||
|
return data.playerName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public queryInfo(playerId:string, attri:number) {
|
||||||
|
const data = g_game.mgr.mgr_team_player_team_info.GetPlayerData(playerId);
|
||||||
|
return data.GetSingleAttribute(attri);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkInfo(playerId:string) {
|
(()=>{
|
||||||
const data = g_game.mgr.mgr_team_player_team_info.GetPlayerData(playerId);
|
g_game.bcm_tool = new BcmTool();
|
||||||
return data != null;
|
})();
|
||||||
}
|
|
||||||
|
|
||||||
function queryName(playerId:string) {
|
|
||||||
const data = g_game.mgr.mgr_team_player_team_info.GetPlayerData(playerId);
|
|
||||||
return data.playerName;
|
|
||||||
}
|
|
||||||
|
|
||||||
function queryInfo(playerId:string, attri:number) {
|
|
||||||
const data = g_game.mgr.mgr_team_player_team_info.GetPlayerData(playerId);
|
|
||||||
return data.GetSingleAttribute(attri);
|
|
||||||
}
|
|
||||||
Vendored
+2
-1
@@ -12,11 +12,12 @@ declare global
|
|||||||
|
|
||||||
interface CPlayerData {
|
interface CPlayerData {
|
||||||
public playerName: string;
|
public playerName: string;
|
||||||
|
|
||||||
public GetSingleAttribute(PlayerAttribute:number,is_floor?:boolean):number;
|
public GetSingleAttribute(PlayerAttribute:number,is_floor?:boolean):number;
|
||||||
}
|
}
|
||||||
|
|
||||||
var g_game: {
|
var g_game: {
|
||||||
mgr: BGameMgr;
|
mgr: BGameMgr;
|
||||||
|
bcm_tool: BcmTool;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user