抽卡:添加抽卡接口
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user