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CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QACpD,CAAC;QAGM,KAAK,CAAC,QAAQ,CAAC,OAA2B,EAAE,QAAuB;YACtE,IAAI,QAAQ,GAAG,OAAO,CAAC;YACvB,IAAI,CAAC,GAAG,QAAQ,CAAC;YACjB,IAAI,IAAI,GAAG,EAAE,CAAC;YACd,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAClB,mCAAmC;YACnC,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAC5C,CAAC;QAEM,KAAK,CAAC,cAAc,CAAC,OAAe,EAAE,MAAc,EAAE,WAAmB,EAAE,UAAkC,EAAE,aAAuC;YACzJ,IAAI,QAAQ,GAAG,cAAc,CAAC;YAC9B,IAAI,IAAI,GAAG;gBACP,KAAK,EAAE,OAAO;gBACd,IAAI,EAAE,MAAM;gBACZ,MAAM,EAAE,WAAW;gBACnB,UAAU,EAAE,UAAU;gBACtB,MAAM,EAAE,aAAa;aACxB,CAAA;YACD,0CAA0C;YAC1C,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QACnD,CAAC;;IAxSuB,oBAAS,GAAe,IAAI,UAAU,EAAE,CAAC;IA0SrE,iBAAC;KAAA;kBA3SoB,UAAU","file":"","sourceRoot":"/","sourcesContent":["import { SDK, TimeManager } from \"simba-sdk\";\nimport { RoleType } from \"../avg/EditorEnums\";\nimport { GameRecord } from \"../avg/AVG\";\nimport { ConfigManager } from \"simba-config-manager\";\nimport { role } from \"../config/Role\";\nimport { channel, GameConfig } from \"../GameConfig\";\nimport { CostType, DotShopTotalType, DotShopType, EventLocation, EventOperationType, ExposureType, GuideLocation, GuideOperationType, LoadingState, MomentOptionType, PlotSessionState, ShareLocation, ShowType, SpecialDateContentStatus, SpecialDateContentType, TaskDotType, TutorialState, TutorialType } from \"./Enums\";\nimport { GameModelManager } from \"./model/GameModelManager\";\n\ninterface BaseDotElements {\n energy: number,\n gold: number,\n silver: number,\n grace: { roleId: number, grace: number }[],\n user_register_version: string,\n login_duration: number,\n total_duration: number,\n daily_duration: number,\n}\n\nexport default class GameDotMgr {\n private static readonly _instance: GameDotMgr = new GameDotMgr();\n private _majorIds: number[] = [];\n\n public static getInstance(): GameDotMgr {\n return GameDotMgr._instance;\n }\n\n public async dot(eventKey: string, data: any, category?: string) {\n // if (channel === \"dummy\") return;\n // category = category ? category : \"yybs_event\";\n // let baseElements = this.getBaseElements();\n // let biRet = await SDK.bi(category, eventKey, baseElements, data);\n }\n\n private getBaseElements(): BaseDotElements {\n let regV = GameRecord.globalVariables[\"register_version\"];\n if (!regV) {\n regV = GameConfig.gameVersion;\n GameRecord.globalVariables[\"register_version\"] = regV;\n GameRecord.saveRecord();\n }\n let player = GameModelManager.getPlayerData();\n let base: BaseDotElements = {\n energy: player.getEnergy(),\n gold: player.getGoldCoin(),\n silver: player.getClothCoin(),\n grace: [],\n user_register_version: regV,\n login_duration: TimeManager.getGameTime(),\n total_duration: TimeManager.getTotalGameTime(),\n daily_duration: TimeManager.getTodayGameTime(),\n };\n let gArr: { roleId: number, grace: number }[] = [];\n if (!this._majorIds || 0 === this._majorIds.length) {\n let r = ConfigManager.getAllConfig(role);\n for (let id in r) {\n let c = r[id];\n if (c && c.RoleType === RoleType.Role_Major) {\n this._majorIds.push(c.id);\n }\n }\n }\n for (let i = 0; i < this._majorIds.length; i++) {\n let rid = this._majorIds[i];\n let role = GameModelManager.getRoleData(rid);\n let gv = role?.getRoleLike();\n gv = gv ? gv : 0;\n let item: { roleId: number, grace: number } = {\n roleId: rid,\n grace: gv\n }\n gArr.push(item);\n }\n base.grace = gArr;\n return base;\n }\n\n public async dotClickUI(uiName: string) {\n let eventKey = \"click_ui\";\n let recordKey = \"click_ui_count_\" + uiName + \"_t_\" + GameModelManager.getCurDayStr();\n let clickCount = GameRecord.globalVariables[recordKey] as number;\n if (undefined === clickCount) {\n clickCount = 0;\n }\n clickCount += 1;\n GameRecord.globalVariables[recordKey] = clickCount;\n GameRecord.saveRecord();\n // console.log(\"dotClickUI = \", { click_ui: clickCount, ui_location: uiName });\n await this.dot(eventKey, { click_ui: clickCount, ui_location: uiName }, \"click_ui\");\n }\n\n public async dotLoading(state: LoadingState) {\n let eventKey = \"loading\";\n await this.dot(eventKey, { loading: state }, \"loading\");\n }\n\n /**\n * \n * @param playerId 玩家的PlayerId\n * @param gameConstData 兑换码兑换的道具ID\n */\n public async dotExchangeCodeSuccess(playerId: string, gameConstData?: string) {\n let eventKey = \"exchange_code_success\";\n await this.dot(eventKey, { exchange_code_success: playerId, gameConstData: gameConstData }, \"exchange_code_success\");\n }\n\n public async dotCost(cType: CostType, cNum: number) {\n // let eventKey = \"cost\";\n // let recordKey = cType + GameModelManager.getCurDayStr();\n // let count = GameRecord.globalVariables[recordKey] as number;\n // if (undefined === count) {\n // count = 0;\n // }\n // count = count + cNum;\n // GameRecord.globalVariables[recordKey] = count;\n // GameRecord.saveRecord();\n // let data = {};\n // data[cType] = count;\n // // console.log(\"dotCost = \", data);\n // await this.dot(eventKey, data, \"cost\");\n }\n\n public async dotPlot(session: number, state: PlotSessionState) {\n let eventKey = \"plot\";\n let v = session + \"_\" + state;\n // console.log(\"dotPlot = \", { plot_state: v });\n await this.dot(eventKey, { plot_state: v }, \"plot\");\n }\n\n public async dotExposure(eType: ExposureType | string) {\n // let eventKey = \"show\";\n // // console.log(\"dotExposure = \", { show: eType });\n // await this.dot(eventKey, { show: eType }, \"show\");\n }\n\n public async dotShop(sType: DotShopType, param?: any) {\n // let eventKey = \"shop\";\n // let data = {};\n\n // switch (sType) {\n // case DotShopType.LuckyDraw:\n // {\n // data[sType] = param.location;\n // }\n // break;\n // case DotShopType.Clothes:\n // {\n // if (param.isWear) {\n // data[sType] = \"wear_\" + param.sid + \"_\" + param.rid;\n // } else {\n // data[sType] = \"have_\" + param.sid + \"_\" + param.rid;\n // }\n // }\n // break;\n // }\n // // console.log(\"dotShop = \", data);\n // await this.dot(eventKey, data, \"shop\");\n }\n\n public async dotShopTotal(sType: DotShopTotalType, param?: any) {\n // let eventKey = \"shop_total\";\n // let data = {};\n // switch (sType) {\n // case DotShopTotalType.ShowGift:\n // {\n // let rKey = \"g_i_t_show_c\" + GameModelManager.getCurDayStr();;\n // let total = GameRecord.globalVariables[rKey] as number;\n // total = total ? total : 0;\n // total++;\n // data[sType] = {\n // show_id: \"show_item_\" + param.id,\n // total_show: total\n // }\n // GameRecord.globalVariables[rKey] = total;\n // }\n // break;\n // case DotShopTotalType.BuyItem:\n // {\n // let rKey = \"g_i_t_buy_c\" + GameModelManager.getCurDayStr();;\n // let total = GameRecord.globalVariables[rKey] as number;\n // total = total ? total : 0;\n // total++;\n // data[sType] = {\n // buy_id: \"buy_\" + param.id,\n // total_buy: total\n // }\n // GameRecord.globalVariables[rKey] = total;\n // }\n // break;\n // case DotShopTotalType.SendGift:\n // {\n // let rKey = \"g_i_t_send_c\" + GameModelManager.getCurDayStr();;\n // let total = GameRecord.globalVariables[rKey] as number;\n // total = total ? total : 0;\n // total++;\n // data[sType] =\n // {\n // send_id: param.gid,\n // role_id: param.rid,\n // total_send: total\n // };\n // GameRecord.globalVariables[rKey] = total;\n // }\n // break;\n // case DotShopTotalType.Popup:\n // {\n // data[sType] = param.popType;\n // }\n // break;\n // }\n // GameRecord.autoSave();\n // // console.log(\"dotShopTotal = \", data);\n // await this.dot(eventKey, data, \"shop_total\");\n }\n\n public async dotTask(taskDotType: TaskDotType, tId: number) {\n // let eventKey = \"task\";\n // let data = {};\n // data[\"daily_task\"] = {};\n // switch (taskDotType) {\n // case TaskDotType.CompleteTask:\n // {\n // data[\"daily_task\"] = \"completed_\" + tId;\n // }\n // break;\n // case TaskDotType.GetTaskRewards:\n // {\n // data[\"daily_task\"] = \"get_rewards_\" + tId;\n // }\n // break;\n // }\n // await this.dot(eventKey, data, \"task\");\n }\n\n public async dotMoment(id: number, optionType: MomentOptionType) {\n // let eventKey = \"circle_of_friends\";\n // let v = \"circle_\" + optionType;\n // await this.dot(eventKey, { circle: v }, \"circle_of_friends\");\n }\n\n public async dotTutorial(tType: TutorialType, state: TutorialState, param: any) {\n let eventKey = \"tutorial\";\n let k = \"\" + tType;\n let v = \"\" + param.session;\n switch (state) {\n case TutorialState.SelectSentence:\n {\n v += state + param.plotId;\n }\n break;\n case TutorialState.SelectSentenceRet:\n {\n k += \"_plot_select\";\n v += TutorialState.SelectSentence + param.plotId + state + param.select;\n }\n break;\n case TutorialState.Progress:\n {\n k += \"_plot_progress\";\n v += state + param.progress;\n }\n break;\n }\n let data = {};\n data[k] = v;\n // console.log(\"dotTutorial = \", data);\n await this.dot(eventKey, data, \"tutorial\");\n }\n\n public async dotShare(shareType: ShowType, shareLocation: ShareLocation | string) {\n let eventKey = \"share\";\n // console.log(\"dotShare = \", { share_type: shareType, share_location: shareLocation });\n await this.dot(eventKey, { share_type: shareType, share_location: shareLocation }, \"share\");\n }\n\n public async dotVideo(videoType: ShowType, videoLocation: string) {\n let eventKey = \"video\";\n // console.log(\"dotVideo = \", { video_type: videoType, video_location: videoLocation });\n await this.dot(eventKey, { video_type: videoType, video_location: videoLocation }, \"video\")\n }\n\n //todo\n public async dotShareRes(location: ShareLocation, titleId: number, imgId: number) {\n let eventKey = \"share_source\";\n let v = location + \"_\" + titleId + \"_\" + imgId;\n await this.dot(eventKey, { share_source: v }, \"share_source\");\n }\n\n public async dotGuide(oprType: GuideOperationType, location: GuideLocation) {\n let eventKey = \"guide\";\n let v = location + oprType;\n // console.log(\"dotGuide = \",{ guide: v });\n await this.dot(eventKey, { guide: v }, \"guide\");\n }\n\n\n public async dotEvent(oprType: EventOperationType, location: EventLocation) {\n let eventKey = 'event';\n let v = location;\n let data = {};\n data[oprType] = v;\n // console.log(\"dotEvent = \",data);\n await this.dot(eventKey, data, 'event');\n }\n\n public async dotSpecialPlot(sceneId: number, plotId: number, selectIndex: number, contenType: SpecialDateContentType, contentStatus: SpecialDateContentStatus) {\n let eventKey = 'special_plot';\n let data = {\n scene: sceneId,\n plot: plotId,\n select: selectIndex,\n contentype: contenType,\n status: contentStatus\n }\n // console.log(\"dotSpecialPlot = \", data);\n await this.dot(eventKey, data, 'special_plot');\n }\n\n}"]}