任务:任务去除funcs的判断,直接达成

This commit is contained in:
luying
2021-09-10 16:53:35 +08:00
parent 28f9c65873
commit faf4d25f60
76 changed files with 471 additions and 610 deletions

View File

@@ -85,7 +85,7 @@ export async function getPlayerActivityData(activityId: number, serverId: number
*
*/
export async function addSelfServiceShopGiftReward(roleId: string, roleName: string, sid: string, serverId: number, funcs: number[], activityId: number, roundIndex: number, index: number, item: SelfServiceShopItem) {
export async function addSelfServiceShopGiftReward(roleId: string, roleName: string, sid: string, serverId: number, activityId: number, roundIndex: number, index: number, item: SelfServiceShopItem) {
let playerGoods: ActivitySelfServiceGoodsModelType[] = await ActivitySelfServiceGoodsModel.findDataByIndex(activityId, roleId, roundIndex, index);
let rewardArray: Array<RewardParam> = [];
@@ -100,7 +100,7 @@ export async function addSelfServiceShopGiftReward(roleId: string, roleName: str
for (let obj of rewardArray) {
goodsStr += `${obj.type}&${obj.id}&${obj.count}|`;
}
let result = await addReward(roleId, roleName, sid, serverId, funcs, rewardArray);
let result = await addReward(roleId, roleName, sid, serverId, rewardArray);
//购买记录
console.log('dddddddd', rewardArray.length, serverId, activityId, roleId, roundIndex, index, goodsStr, JSON.stringify(item))
await ActivitySelfServiceShopModel.addBuyRecord(serverId, activityId, roleId, roundIndex, index, goodsStr);
@@ -117,7 +117,7 @@ export async function addSelfServiceShopGiftReward(roleId: string, roleName: str
* @param {string} productID 商品ID
*
*/
export async function makeSelfServerShop(roleId: string, roleName: string, sid: string, serverId: number, funcs: number[],
export async function makeSelfServerShop(roleId: string, roleName: string, sid: string, serverId: number,
activityId: number, productID: string) {
let activityData: ActivityModelType = await ActivityModel.findActivity(activityId);
@@ -142,7 +142,7 @@ export async function makeSelfServerShop(roleId: string, roleName: string, sid:
}
}
}
let result = await addSelfServiceShopGiftReward(roleId, roleName, sid, serverId, funcs, activityId, playerData.roundIndex, item.index, item);
let result = await addSelfServiceShopGiftReward(roleId, roleName, sid, serverId, activityId, playerData.roundIndex, item.index, item);
item.buyCount += 1;
return {
code: 0,