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AAC;IADpB,oBAAoB;QADxC,qCAAY,CAAC,6BAAe,CAAC;OACT,oBAAoB,CA8OxC;IAAD,2BAAC;KAAA;kBA9OoB,oBAAoB","file":"","sourceRoot":"/","sourcesContent":["import { ConfigManager } from \"simba-config-manager\";\nimport { DeepReadonly } from \"simba-utils\";\nimport { PlotManager, ReadonlyPlot, richNodesToCocosString, SentenceMediaContent, SentenceTextContent, SentenceType } from \"../../../avg/AVG\";\nimport { RoleType } from \"../../../avg/EditorEnums\";\nimport { Presenter } from \"../../../common/classbase/PresenterBase\";\nimport { GameTextData } from \"../../../common/gameplay/gamedata/GameTextData\";\nimport { UIManager } from \"../../../common/gameplay/managers/UIManager\";\nimport { relationLevelConfig } from \"../../../config/RelationLevelConfig\";\nimport { role } from \"../../../config/Role\";\nimport { DirectionType, GuideLocation, GuideOperationType, GuideState, PlotSceneType } from \"../../Enums\";\nimport GameDotMgr from \"../../GameDotMgr\";\nimport { GameModelManager } from \"../../model/GameModelManager\";\nimport { MessageSceneModel } from \"../../model/MessageSceneModel\";\nimport { RegPresenter } from \"../PresenterCCViewFactory\";\nimport { AlertDialogViewProps } from \"../view/type/AlertDialogView\";\nimport { MessageView, MessageViewProps, MessageViewType } from \"../view/type/MessageView\";\nimport AlertDialogViewPresenter from \"./AlertDialogViewPresenter\";\nimport { ChatListViewPresenter } from \"./ChatListViewPresenter\";\nimport GuideViewPresenter, { GuideViewParamModel } from \"./GuideViewPresenter\";\nimport { PhoneCallViewPresenter } from \"./PhoneCallViewPresenter\";\nimport PlotStopViewPresenter from \"./PlotStopViewPresenter\";\n\nfunction getSentenceText(content: DeepReadonly<SentenceTextContent> | DeepReadonly<SentenceMediaContent>) {\n let text = \"\"\n switch (content.type) {\n case SentenceType.TEXT:\n text = richNodesToCocosString(content.value);\n const CHAR_LIMIT: number = 15;\n // text = '<color=#000000>亲,你说不说?</color>,<color=#000000>111</color>';\n // text = '亲,你说不说?亲,你说不说?亲,你说不说?';\n const regex = /<color=#[0-9A-Za-z]{6,6}>/g;\n let str = text.replace(regex, '');\n let textStr = str.replace(/<\\/color>/g, '');\n text = textStr.length > CHAR_LIMIT ? textStr.slice(0, CHAR_LIMIT - 3) + \"...\" : textStr;\n break;\n case SentenceType.AUDIO:\n text = \"[Voice]\";\n break;\n case SentenceType.IMAGE:\n text = \"[Image]\";\n break;\n case SentenceType.VIDEO:\n text = \"[Video]\";\n break;\n }\n return text;\n}\n\nfunction getPlotString(plot?: ReadonlyPlot) {\n if (plot) {\n let text = \"\";\n let sentence = plot.sentences[0];\n if (sentence.content) {\n if (sentence.content.type === SentenceType.SELECT) {\n let select = PlotManager.getPlotSelection(plot.id);\n if (select !== undefined) {\n let option = sentence.content.value[select];\n if (option.content) {\n if (option.content.type === SentenceType.EMPTY) {\n console.error(\"TODO handle empty plots in message\");\n } else {\n text = getSentenceText(option.content);\n }\n } else {\n text = option.summary;\n }\n }\n } else {\n if (sentence.content.type === SentenceType.EMPTY) {\n console.error(\"TODO handle empty plots in message\");\n } else {\n text = getSentenceText(sentence.content);\n }\n }\n }\n return text;\n }\n return GameModelManager.getLanguageTxt(GameTextData.TEXT_NEW_CHAT_MSG_VALUE);\n}\n\n@RegPresenter(MessageViewType)\nexport default class MessageViewPresenter extends Presenter<undefined, MessageView> {\n static uuid = \"MessageViewPresenter\";\n private _scenesActive: { [key: number]: boolean } = {};\n private _currPlotHasMsg = false;\n\n private _isCheckingPhoneCall: boolean = false;\n private _viewProps: MessageViewProps;\n\n onOpen() {\n super.onOpen(undefined);\n this.initViewProps();\n this.checkScenesActive();\n this.setViewProps();\n this._disposable.add(GameModelManager.MessageSceneChanged.on(() => {\n if (!this._currPlotHasMsg && !this._view.isHidden && !this._isInBackground) {\n this.checkScenesActive();\n this.setViewProps();\n }\n }));\n this._disposable.add(PlotManager.PlotStartEvent.on(() => {\n if (this._currPlotHasMsg && !this._view.isHidden && !this._isInBackground) {\n this.checkScenesActive();\n this.setViewProps();\n }\n }));\n // this._disposable.add(GameModelManager.CheckMsgGuide.on(this.checkGuideItem));\n this._disposable.add(GameModelManager.ShowPlotBlocked.on(this.onShowPlotBlocked));\n this._disposable.add(GameModelManager.PlotBlockedChanged.on(this.onShowPlotBlocked));\n this._disposable.add(GameModelManager.ForceClickMsgItem.on(this.onForceClickItem));\n this._disposable.add(GameModelManager.RefreshAllStatus.on(this.onRefreshAllStatus));\n\n\n this._isCheckingPhoneCall = false;\n this.checkPhoneCall();\n }\n\n onForceClickItem = (id: number) => {\n console.log(\"MessageViewPresenter onForceClickItem id = \", id);\n if (!this._viewProps.items || 0 === this._viewProps.items.length) {\n return;\n }\n let c = id + \"\";\n let i = this._viewProps.items.findIndex((v) => v.key === c);\n if ((-1) !== i) {\n this.onItemClick(c);\n }\n }\n\n onShow() {\n super.onShow();\n this.checkScenesActive();\n this.setViewProps();\n this.checkPhoneCall();\n // this.checkGuideItem();\n }\n\n initViewProps() {\n this._viewProps = {\n items: [],\n onItemClick: this.onItemClick,\n PlotStopTipBtnCallback: this.PlotStopTipBtnCallback,\n isShowPlotStopTipBtn: false,\n }\n }\n\n async checkPhoneCall() {\n if (this._isCheckingPhoneCall) {\n return;\n }\n this._isCheckingPhoneCall = true\n if (PlotManager.getCurrentPlots()[0].plotSceneType === PlotSceneType.PhoneCall) {\n await UIManager.pushPresenter(PhoneCallViewPresenter, undefined);\n }\n this._isCheckingPhoneCall = false;\n }\n\n onEnterForeground() {\n super.onEnterForeground();\n this.checkScenesActive();\n this.setViewProps();\n this.checkPhoneCall();\n }\n\n private checkScenesActive = () => {\n this._currPlotHasMsg = false;\n this._scenesActive = GameModelManager.getMessageScenesModel().reduce((pv, v) => (pv[v.id] = this.checkSceneActive(v), pv), {});\n }\n\n private checkSceneActive = (model: MessageSceneModel) => {\n let ret = PlotManager.getCurrentPlots().findIndex(v => v.plotSceneType === PlotSceneType.Message && v.plotSceneTypeId === model.id) >= 0;\n if (ret) this._currPlotHasMsg = true;\n return ret;\n }\n\n private setViewProps() {\n let items = GameModelManager.getMessageScenesModel().map(\n v => {\n let roleConfig = ConfigManager.getConfig(role, v.config.roles[0]);\n let isMajor = roleConfig.RoleType === RoleType.Role_Major;\n let roleData = GameModelManager.getRoleData(v.config.roles[0]);\n let data = roleData!.getRoleLikeLevel();\n let nameSpr = GameModelManager.getRoleData(v.config.roles[0])!.getNameIcon();\n if (v.config.roles[0] === 3) {\n nameSpr = \"/textures/name_icon/laoda\";\n }\n return {\n key: v.id + \"\", icons: [GameModelManager.getRoleData(v.config.roles[0])!.getHeadIcon()],\n title: GameModelManager.getConfigLanguageTxt(v.config.title),\n lastMsg: getPlotString(v.lastPlot),\n redDot: this._scenesActive[v.id],\n isShowGrace: isMajor,\n level: isMajor ? data.level : undefined,\n roleId: v.config.roles[0],\n addGraceClickCallBack: this.addGraceClickCallBack,\n isShowAddGrace: isMajor && data.level !== data.maxLevel,\n nameSpr: nameSpr\n }\n }\n );\n //对列表进行排序,有红点的(新对话消息)排在最前面,也就是置顶\n items.sort((a, b) => {\n if (a.redDot) {\n return -1;\n }\n if (b.redDot) {\n return 1;\n }\n return 0;\n });\n this._viewProps = { // 暂每条只有一个头像,群聊显示单独头像,以后可能群聊显示多人头像\n items: items,\n onItemClick: this.onItemClick,\n isShowPlotStopTipBtn: GameModelManager.checkIsPlotBlocked(),\n PlotStopTipBtnCallback: this.PlotStopTipBtnCallback,\n }\n this.view.setProps(this._viewProps);\n }\n\n PlotStopTipBtnCallback = () => {\n UIManager.pushPresenter(PlotStopViewPresenter, undefined);\n }\n\n addGraceClickCallBack = (roleId: number) => {\n // GameDotMgr.getInstance().dotClickUI(\"click_grace\");\n let r = GameModelManager.getRoleData(roleId);\n if (!r || r!.getConfig().RoleType !== RoleType.Role_Major) {\n return;\n }\n let l = r.getRoleLikeLevel();\n let m: number = -1;\n let t = ConfigManager.getAllConfig(relationLevelConfig);\n for (let id in t) {\n let c = t[id];\n m = m < c.id ? c.id : m;\n //暂时修改最大等级为10\n m = 10;\n }\n if (m <= l.level) {\n UIManager.showToast(GameModelManager.getLanguageTxt(GameTextData.GAME_TEXT_GRACE_LEVEL_MAX_VALUE));\n return;\n }\n else {\n // UIManager.showToast(StringUtils.format(GameModelManager.getLanguageTxt(GameTextData.GAME_TEXT_GRACE_TIP_ROLE), r.getRoleName(), l.level));\n let temp: AlertDialogViewProps =\n {\n dataptr: { roleId: roleId },\n titlecontent: \"提升好感度\",\n content: `当前与${r.getRoleName()}好感度等级为${l.level},观看视频提升好感度等级!`,\n ishasad: true,\n istwobtn: true,\n adconfig: \"inject_fruit\",\n // items: [],\n hasBanner: false,\n callback: (type, ret: boolean, param: any) => {\n if (ret) {\n if (type === \"video\") {\n let rid = param.roleId;\n let role = GameModelManager.getRoleData(rid);\n if (role) {\n role.addRoleLike(1000);\n this.setViewProps();\n }\n } else {\n UIManager.showToast(\"只能通过观看视频提升好感度等级!\");\n }\n }\n }\n };\n UIManager.pushPresenter(AlertDialogViewPresenter, temp);\n }\n }\n\n private onItemClick = (key: string) => {\n // console.log(\"item click\", key);\n GameModelManager.setGuideMsgItemRecord(key, GuideState.Complete);\n let sceneModel = GameModelManager.getMessageSceneModel(parseInt(key));\n if (!sceneModel) { console.error(\"message scene model not found \", key); return; }\n let isNew = PlotManager.getCurrentPlots().findIndex(v => v.plotSceneType === PlotSceneType.Message && v.plotSceneTypeId === sceneModel!.id) !== (-1);\n if (isNew || sceneModel.firstPlot.sentences[0].roleId == 3) {\n GameDotMgr.getInstance().dotClickUI(\"click_chat_card\" + sceneModel.id);\n }\n UIManager.pushPresenter(ChatListViewPresenter, sceneModel);\n }\n\n checkGuideItem = () => {\n let k = GameModelManager.getMsgItemGuideKey();\n if (k && \"\" !== k) {\n let node = this._view.getItemNode(k);\n if (node) {\n let wp = node.convertToWorldSpaceAR(cc.v2(0, 0));\n let m: GuideViewParamModel = {\n x: wp.x,\n y: wp.y,\n w: node.width,\n h: node.height,\n d: DirectionType.DOWM,\n call: () => {\n this.onItemClick(k);\n }\n }\n UIManager.pushPresenter(GuideViewPresenter, m);\n GameDotMgr.getInstance().dotGuide(GuideOperationType.Show, GuideLocation.MsgItem);\n }\n }\n }\n\n onShowPlotBlocked = () => {\n this._viewProps.isShowPlotStopTipBtn = GameModelManager.checkIsPlotBlocked();\n this.view.updateProps(this._viewProps);\n }\n\n onRefreshAllStatus = () => {\n this.initViewProps();\n this.checkScenesActive();\n this.setViewProps();\n this._isCheckingPhoneCall = false;\n this.checkPhoneCall();\n }\n}\n"]}