弹出礼包:添加同类型拦截参数
This commit is contained in:
@@ -108,26 +108,26 @@ export class PopUpShopHandler {
|
||||
});
|
||||
}
|
||||
|
||||
async debugPushPopUpShop(msg: { conditionType: number, magicWord: string, param: number }, session: BackendSession) {
|
||||
async debugPushPopUpShop(msg: { conditionType: number, magicWord: string, param: number, needDelete: boolean }, session: BackendSession) {
|
||||
const roleId = session.get('roleId');
|
||||
let serverId = session.get('serverId');
|
||||
const { magicWord, conditionType, param } = msg;
|
||||
if (magicWord !== DEBUG_MAGIC_WORD) {
|
||||
return resResult(STATUS.TOKEN_ERR);
|
||||
}
|
||||
let activities = await getActivitiesByType(serverId, ACTIVITY_TYPE.POP_UP_SHOP);
|
||||
for(let { activityId } of activities) {
|
||||
let playerData = await getPopUpShopData(activityId, serverId, roleId);
|
||||
for(let pkg of playerData.packages) {
|
||||
if(pkg.conditionType == conditionType) {
|
||||
await ActivityPopUpShopModel.deleteMany({ roleId, activityId, id: pkg.id });
|
||||
}
|
||||
}
|
||||
}
|
||||
// let activities = await getActivitiesByType(serverId, ACTIVITY_TYPE.POP_UP_SHOP);
|
||||
// for(let { activityId } of activities) {
|
||||
// let playerData = await getPopUpShopData(activityId, serverId, roleId);
|
||||
// for(let pkg of playerData.packages) {
|
||||
// if(pkg.conditionType == conditionType) {
|
||||
// await ActivityPopUpShopModel.deleteMany({ roleId, activityId, id: pkg.id });
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
let arr = await checkPopUpCondition(serverId, roleId, conditionType, {
|
||||
oldLv: 0,
|
||||
oldLv: param? param - 1: 0,
|
||||
newLv: param||100,
|
||||
quality: param||3,
|
||||
warId: param||128,
|
||||
|
||||
Reference in New Issue
Block a user