审核服:跳过序章
This commit is contained in:
@@ -48,12 +48,12 @@ export default class RScriptRecord extends BaseModel {
|
||||
return await RScriptRecordModel.deleteMany({ roleId, battleId: { $in: battleId } });
|
||||
}
|
||||
|
||||
public static async insertScripts(roleId: string, dicWars: DicWar[]) {
|
||||
public static async insertScripts(roleId: string, dicWars: DicWar[], skipScriptAfter = []) {
|
||||
let insertParams = dicWars.map(dicWar => {
|
||||
let doc = new RScriptRecordModel();
|
||||
let param = { ...doc.toJSON(), roleId, battleId: dicWar.war_id, warType: dicWar.warType }
|
||||
if(dicWar.scriptBefore) param.scriptBefore = dicWar.scriptBefore;
|
||||
if(dicWar.scriptAfter) param.scriptAfter = dicWar.scriptAfter;
|
||||
if(dicWar.scriptAfter && skipScriptAfter.indexOf(dicWar.war_id) == -1) param.scriptAfter = dicWar.scriptAfter;
|
||||
return param;
|
||||
});
|
||||
// console.log('&&&&', insertParams
|
||||
|
||||
Reference in New Issue
Block a user