抽卡:转盘
This commit is contained in:
@@ -320,15 +320,18 @@ export async function createHeroes(roleId: string, roleName: string, sid: string
|
||||
|
||||
let newHeroInfo: CreateHeroParam[] = [], pieces: ItemInter[] = [];
|
||||
for(let h of heroInfo) {
|
||||
console.log('*****', JSON.stringify([...userHeroesMap]), h.hid)
|
||||
if(userHeroesMap.has(h.hid)) {
|
||||
let {pieceId, count} = transPiece(h.hid);
|
||||
pieces.push({ id: pieceId, count });
|
||||
userHeroesMap.delete(h.hid);
|
||||
} else {
|
||||
newHeroInfo.push(h)
|
||||
userHeroesMap.set(h.hid, null);
|
||||
}
|
||||
}
|
||||
|
||||
let resultHeroes: HeroType[], resultItems: ItemInter[];
|
||||
let resultHeroes: HeroType[] = [], resultItems: ItemInter[] = [];
|
||||
if(newHeroInfo.length > 0) {
|
||||
|
||||
let { heroes, role, figureInfo, calHeroResults, calAllHeroResults, taskPushMessage } = await pubCreateHeroes(roleId, roleName, serverId, newHeroInfo);
|
||||
|
||||
Reference in New Issue
Block a user