pvp防守武将数据调整

This commit is contained in:
mamengke01
2021-01-06 16:20:03 +08:00
parent a785a4733a
commit 44ebf774b9
4 changed files with 20 additions and 9 deletions

View File

@@ -3,18 +3,20 @@
*/
import { PvpDefenseModel, Heroes, OppPlayers } from '../db/pvpDefense';
import { RoleType } from '../db/Role';
import { PVP_PLAYER_POS, PVP_HERO_POS } from '../consts';
export async function initPvpInfo(role: RoleType) {
let heroes: Array<Heroes> = [];
//初始化最强5人阵容
for (let i = 1; i <= role.topFive.length; i++) {
let item = role.topFive[i - 1];
for (let i = 0; i < role.topFive.length; i++) {
let item = role.topFive[i];
if (item.hid) {
heroes.push({
actorId: item.hid,
hero: item.hero,
ce: item.ce,
pos: i,
order: i,
dataId: PVP_HERO_POS.START + i,
order: i + 1,
});
}
}