抽卡:添加抽卡接口

This commit is contained in:
luying
2021-04-23 15:46:04 +08:00
parent 1f6839cafb
commit beadccf778
23 changed files with 591 additions and 85 deletions

View File

@@ -47,18 +47,18 @@ export class WishPoolHandler {
let goodInfo = getGoodById(goodId)
if (!goodInfo)
return resResult(STATUS.WRONG_PARMS);
if (!(goodInfo.goodType == IT_TYPE.HERO_PIECE && type == 2 ) && !(goodInfo.goodType == IT_TYPE.EQUIP_PIECE && type == 1 ))
if (!(goodInfo.itid == IT_TYPE.HERO_PIECE && type == 2 ) && !(goodInfo.itid == IT_TYPE.EQUIP_PIECE && type == 1 ))
return resResult(STATUS.WRONG_PARMS);
let userGuild = await getUserGuildWithRefActive(roleId, ' wishDntCnt wishGoods guildCode wishGoods');
if (!userGuild)
return resResult(STATUS.WRONG_PARMS);
let result = await checkGoods(roleId, [goodId]);
if (!result) {
if (goodInfo.goodType == IT_TYPE.HERO_PIECE ) {
if (goodInfo.itid == IT_TYPE.HERO_PIECE ) {
result = await checkGoods(roleId, [goodInfo.hid]);
if (!result)
return resResult(STATUS.GUILD_WISH_POOL_NOT_OWN_HERO);
} else if (goodInfo.goodType == IT_TYPE.EQUIP_PIECE ) {
} else if (goodInfo.itid == IT_TYPE.EQUIP_PIECE ) {
result = await checkGoods(roleId, [goodInfo.equipId]);
if (!result)
return resResult(STATUS.GUILD_WISH_POOL_NOT_OWN_EQUIP);