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AAC;aACjD;SACJ;IACL,CAAC;IAED,yBAAyB,CAAC,MAAc;QACpC,IAAI,gBAAgB,GAAG,6DAA6B,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAC;QACtF,aAAa;QACb,IAAI,qBAAqB,GAAG,6DAA6B,CAAC,6BAA6B,CAAC,MAAM,CAAC,CAAC;QAChG,IAAI,qBAAqB,CAAC,MAAM,KAAK,gBAAgB,CAAC,MAAM,EAAE;YAC1D,OAAO,IAAI,CAAC;SACf;QACD,aAAa;QACb,IAAI,oBAAoB,GAAG,6DAA6B,CAAC,4BAA4B,CAAC,MAAM,CAAC,CAAC;QAC9F,IAAI,oBAAoB,CAAC,MAAM,KAAK,gBAAgB,CAAC,MAAM,EAAE;YACzD,OAAO,IAAI,CAAC;SACf;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AA9DD,gDA8DC","file":"","sourceRoot":"/","sourcesContent":["import { UIManager } from \"../../common/gameplay/managers/UIManager\";\nimport { GameModelManager } from \"./GameModelManager\";\nimport { UnlockItemModelManager } from \"./UnlockItemModelManager\";\nimport { UnlockSpecialPlotModelManager } from \"./UnlockSpecialPlotModelManager\";\n\nexport default class UnlockSpecialPlotEventManager {\n /**单例对象 */\n private static _instance: UnlockSpecialPlotEventManager | undefined;\n\n /**创建单例 */\n public static getInstance(): UnlockSpecialPlotEventManager {\n if (!UnlockSpecialPlotEventManager._instance) {\n UnlockSpecialPlotEventManager._instance = new UnlockSpecialPlotEventManager();\n }\n return UnlockSpecialPlotEventManager._instance;\n }\n\n /**\n * 兑换码解锁番外\n * @param specialPlotId 要解锁的番外Id\n * @param itemId 要解锁的和物品相关的Id,可为空\n */\n cdKeyUnlockSpecialPlot(specialPlotId: number, itemId?: number) {\n UnlockSpecialPlotModelManager.saveUnlockedSpecialPlotIdByItemIdToGameRecord(specialPlotId);\n if (itemId) {\n UnlockItemModelManager.saveItemIdToGameRecord(itemId);\n UnlockItemModelManager.saveUnlockedIntroductionItemIdToGameRecord(itemId);\n }\n UIManager.showToast(\"兑换成功,请前往卧室查看呦~~\");\n }\n\n /**\n * 次日登陆解锁番外\n * @param specialPlotId 要解锁的番外Id\n */\n nextDayUnlockedSpecialPlot(specialPlotId: number) {\n //检测手表番外2次日是否需要解锁,手表番外2的番外剧情Id是4\n let needUnlock: boolean = false;\n if (!UnlockSpecialPlotModelManager.checkSpecialPlotIdIsUnlocked(specialPlotId)) {\n needUnlock = true;\n }\n //获取第一次登陆的时间\n UnlockSpecialPlotModelManager.saveFirstDayTime();\n let firstDayTime = UnlockSpecialPlotModelManager.getFirstDayTime();\n if (needUnlock && firstDayTime) {\n let canUnlock: boolean = GameModelManager.checkOverdue(firstDayTime);\n if (canUnlock) {\n UnlockSpecialPlotModelManager.saveUnlockedSpecialPlotIdByItemIdToGameRecord(specialPlotId);\n UIManager.showSceneToast(\"解锁了新的番外,记得去卧室查看哦~\");\n }\n }\n }\n\n isShowBedRoomRedDotStatus(itemId: number): boolean {\n let allSpecialPlotId = UnlockSpecialPlotModelManager.allSpecialPlotIdByItemId(itemId);\n //判断是否有未解锁的番外\n let unlockedSpecialPlotId = UnlockSpecialPlotModelManager.unlockedSpecialPlotIdByItemId(itemId);\n if (unlockedSpecialPlotId.length !== allSpecialPlotId.length) {\n return true;\n }\n //判断是否有未观看的番外\n let clickedSpecialPlotId = UnlockSpecialPlotModelManager.clickedSpecialPlotIdByItemId(itemId);\n if (clickedSpecialPlotId.length !== allSpecialPlotId.length) {\n return true;\n }\n return false;\n }\n}\n"]}