抽卡:修复转盘

This commit is contained in:
luying
2021-05-13 20:31:34 +08:00
parent aab35d167b
commit 803ad06ed8

View File

@@ -210,7 +210,7 @@ export class GachaHandler {
// 获得或者转成碎片
let heroInfo: { hid: number, count: number }[] = [];
for (let i = 0; i < count; i++) {
heroInfo.push({ hid: hero[0], count: 1 })
heroInfo.push({ hid: hero, count: 1 })
}
let { heroes, goods } = await createHeroes(roleId, roleName, sid, serverId, funcs, heroInfo);
let resultList: GachaResult[] = [];
@@ -221,7 +221,7 @@ export class GachaHandler {
}
for (let g of goods) {
let result = new GachaResult(contentId);
result.setHero(hero[0]);
result.setHero(hero);
result.transferToPiece(g.id, g.count);
resultList.push(result);
}