Merge branch 'second' of http://git.kingsome.cn/node/card_svr into second

This commit is contained in:
yuexin 2021-01-22 16:23:14 +08:00
commit 26535ddb69

View File

@ -74,18 +74,12 @@ export class SelectHeroCommand extends Command<CardGameState, { client: Client,
}
}
for (let unitId of units) {
let weight = 0;
let effectId;
for (let [,eff] of effectMap) {
if (eff.stageunit_id == unitId) {
weight = eff.weight;
effectId = eff.id;
break;
}
}
if (!effectId) {
const eff = effectMap.get(unitId)
if (!eff) {
error(`未找到效果卡的配置: ${unitId}`);
}
let weight = eff.weight;
let effectId = eff.id;
player.unitCfgs.set(effectId+'', weight);
}
this.room.battleMan.updatePlayer(player.id, player);