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B;QAC5B,CAAC;QAiDD,YAAY,CAAC,KAAa;YACtB,IAAI,CAAC,GAAG,gBAAU,CAAC,eAAe,CAAC,gBAAgB,GAAG,KAAK,CAAW,CAAC;YACvE,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,kBAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3C,IAAI,CAAC,KAAK,kBAAU,CAAC,IAAI,EAAE;gBACvB,mCAAgB,CAAC,qBAAqB,CAAC,KAAK,EAAE,kBAAU,CAAC,QAAQ,CAAC,CAAC;aACtE;QACL,CAAC;QA6BD,SAAS,CAAC,QAAgB;YACtB,IAAI,IAAI,CAAC,WAAW,IAAI,QAAQ,EAAE;gBAC9B,IAAI,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC;gBACjC,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC;gBAC5B,IAAI,CAAC,UAAU,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;gBAE/C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;aACxC;QACL,CAAC;QA6FD,cAAc,CAAC,MAAc;YACzB,IAAI,GAAG,GAA6C,SAAS,CAAC;YAC9D,IAAI,MAAM,EAAE;gBACR,GAAG,GAAG,oCAAa,CAAC,SAAS,CAAC,iBAAO,EAAE,MAAM,CAAC,CAAC;aAClD;YACD,OAAO,GAAG,CAAC;QACf,CAAC;KAiEJ,CAAA;IA5dU,sBAAI,GAAG,mBAAmB,CAAC;IAUpB,0BAAQ,GAAW,CAAC,CAAC,CAAC;IAXnB,iBAAiB;QADrC,qCAAY,CAAC,uBAAY,CAAC;OACN,iBAAiB,CA6drC;IAAD,wBAAC;KAAA;kBA7doB,iBAAiB","file":"","sourceRoot":"/","sourcesContent":["import { ConfigManager } from \"simba-config-manager\";\nimport { GameRecord, PlotManager, ReadonlyPlots, SpecialPlotId } from \"../../../avg/AVG\";\nimport { createPresenter, Presenter } from \"../../../common/classbase/PresenterBase\";\nimport { View } from \"../../../common/classbase/ViewBase\";\nimport { GameTextData } from \"../../../common/gameplay/gamedata/GameTextData\";\nimport { UIManager } from \"../../../common/gameplay/managers/UIManager\";\nimport { dateSceneConfig } from \"../../../config/DateSceneConfig\";\nimport { AutoPopViewType, GuideLocation, GuideOperationType, GuideState, MainTabs, PlotSceneType } from \"../../Enums\";\nimport GameDotMgr from \"../../GameDotMgr\";\nimport { DatingEventStatus } from \"../../model/DatingEventSceneModel\";\nimport { GameModelManager } from \"../../model/GameModelManager\";\nimport { RegPresenter } from \"../PresenterCCViewFactory\";\nimport VerbView from \"../VerbView\";\nimport { showToBeContinue } from \"../view/impl/AlertToBeContinueImpl\";\nimport { MainView, MainViewProps, MainViewType } from \"../view/type/MainView\";\nimport DatingEventViewPresenter from \"./DatingEventViewPresenter\";\nimport { DatingScenePresenter } from \"./DatingScenePresenter\";\nimport DebugViewPresenter from \"./DebugViewPresenter\";\nimport DiscoverViewPresenter from \"./DiscoverViewPresenter\";\nimport GuideViewPresenter from \"./GuideViewPresenter\";\nimport MessageViewPresenter from \"./MessageViewPresenter\";\nimport NoticeViewPresenter from \"./NoticeViewPresenter\";\nimport PlotStopViewPresenter from \"./PlotStopViewPresenter\";\nimport { AudioManager } from \"simba-cc-audio-manager\";\nimport { DeepReadonlyObject } from \"simba-utils\";\nimport { ResUtils } from \"simba-cc-resutils\";\nimport { GameConstData } from \"../../../common/gameplay/gamedata/GameConstData\";\nimport { UnlockItemModelManager } from \"../../model/UnlockItemModelManager\";\nimport { IItemTbl, itemTbl } from \"../../../config/ItemTbl\";\nimport { channel, GameConfig } from \"../../../GameConfig\";\nimport { HttpClient } from \"simba-httpclient\";\nimport { DateType, PageIndex } from \"../../../avg/EditorEnums\";\nimport NewNoticeViewPresenter from \"./notice/NewNoticeViewPresenter\";\nimport { SourceView } from \"../view/type/notice/NewNoticeView\";\nimport ExtraPlotViewPresenter from \"./ExtraPlotViewPresenter\";\nimport { SDK } from \"simba-sdk\";\n\nconst TabPresenterFactory: ({ new(): Presenter } & { uuid: string })[] = [\n MessageViewPresenter,\n DatingEventViewPresenter,\n DiscoverViewPresenter\n];\n/**主线剧情的下标 */\nconst MAIN_PLOT_INDEX: number = 0;\n@RegPresenter(MainViewType)\nexport default class MainViewPresenter extends Presenter<undefined, MainView> {\n static uuid = \"MainViewPresenter\";\n private _subPresenters: Presenter<any, View>[] = [];\n private _currentTab = 0;\n private _viewProps: MainViewProps;\n private _loadingTab = false;\n private readonly _tabToggleDelayTime = 618;\n private _tabClickAble: boolean = false;\n\n private _itemId: number = -1;\n private _hasItem: boolean = false;\n public static tabIndex: number = -1;\n\n constructor() {\n super();\n this._viewProps = {\n selectedTab: 0,\n messageRedDot: false,\n datingEventRedDot: false,\n discoverRedDot: false,\n onTabClick: this.onTabClick,\n onDebugClick: this.onDebugClickCallback,\n };\n }\n\n onDebugClickCallback = () => {\n UIManager.pushPresenter(DebugViewPresenter, undefined);\n }\n\n onGoToShopClickCallback = () => {\n GameDotMgr.getInstance().dotClickUI(\"shop_btn_MainView\");\n if (channel == \"wechat\") {\n // GameCenter.getInstance().openSubProgram(GameConfig.youZanShopAppId);\n let link = GameModelManager.getYouZanShopUrlByType(8);\n if (link) {\n SDK.openProgramV2(GameConfig.youZanShopAppId, link);\n }\n } else if (channel == \"android\") {\n let link = GameModelManager.getTaoBaoShopUrlByType(8);\n if (link) {\n GameModelManager.jumpToTaobaoShop(link);\n }\n } else {\n UIManager.showToast(\"该功能在当前平台不可使用\");\n }\n }\n\n onCommonProblemClickCallback = async () => {\n try {\n let resStr = await new HttpClient(GameConfig.commonProblemConfigUrl).get() as string;\n let res = JSON.parse(resStr);\n if (res) {\n UIManager.pushPresenter(NoticeViewPresenter, {\n title: res.title,\n content: res.content\n });\n }\n } catch (error) {\n console.error(error);\n }\n }\n\n checkRedDot = (plots: ReadonlyPlots) => {\n this._viewProps.messageRedDot = plots[MAIN_PLOT_INDEX].plotSceneType === PlotSceneType.Message || plots[MAIN_PLOT_INDEX].plotSceneType === PlotSceneType.PhoneCall;\n this._viewProps.datingEventRedDot = false;\n this._viewProps.datingEventRedDot = plots && (plots[0].plotSceneType === PlotSceneType.DatingEvent && (plots[0].id !== SpecialPlotId.ToBeContinued && plots[0].id !== SpecialPlotId.End));\n this.view.setProps(this._viewProps);\n if (plots[MAIN_PLOT_INDEX] && plots[MAIN_PLOT_INDEX].plotSceneType === PlotSceneType.BlockPlot) {\n GameModelManager.dealBlockedPlot();\n } else {\n let change = GameModelManager.isChangePlotSceneType();\n if (change) {\n let p = plots[MAIN_PLOT_INDEX];\n let isSpecial = p.id === SpecialPlotId.End || p.id === SpecialPlotId.ToBeContinued;\n if (!isSpecial) {\n this.onMainPlotChanged(p.plotSceneType, p.plotSceneTypeId);\n GameModelManager.setIsChangePlotSceneType(false);\n }\n }\n }\n }\n\n onRefreshDiscoveryRedDot = () => {\n this._viewProps.discoverRedDot = !GameModelManager.checkResumeFullEnergyMarked();\n this.view.setProps(this._viewProps);\n }\n\n async start() { // 开始游戏\n this._subPresenters[0] = await createPresenter(TabPresenterFactory[0]);\n MainViewPresenter.tabIndex = 0;\n let viewContainer = this._view.getTabContentContainer();\n this._subPresenters[0].open(viewContainer, undefined);\n this.dealTabGuide(MainTabs.messageTab);\n this._viewProps.selectedTab = MainTabs.messageTab;\n\n this._disposable.add(GameModelManager.RefreshDiscoverTabRed.on(this.onRefreshDiscoveryRedDot));\n this._disposable.add(GameModelManager.ShowPlotBlocked.on(this.onShowPlotBlocked));\n this._disposable.add(GameModelManager.MainTabForceClick.on(this.onMainTabForceClick));\n // this._disposable.add(GameModelManager.CheckMainTabGuide.on(this.checkTabGuide));\n this._disposable.add(GameModelManager.AutoPopView.on(this.onAutoPopView));\n this._disposable.add(GameModelManager.UnlockItem.on(this.onUnlockItem));\n\n this._disposable.add(GameModelManager.BedroomViewBack.on(this.onBedroomViewBack));\n this._disposable.add(GameModelManager.RefreshAllStatus.on(this.onRefreshAllStatus));\n this._disposable.add(GameModelManager.JumpToViewInGame.on(this.onJumpToViewInGame));\n\n\n this.checkRedDot(PlotManager.getCurrentPlots());\n PlotManager.PlotStartEvent.on(this.checkRedDot);\n let needEnterSpecialDatingScene = this.checkIsNeedToEnterSpecialDatingScene();\n // check tab guide\n // this.checkTabGuide();\n if (needEnterSpecialDatingScene) {\n GameConfig.isVerb = true;\n this.enterSpecialEventScene();\n this._currentTab = MainTabs.datingEventTab;\n this._viewProps.selectedTab = MainTabs.datingEventTab;\n }\n this._tabClickAble = true;\n //进入主界面更新红点状态\n setTimeout(() => {\n //关闭等待界面\n this.view.showWaitingView(false);\n //开始弹起自动窗口\n if (PlotManager.getCurrentPlots()[MAIN_PLOT_INDEX].id === SpecialPlotId.ToBeContinued) {\n GameModelManager.registerAutoPopView(AutoPopViewType.ToBeContinued);\n }\n let autoShowNotice = GameModelManager.getAutoShowNotice();\n if (autoShowNotice) {\n GameModelManager.registerAutoPopView(AutoPopViewType.Notice);\n }\n let unlockItems = UnlockItemModelManager.unlockItems;\n if (unlockItems.indexOf(4) == -1) {\n GameModelManager.registerAutoPopView(AutoPopViewType.NoteBook);\n }\n if (!needEnterSpecialDatingScene) {\n GameModelManager.checkAutoPopView();\n }\n }, 2000);\n }\n\n /**\n * 检查新手教程是否完成,当前新手教程完成的判定是完成第一章\n * @returns \n */\n checkNoviceTutorialOver(): boolean {\n let models = GameModelManager.getMainDatingEventScenesModel();\n for (let i = 0; i < models.length; i++) {\n if (models[i].status == 4) {\n return true;\n }\n }\n return false;\n }\n\n async enterSpecialEventScene() {\n let arr = GameModelManager.getMainDatingEventScenesModel();\n UIManager.pushPresenter(DatingScenePresenter, arr[0], true);\n }\n\n checkIsNeedToEnterSpecialDatingScene() {\n let arr = GameModelManager.getMainDatingEventScenesModel();\n let need = arr && arr.length === 1 && arr[0].status !== DatingEventStatus.Completed;\n return need;\n }\n\n onMainTabForceClick = (param: { index: number, pureClick: boolean, propId?: number }) => {\n UIManager.popToPresenter(this);\n let index = param.index;\n this.onTabClick(index);\n }\n\n onClose() {\n super.onClose();\n UIManager.popToPresenter(this);\n }\n\n onOpen() {\n super.onOpen(undefined);\n // this.perloadPrefab();\n // this.discoverInit();\n }\n\n discoverInit() {\n GameRecord.onGlobalVariableChange(\"red_pot_\" + DiscoverViewPresenter.uuid, () => {\n this._viewProps.discoverRedDot = GameModelManager.checkRedPot(DiscoverViewPresenter.uuid);\n this.view.setProps(this._viewProps);\n });\n this._viewProps.discoverRedDot = GameModelManager.checkRedPot(DiscoverViewPresenter.uuid);\n this.view.setProps(this._viewProps);\n }\n\n perloadPrefab() {\n let PFList = [\"prefab/ui/DatingEventView\"];\n cc.resources.preload(PFList);\n }\n\n onEnterBackground() {\n super.onEnterBackground();\n if (this._subPresenters[this._currentTab])\n this._subPresenters[this._currentTab].onEnterBackground();\n }\n\n /**presenter进入前景 */\n async onEnterForeground() {\n super.onEnterForeground();\n if (this._subPresenters[this._currentTab]) {\n this._subPresenters[this._currentTab].onEnterForeground();\n this._subPresenters[this._currentTab].onEnterForeground();\n }\n if (PlotManager.getCurrentPlots()[MAIN_PLOT_INDEX].id === SpecialPlotId.ToBeContinued) {\n GameModelManager.registerAutoPopView(AutoPopViewType.ToBeContinued);\n }\n if (!GameConfig.isVerb) {\n GameModelManager.checkAutoPopView();\n }\n }\n\n onShow() {\n super.onShow();\n // this.checkTabGuide();\n }\n\n onTabClick = async (index: number, callback?: Function, isDot?: Boolean) => {\n if (!this._tabClickAble) {\n return;\n }\n this.dealTabGuide(index);\n let uuid = TabPresenterFactory[index].uuid;\n if (!GameModelManager.checkFuncUnloced(uuid)) {\n UIManager.showToast(GameModelManager.getLanguageTxt(GameTextData.GAME_TEXT_MAIN_FUNCTION_NOT_OPEN));\n return;\n }\n if (this._loadingTab) return;\n if (this._currentTab !== index) {\n if (this._subPresenters[this._currentTab])\n this._subPresenters[this._currentTab].view.hide();\n this._currentTab = index;\n this._viewProps.selectedTab = index;\n this._view.setProps(this._viewProps);\n if (index !== 2) {\n MainViewPresenter.tabIndex = index;\n }\n if (!this._subPresenters[this._currentTab]) {\n this._loadingTab = true;\n await createPresenter(TabPresenterFactory[this._currentTab]).then((presenter) => {\n this._subPresenters[this._currentTab] = presenter;\n presenter.open(this.view.getTabContentContainer(), undefined);\n setTimeout(() => {//延时等待618毫秒,View 中UI刷新\n this._loadingTab = false;\n }, this._tabToggleDelayTime);\n if (callback) {\n callback();\n }\n });\n } else {\n if (this._subPresenters[this._currentTab]) {\n this._subPresenters[this._currentTab].view.show();\n }\n if (callback) {\n callback();\n }\n }\n } else {\n if (callback) {\n callback();\n }\n }\n }\n\n dealTabGuide(index: number) {\n let r = GameRecord.globalVariables[\"guide_main_tab\" + index] as number;\n r = r === undefined ? GuideState.close : r;\n if (r === GuideState.Open) {\n GameModelManager.setGuideMainTabRecord(index, GuideState.Complete);\n }\n }\n\n checkTabGuide = () => {\n let check: boolean = false;\n if (!check) {\n return;\n }\n let index = GameModelManager.getMainTabGuideIndex();\n if (index !== -1) {\n //attention\n let redDotArr = [this._viewProps.messageRedDot, this._viewProps.datingEventRedDot, this._viewProps.discoverRedDot];\n if (!redDotArr[index] || this._currentTab === index) {\n return;\n }\n UIManager.popToPresenter(this);\n let m = this.view.getGuideTabParam(index);\n if (m) {\n let location: GuideLocation = index === MainTabs.datingEventTab ? GuideLocation.TabDate : GuideLocation.TabMsg;\n m.call = () => {\n this.onTabClick(index);\n this.view.hideClickAniByIndex(index);\n GameDotMgr.getInstance().dotGuide(GuideOperationType.Click, location);\n }\n UIManager.pushPresenter(GuideViewPresenter, m);\n GameDotMgr.getInstance().dotGuide(GuideOperationType.Show, location);\n }\n }\n }\n\n switchTab(tabIndex: number) {\n if (this._currentTab != tabIndex) {\n let prevIndex = this._currentTab;\n this._currentTab = tabIndex;\n this._viewProps.selectedTab = this._currentTab;\n\n this._view.setProps(this._viewProps);\n }\n }\n\n onAutoPopView = async (viewType: AutoPopViewType) => {\n switch (viewType) {\n case AutoPopViewType.ToBeContinued:\n {\n await showToBeContinue();\n }\n break;\n case AutoPopViewType.Notice:\n {\n UIManager.pushPresenter(NewNoticeViewPresenter, SourceView.MessageView);\n }\n break;\n case AutoPopViewType.PlotStop:\n {\n UIManager.pushPresenter(PlotStopViewPresenter, undefined);\n }\n break;\n }\n\n }\n\n onShowPlotBlocked = () => {\n let plotId: number = GameModelManager.getCurPlotBlockedId();\n // GameDotMgr.getInstance().dotExposure(StringUtils.format(ExposureType.Plotblock, plotId));\n GameModelManager.registerAutoPopView(AutoPopViewType.PlotStop);\n\n }\n\n onMainPlotChanged = async (pType: PlotSceneType, pId: number) => {\n if (!GameModelManager.isMainPlotSceneType() || ConfigManager.getConfig(dateSceneConfig, pId).DateType == DateType.Date_Sp) {\n return;\n }\n UIManager.popToPresenter(this);\n let comp = cc.director.getScene().getChildByName(\"Canvas\").getChildByName(\"VerbRoot\").getChildByName(\"VerbView\").getComponent(VerbView);\n if (this._hasItem && -1 !== this._itemId) {\n //加载图和组织物品掉落数据\n let showItemCfg: DeepReadonlyObject<IItemTbl> | undefined = undefined;\n let itemSpriteFrame: cc.SpriteFrame | undefined = undefined;\n showItemCfg = this.getShowItemCfg(this._itemId);\n if (showItemCfg) {\n let path: string = GameConstData.GAME_CONST_ITEM_BIG_SPR_DIR + showItemCfg.icon;\n itemSpriteFrame = await ResUtils.loadRes(path, cc.SpriteFrame);\n comp.setItemDropData(itemSpriteFrame, showItemCfg);\n this._itemId = -1;\n this._hasItem = false;\n }\n }\n switch (pType) {\n case PlotSceneType.Message:\n {\n this.onTabClick(MainTabs.messageTab, () => {\n this._subPresenters[this._currentTab].onShow();\n comp.toChat({ title: \"\", desc: \"来电了!!\" });\n setTimeout(() => {\n GameModelManager.ForceClickDataReady.emit();\n GameModelManager.ForceClickMsgItem.emit(pId);\n }, 500);\n });\n }\n break;\n case PlotSceneType.DatingEvent:\n {\n let cfgs = ConfigManager.getAllConfig(dateSceneConfig);\n let ids: string[] = [];\n for (const id in cfgs) {\n if (cfgs[id].DateType == DateType.Date_Normal) {\n ids.push(id);\n }\n }\n let plotIds: number[] = [];\n let models = GameModelManager.getMainDatingEventScenesModel();\n for (let i = 0; i < models.length; i++) {\n plotIds.push(models[i].id);\n }\n let index = plotIds.indexOf(pId);\n let title = \"第\" + (plotIds.length) + \"章:\";\n let cfg = ConfigManager.getConfig(dateSceneConfig, pId);\n let desc = cfg && cfg.name ? GameModelManager.getConfigLanguageTxt(cfg.name) : \"\";\n comp.toDating(() => {\n AudioManager.playEffect('verb');\n this.onTabClick(MainTabs.datingEventTab, () => {\n GameModelManager.ForceClickDataReady.emit();\n GameModelManager.ForceClickDatingItem.emit(pId);\n })\n this.view.hideClickAniByIndex(MainTabs.datingEventTab);\n }, { title: title, desc: desc })\n }\n break;\n }\n }\n\n getShowItemCfg(itemId: number): DeepReadonlyObject<IItemTbl> | undefined {\n let cfg: DeepReadonlyObject<IItemTbl> | undefined = undefined;\n if (itemId) {\n cfg = ConfigManager.getConfig(itemTbl, itemId);\n }\n return cfg;\n }\n\n onUnlockItem = (itemId: number) => {\n let unlockItems = UnlockItemModelManager.unlockItems;\n let isNew = unlockItems.indexOf(itemId) == -1;\n if (isNew) {\n this._itemId = itemId;\n this._hasItem = true;\n //写存档+组织数据并派发\n UnlockItemModelManager.saveItemIdToGameRecord(itemId);\n }\n }\n\n /**\n * 卧室返回点击UI事件\n * @param index 返回具体tabIndex\n */\n onBedroomViewBack = (index: number) => {\n this._view.onTabButtonClick(null, `${index}`);\n }\n\n onRefreshAllStatus = async () => {\n this.checkRedDot(PlotManager.getCurrentPlots());\n\n GameConfig.showToBeContinue = false;\n let needEnterSpecialDatingScene = this.checkIsNeedToEnterSpecialDatingScene();\n // check tab guide\n // this.checkTabGuide();\n if (needEnterSpecialDatingScene) {\n GameConfig.isVerb = true;\n this.enterSpecialEventScene();\n this._currentTab = MainTabs.datingEventTab;\n this._viewProps.selectedTab = MainTabs.datingEventTab;\n } else {\n GameModelManager.checkAutoPopView();\n }\n this._tabClickAble = true\n }\n\n /**\n * 卧室返回点击UI事件\n * @param index 返回具体tabIndex\n */\n onJumpToViewInGame = (index: PageIndex) => {\n let tab = MainTabs.messageTab;\n switch (index) {\n case PageIndex.MessageView:\n tab = MainTabs.messageTab\n this._view.onTabButtonClick(null, `${tab}`);\n break;\n case PageIndex.DateEventView:\n tab = MainTabs.datingEventTab\n this._view.onTabButtonClick(null, `${tab}`);\n break;\n case PageIndex.ExtraPlotView:\n tab = MainTabs.datingEventTab\n this._view.onTabButtonClick(null, `${tab}`);\n UIManager.pushPresenter(ExtraPlotViewPresenter, undefined);\n break;\n default:\n console.error(\"The pageIndex is invalid.\");\n UIManager.showToast(\"无效的页面跳转\");\n break;\n }\n }\n}"]}