Merge branch 'bugfix' into dev

This commit is contained in:
dy 2023-12-22 14:08:19 +08:00
commit 4e435c4ed9
2 changed files with 14 additions and 0 deletions

View File

@ -57,6 +57,8 @@ export default async function (call: ApiCall<ReqChangePos, ResChangePos>) {
}
fightHeros.push(hero.heroId.toString());
fightHeros = await checkFightHerosAndFix(call.uid, heroPos, fightHeros)
Wjjl.setVal(call.uid, 'fight_hero_colour_4', fightHeros.map(id => G.gc.hero[id].colour).filter(c => c >= 4).length);
let checkMatrixPos = HeroFun.checkMatrixPosAndChange(call, heroPos, matrixPos)
@ -66,3 +68,11 @@ export default async function (call: ApiCall<ReqChangePos, ResChangePos>) {
call.conn.refreshPower();
kfjsFun.setHeroLvCount(call)
}
async function checkFightHerosAndFix(uid, heroPos, fightHeros) {
if (fightHeros.length == R.values(heroPos).length) {
return fightHeros
}
let heros = await HeroFun.getHeros({uid}, R.values(heroPos));
return heros.map(i => i.heroId)
}

View File

@ -181,6 +181,10 @@ export class PayFun {
return;
}
}
/**
*
* emit事件
*/
let conf: any = await this.getConf(payId, payArgs);