13297d9a-7696-4c46-96e0-0bbebf0919d2.js 43.6 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069
"use strict";
cc._RF.push(module, '132972adpZMRpbgC76/CRnS', 'GameModelManager');
// script/game/model/GameModelManager.ts

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GameModelManager = void 0;
const simba_cc_audio_manager_1 = require("simba-cc-audio-manager");
const simba_cc_resutils_1 = require("simba-cc-resutils");
const simba_config_manager_1 = require("simba-config-manager");
const simba_eventkit_1 = require("simba-eventkit");
const simba_sdk_1 = require("simba-sdk");
const simba_utils_1 = require("simba-utils");
const AVG_1 = require("../../avg/AVG");
const EditorEnums_1 = require("../../avg/EditorEnums");
const EditorEvents_1 = require("../../avg/EditorEvents");
const GameConstData_1 = require("../../common/gameplay/gamedata/GameConstData");
const GameEnumData_1 = require("../../common/gameplay/gamedata/GameEnumData");
const DateSceneConfig_1 = require("../../config/DateSceneConfig");
const I18nConfig_1 = require("../../config/I18nConfig");
const ItemConfig_1 = require("../../config/ItemConfig");
const RelationLevelConfig_1 = require("../../config/RelationLevelConfig");
const Role_1 = require("../../config/Role");
const TaoBaoShopUrlConfig_1 = require("../../config/TaoBaoShopUrlConfig");
const GameConfig_1 = require("../../GameConfig");
const Enums_1 = require("../Enums");
const DatingEventSceneModel_1 = require("./DatingEventSceneModel");
const GameRoleDataModel_1 = require("./GameRoleDataModel");
const MessageSceneModel_1 = require("./MessageSceneModel");
const UnlockSpecialPlotModelManager_1 = require("./UnlockSpecialPlotModelManager");
/**
 * 游戏model管理类
 */
var GameModelManager;
(function (GameModelManager) {
    let emitter = new simba_eventkit_1.Emitter;
    GameModelManager.MessageSceneChanged = emitter.createEvent();
    GameModelManager.MainDatingEventChanged = emitter.createEvent();
    GameModelManager.CheckDateGuide = emitter.createEvent(); //约会界面检测引导
    GameModelManager.CheckMsgGuide = emitter.createEvent(); //消息列表界面检测引导
    GameModelManager.AutoPopView = emitter.createEvent(); //展示自动弹出界面
    GameModelManager.ShowDatingEventArrowGuide = emitter.createEvent(); //约会列表界面展示箭头
    GameModelManager.ShowPlotBlocked = emitter.createEvent(); //展示剧情阻断弹窗
    GameModelManager.PlotBlockedChanged = emitter.createEvent(); //剧情阻断改变
    GameModelManager.ForceClickMsgItem = emitter.createEvent();
    GameModelManager.ForceClickDatingItem = emitter.createEvent();
    /**报幕数据准备就绪事件 */
    GameModelManager.ForceClickDataReady = emitter.createEvent();
    GameModelManager.UnlockItem = emitter.createEvent();
    /**回滚剧情数据完成刷新所有状态 */
    GameModelManager.RefreshAllStatus = emitter.createEvent();
    /**触发死亡选项之后的事件派发 */
    GameModelManager.DeadEvent = emitter.createEvent();
    /**关闭约会界面 */
    GameModelManager.CloseDatingSceneView = emitter.createEvent();
    /**刷新对应类型的番外 */
    GameModelManager.RefreshExtraPlotByType = emitter.createEvent();
    /**关闭番外界面 */
    GameModelManager.CloseExtraSceneView = emitter.createEvent();
    /**触发剧情属性值变化之后弹起特殊Toast */
    GameModelManager.SpecialToast = emitter.createEvent();
    /**从主界面跳转到游戏页面 */
    GameModelManager.JumpToViewInGame = emitter.createEvent();
    /**关闭设置界面 */
    GameModelManager.CloseSettingView = emitter.createEvent();
    let messageScenes;
    // let momentScenes: MomentSceneModel[] | undefined;
    let mainDatingScenes;
    let phoneCallIndex = -1;
    let unlockGift = false;
    let isChangPlotSceneType = false;
    let isMainPlot = true;
    let isNeedEnterCurDateChapter = true;
    let _autoPopView = [];
    function isChangePlotSceneType() { return isChangPlotSceneType; }
    GameModelManager.isChangePlotSceneType = isChangePlotSceneType;
    function setIsChangePlotSceneType(isChange) {
        isChangPlotSceneType = isChange;
    }
    GameModelManager.setIsChangePlotSceneType = setIsChangePlotSceneType;
    function isMainPlotSceneType() { return isMainPlot; }
    GameModelManager.isMainPlotSceneType = isMainPlotSceneType;
    function setIsMainPlotSceneType(isChange) {
        isMainPlot = isChange;
    }
    GameModelManager.setIsMainPlotSceneType = setIsMainPlotSceneType;
    async function rollbackPhoneCallIfNeeded() {
        if (phoneCallIndex >= 0 && phoneCallIndex < AVG_1.GameRecord.getCurrentRecordItems().length - 1) {
            let ret = await AVG_1.PlotManager.rollbackToIndex(phoneCallIndex);
            savePhoneCall();
            return ret;
        }
        else {
            return AVG_1.PlotManager.getCurrentPlots();
        }
    }
    GameModelManager.rollbackPhoneCallIfNeeded = rollbackPhoneCallIfNeeded;
    //#region  //数据模块 
    let roleDatasMap = new Map();
    let languagesMap = new Map(); //语言
    //#endregion
    function getMessageScenesModel() {
        return messageScenes;
    }
    GameModelManager.getMessageScenesModel = getMessageScenesModel;
    function getMessageSceneModel(id) {
        return messageScenes.find(v => v.id === id);
    }
    GameModelManager.getMessageSceneModel = getMessageSceneModel;
    function getMainDatingEventScenesModel() {
        return mainDatingScenes;
    }
    GameModelManager.getMainDatingEventScenesModel = getMainDatingEventScenesModel;
    function getMainDatingEventSceneModel(id) {
        return mainDatingScenes.find(v => v.id === id);
    }
    GameModelManager.getMainDatingEventSceneModel = getMainDatingEventSceneModel;
    function getMainDatingEventScenesModelByChapterindex(chapterIndex) {
        let scenes = [];
        if (!mainDatingScenes) {
            return [];
        }
        for (let i = 0; i < mainDatingScenes.length; i++) {
            if (simba_config_manager_1.ConfigManager.getConfig(DateSceneConfig_1.dateSceneConfig, mainDatingScenes[i].id).chapter_index === chapterIndex) {
                scenes.push(mainDatingScenes[i]);
            }
        }
        return scenes;
    }
    GameModelManager.getMainDatingEventScenesModelByChapterindex = getMainDatingEventScenesModelByChapterindex;
    let creating = false;
    /**开启分支剧情,
    * plots:如果需要同时开启多个分支剧情,则数组中存储这些分支中对应的起始剧情id
    */
    async function startBranches(plots) {
        if (creating)
            return;
        creating = true;
        if (0 === plots.length) {
            // console.warn("no plots to mark as branch start plot id");
            return;
        }
        for (let i = 0; i < plots.length; i++) {
            let pid = plots[i];
            if (AVG_1.SpecialPlotId.ToBeContinued === pid || AVG_1.SpecialPlotId.End === pid) {
                // console.error("you can not start a branch with SpecialPlotId, id is = ", pid);
                continue;
            }
            let p = await AVG_1.getPlot(pid);
            if (!p) {
                // console.warn("no plot which plot id is = ", pid);
                continue;
            }
            if (GameModelManager.currPlots) {
                GameModelManager.currPlots.push(p);
            }
            let hasStarted = checkIsBranchStarted(pid);
            if (hasStarted) {
                // cc.warn("branch has been started which start plot id is = ", pid);
                continue;
            }
            console.log('开启新分支pid', pid);
            let index = await AVG_1.PlotManager.startNewPlotBranch(pid);
            pushBranchToRecord(pid, index);
        }
        creating = false;
    }
    GameModelManager.startBranches = startBranches;
    /**
    *
    * @param plotId 检测指定剧情下的分支是否已经开启
    * @returns
    */
    function checkIsBranchStarted(plotId) {
        const branchRecordKey = "BRANCH_INDEX_ENTRY";
        let ret = false;
        let itemArr = [];
        let recordStr = AVG_1.GameRecord.globalVariables[branchRecordKey];
        if (recordStr && "" !== recordStr.trim()) {
            itemArr = JSON.parse(recordStr);
        }
        ret = itemArr.findIndex((v) => v.startPlot === plotId) >= 0;
        return ret;
    }
    /**
     *
     * @param plotId 将分支计入存档
     * @param index
     */
    function pushBranchToRecord(plotId, index) {
        const branchRecordKey = "BRANCH_INDEX_ENTRY";
        let exist = false;
        let itemArr = [];
        let recordStr = AVG_1.GameRecord.globalVariables[branchRecordKey];
        if (recordStr && "" !== recordStr.trim()) {
            itemArr = JSON.parse(recordStr);
        }
        exist = itemArr.findIndex((v) => v.startPlot === plotId) >= 0;
        if (!exist) {
            itemArr.push({
                startPlot: plotId,
                index: index
            });
            AVG_1.GameRecord.globalVariables[branchRecordKey] = JSON.stringify(itemArr);
            AVG_1.GameRecord.saveRecord();
        }
    }
    /**
     * 获取分支剧情状态(约会状态)
     * @param plotSceneTypeId 剧情类型id
     * @param start_plot_id 起始剧情id
     * @returns 剧情状态
     */
    function getBranchStatus(plotSceneTypeId, start_plot_id) {
        let s = DatingEventSceneModel_1.DatingEventStatus.New;
        let curP = AVG_1.PlotManager.getCurrentPlots();
        let progress = curP.findIndex((v) => v.plotSceneTypeId === plotSceneTypeId) >= 0;
        let isNew = curP.findIndex((v) => v.plotSceneTypeId === plotSceneTypeId && v.id === start_plot_id) >= 0;
        s = isNew ? DatingEventSceneModel_1.DatingEventStatus.New : progress ? DatingEventSceneModel_1.DatingEventStatus.InProgress : DatingEventSceneModel_1.DatingEventStatus.Completed;
        return s;
    }
    GameModelManager.getBranchStatus = getBranchStatus;
    /**获取已开启的所有番外id */
    function getAllStartedBranches() {
        const branchRecordKey = "BRANCH_INDEX_ENTRY";
        let itemArr = [];
        let recordStr = AVG_1.GameRecord.globalVariables[branchRecordKey];
        if (recordStr && "" !== recordStr.trim()) {
            itemArr = JSON.parse(recordStr);
        }
        return itemArr;
    }
    GameModelManager.getAllStartedBranches = getAllStartedBranches;
    let branchCompleteRecordKey = "branch_complete";
    /**设置分支完成 */
    function setBranchComplete(branchId) {
        let rStr = AVG_1.GameRecord.globalVariables[branchCompleteRecordKey];
        let rArr = [];
        if (rStr && "" !== rStr) {
            rArr = JSON.parse(rStr);
        }
        let exist = rArr.findIndex((v) => v === branchId) !== (-1);
        if (!exist) {
            rArr.push(branchId);
            AVG_1.GameRecord.globalVariables[branchCompleteRecordKey] = JSON.stringify(rArr);
            AVG_1.GameRecord.saveRecord();
        }
    }
    GameModelManager.setBranchComplete = setBranchComplete;
    /**检测分支是否完成 */
    function checkBranchIsComplete(branchId) {
        let rStr = AVG_1.GameRecord.globalVariables[branchCompleteRecordKey];
        let rArr = [];
        if (rStr && "" !== rStr) {
            rArr = JSON.parse(rStr);
        }
        let exist = rArr.findIndex((v) => v === branchId) !== (-1);
        return exist;
    }
    GameModelManager.checkBranchIsComplete = checkBranchIsComplete;
    let branchInProgressRecordKey = "branch_InProgress";
    /**设置分支完成 */
    function setBranchInProgress(branchId) {
        let rStr = AVG_1.GameRecord.globalVariables[branchInProgressRecordKey];
        let rArr = [];
        if (rStr && "" !== rStr) {
            rArr = JSON.parse(rStr);
        }
        let exist = rArr.findIndex((v) => v === branchId) !== (-1);
        if (!exist) {
            rArr.push(branchId);
            AVG_1.GameRecord.globalVariables[branchInProgressRecordKey] = JSON.stringify(rArr);
            AVG_1.GameRecord.saveRecord();
        }
    }
    GameModelManager.setBranchInProgress = setBranchInProgress;
    /**检测分支是否完成 */
    function checkBranchIsInProgress(branchId) {
        let rStr = AVG_1.GameRecord.globalVariables[branchInProgressRecordKey];
        let rArr = [];
        if (rStr && "" !== rStr) {
            rArr = JSON.parse(rStr);
        }
        let exist = rArr.findIndex((v) => v === branchId) !== (-1);
        return exist;
    }
    GameModelManager.checkBranchIsInProgress = checkBranchIsInProgress;
    async function initConfigData() {
        await simba_config_manager_1.ConfigManager.initConfigData(false);
        await initLanguageConfig();
        initRoleConfig();
    }
    function getI18LanguageTxt(id) {
        let i18 = simba_config_manager_1.ConfigManager.getConfig(I18nConfig_1.i18nConfig, id);
        return i18.cn;
    }
    GameModelManager.getI18LanguageTxt = getI18LanguageTxt;
    function initRoleConfig() {
        let cfg = simba_config_manager_1.ConfigManager.getAllConfig(Role_1.role);
        for (let id in cfg) {
            let element = cfg[id];
            if (element) {
                let data = new GameRoleDataModel_1.default();
                data.setConfig(element);
                roleDatasMap.set(element.id, data);
            }
        }
    }
    function getLanguagePath() {
        return "userdata/language/chinese";
    }
    async function initLanguageConfig() {
        let cfgFile = await simba_cc_resutils_1.ResUtils.loadRes(getLanguagePath(), cc.JsonAsset);
        if (cfgFile) {
            let lans = cfgFile;
            for (let i = 0; i < lans.length; ++i) {
                let element = lans[i];
                if (element) {
                    languagesMap.set(element.id, element.value);
                }
            }
        }
    }
    function getLanguageTxt(id) {
        if (languagesMap.has(id)) {
            return languagesMap.get(id);
        }
        else {
            // console.log("current language id is miss " + id);
            return "";
        }
    }
    GameModelManager.getLanguageTxt = getLanguageTxt;
    function getConfigLanguageTxt(id) {
        return simba_config_manager_1.ConfigManager.getConfig(I18nConfig_1.i18nConfig, id).cn;
    }
    GameModelManager.getConfigLanguageTxt = getConfigLanguageTxt;
    function getItemConfig(id) {
        return simba_config_manager_1.ConfigManager.getConfig(ItemConfig_1.itemConfig, id);
    }
    GameModelManager.getItemConfig = getItemConfig;
    function getItemConfigs() {
        return simba_config_manager_1.ConfigManager.getAllConfig(ItemConfig_1.itemConfig);
    }
    GameModelManager.getItemConfigs = getItemConfigs;
    function getRoleData(id) {
        if (!roleDatasMap.has(id)) {
            return undefined;
        }
        return roleDatasMap.get(id);
    }
    GameModelManager.getRoleData = getRoleData;
    function getPlayerData() {
        return GameModelManager.getRoleData(GameConstData_1.GameConstData.GAME_CONST_PLAYER_ROLE_VALUE);
    }
    GameModelManager.getPlayerData = getPlayerData;
    let disposable;
    async function init(onProgress) {
        await initConfigData();
        if (onProgress)
            onProgress(0.92);
        tipAddGracePlots = [];
        phoneCallIndex = AVG_1.GameRecord.recordVariables["gm.pci"];
        unlockGift = !!AVG_1.GameRecord.recordVariables["gm.unlockGift"];
        if (phoneCallIndex === undefined)
            phoneCallIndex = -1;
        let initRet = [];
        { // init message models
            let ids = AVG_1.GameRecord.recordVariables["gm.ms"];
            if (ids !== undefined) {
                messageScenes = [];
                messageScenes = ids.map((id) => new MessageSceneModel_1.MessageSceneModel(id));
                initRet.push(...messageScenes.map((s) => s.initFromRecords()));
            }
            else {
                messageScenes = [];
            }
        }
        { // init main dating models
            let ids = AVG_1.GameRecord.recordVariables["gm.md"];
            if (ids !== undefined) {
                mainDatingScenes = [];
                mainDatingScenes = ids.map((id) => new DatingEventSceneModel_1.DatingEventSceneModel(id));
                initRet.push(...mainDatingScenes.map((s) => s.initFromRecords()));
            }
            else {
                mainDatingScenes = [];
            }
        }
        { //init application
            cc.game.on(cc.game.EVENT_HIDE, () => {
                // console.log("enter game background");
                simba_cc_audio_manager_1.AudioManager.pauseMusic();
            });
            cc.game.on(cc.game.EVENT_SHOW, () => {
                // console.log("enter game force");
                simba_cc_audio_manager_1.AudioManager.resumeMusic();
            });
        }
        if (initRet.length) {
            await Promise.all(initRet);
        }
        if (onProgress)
            onProgress(0.94);
        if (!disposable) {
            disposable = new simba_eventkit_1.CompositeDisposable;
            disposable.add(AVG_1.PlotManager.PlotWillStart.on(handlePlotWillStart));
            disposable.add(EditorEvents_1.EditorEvents.UNLOCK_ITEM.on(onUnlockItem));
            disposable.add(EditorEvents_1.EditorEvents.UNLOCK_SPECIAL_PLOT.on(onUnlockSpecialPlot));
            disposable.add(EditorEvents_1.EditorEvents.DEAD_EVENT.on(onDeadEvevt));
            disposable.add(EditorEvents_1.EditorEvents.SPECIAL_TOAST.on(onSpecialToast));
        }
        initPlots();
        if (onProgress)
            onProgress(0.96);
        for (let scene of mainDatingScenes) { // 检查主线剧情状态
            if (GameModelManager.currPlots[0].plotSceneType !== Enums_1.PlotSceneType.DatingEvent ||
                (scene.id !== GameModelManager.currPlots[0].plotSceneTypeId && scene.status !== DatingEventSceneModel_1.DatingEventStatus.Completed)) {
                scene.status = DatingEventSceneModel_1.DatingEventStatus.Completed;
            }
        }
        if (onProgress)
            onProgress(0.98);
    }
    GameModelManager.init = init;
    function onUnlockItem(itemId) {
        let s = itemId;
        if (s && "" !== s.trim()) {
            let n = parseInt(s);
            GameModelManager.UnlockItem.emit(n);
        }
    }
    function onDeadEvevt(pid) {
        let s = pid;
        if (s && "" !== s.trim()) {
            let n = parseInt(s);
            GameModelManager.DeadEvent.emit(n);
        }
    }
    function onSpecialToast(type) {
        let s = type;
        if (s && "" !== s.trim()) {
            let n = parseInt(s);
            GameModelManager.SpecialToast.emit(n);
        }
    }
    function onUnlockSpecialPlot(specialPlotId) {
        let s = specialPlotId;
        if (s && "" !== s.trim()) {
            let n = parseInt(s);
            UnlockSpecialPlotModelManager_1.UnlockSpecialPlotModelManager.saveUnlockedSpecialPlotIdByItemIdToGameRecord(n);
        }
    }
    GameModelManager.onUnlockSpecialPlot = onUnlockSpecialPlot;
    /**
     * set main tab guide record value
     * @param index
     * @param record
     */
    function setGuideMainTabRecord(index, record) {
        let r = AVG_1.GameRecord.globalVariables["guide_main_tab" + index];
        if (r && record <= r) {
            return;
        }
        AVG_1.GameRecord.globalVariables["guide_main_tab" + index] = record;
        AVG_1.GameRecord.saveRecord();
    }
    GameModelManager.setGuideMainTabRecord = setGuideMainTabRecord;
    /**
     * get main tab guide index
     */
    function getMainTabGuideIndex() {
        let index = -1;
        const MAX = 4;
        for (let i = 0; i < MAX; i++) {
            let r = AVG_1.GameRecord.globalVariables["guide_main_tab" + i];
            r = r === undefined ? Enums_1.GuideState.close : r;
            if (r === Enums_1.GuideState.Open) {
                index = i;
            }
        }
        return index;
    }
    GameModelManager.getMainTabGuideIndex = getMainTabGuideIndex;
    /**
     * set event item guide record value
     * @param itemKey
     * @param record
     */
    function setGuideEventItemRecord(itemKey, record) {
        let r = AVG_1.GameRecord.globalVariables["guide_evt_item"];
        r = r === undefined ? Enums_1.GuideState.close : r;
        if (record <= r) {
            return;
        }
        AVG_1.GameRecord.globalVariables["guide_evt_item_key"] = itemKey;
        AVG_1.GameRecord.globalVariables["guide_evt_item"] = record;
        AVG_1.GameRecord.saveRecord();
    }
    GameModelManager.setGuideEventItemRecord = setGuideEventItemRecord;
    /**
     * get event item guide key
     */
    function getEventItemGuideKey() {
        let key = "";
        let r = AVG_1.GameRecord.globalVariables["guide_evt_item"];
        r = r === undefined ? Enums_1.GuideState.close : r;
        let k = AVG_1.GameRecord.globalVariables["guide_evt_item_key"];
        if (r && r === Enums_1.GuideState.Open) {
            key = k;
        }
        return key;
    }
    GameModelManager.getEventItemGuideKey = getEventItemGuideKey;
    /**
     * set msg guide item record value
     * @param itemKey
     * @param record
     */
    function setGuideMsgItemRecord(itemKey, record) {
        let r = AVG_1.GameRecord.globalVariables["guide_msg_item"];
        r = r === undefined ? Enums_1.GuideState.close : r;
        if (record <= r) {
            return;
        }
        AVG_1.GameRecord.globalVariables["guide_msg_item_key"] = itemKey;
        AVG_1.GameRecord.globalVariables["guide_msg_item"] = record;
        AVG_1.GameRecord.saveRecord();
    }
    GameModelManager.setGuideMsgItemRecord = setGuideMsgItemRecord;
    /**
     * get msg item guide key
     */
    function getMsgItemGuideKey() {
        let key = "";
        let r = AVG_1.GameRecord.globalVariables["guide_msg_item"];
        r = r === undefined ? Enums_1.GuideState.close : r;
        let k = AVG_1.GameRecord.globalVariables["guide_msg_item_key"];
        if (r && r === Enums_1.GuideState.Open) {
            key = k;
        }
        return key;
    }
    GameModelManager.getMsgItemGuideKey = getMsgItemGuideKey;
    function save() {
        let oldValue = AVG_1.GameRecord.recordVariables["gm.ms"];
        let newValue = messageScenes.map(v => v.id);
        if (!simba_utils_1.shallowEqual(oldValue, newValue)) {
            AVG_1.GameRecord.recordVariables["gm.ms"] = newValue;
        }
        oldValue = AVG_1.GameRecord.recordVariables["gm.md"];
        newValue = mainDatingScenes.map(v => v.id);
        if (!simba_utils_1.shallowEqual(oldValue, newValue)) {
            AVG_1.GameRecord.recordVariables["gm.md"] = newValue;
        }
    }
    function savePhoneCall() {
        AVG_1.GameRecord.recordVariables["gm.pci"] = phoneCallIndex;
        AVG_1.GameRecord.saveRecord();
    }
    async function initPlots() {
        let plots = AVG_1.PlotManager.getCurrentPlots();
        if (true) {
            GameModelManager.currPlots = [...plots];
            if (!messageScenes) { // 第一次进游戏,根据剧情初始化数据
                messageScenes = [];
            }
            if (!mainDatingScenes) {
                mainDatingScenes = [];
            }
            for (let i = 0; i < plots.length; i++) {
                let plot = plots[i];
                if (plot.plotSceneType === Enums_1.PlotSceneType.Message) {
                    let index = messageScenes.findIndex(v => v.id === plot.plotSceneTypeId);
                    if (index < 0) {
                        index = 0;
                        let model = new MessageSceneModel_1.MessageSceneModel(plot.plotSceneTypeId);
                        model.firstPlot = plot;
                        messageScenes.unshift(model);
                    }
                }
                else if (plot.plotSceneType === Enums_1.PlotSceneType.DatingEvent) {
                    let cfg = simba_config_manager_1.ConfigManager.getConfig(DateSceneConfig_1.dateSceneConfig, plot.plotSceneTypeId);
                    if (cfg.DateType === EditorEnums_1.DateType.Date_Normal) { // 主线约会剧情
                        if (plots[0] !== plot) {
                            console.error("主线约会剧情应在主线开启");
                            continue;
                        }
                        if (mainDatingScenes.findIndex(v => v.id === plot.plotSceneTypeId) < 0) {
                            let model = new DatingEventSceneModel_1.DatingEventSceneModel(plot.plotSceneTypeId);
                            model.firstPlot = plot;
                            model.status = DatingEventSceneModel_1.DatingEventStatus.New;
                            mainDatingScenes.push(model);
                        }
                    }
                }
            }
            save();
        }
    }
    async function handlePlotWillStart(plot, branch) {
        handleNewPlot(GameModelManager.currPlots[branch], plot, branch);
        GameModelManager.currPlots[branch] = plot;
    }
    async function handleNewPlot(prevPlot, plot, branch) {
        if (plot.plotSceneType === Enums_1.PlotSceneType.Message) {
            let idx = messageScenes.findIndex(v => v.id === plot.plotSceneTypeId);
            if (idx >= 0) { // 原会话中有新消息
                let model = messageScenes[idx];
                if (idx > 0) {
                    let reorderIdx = 0;
                    if (branch > 0 && GameModelManager.currPlots && GameModelManager.currPlots[0].plotSceneType === Enums_1.PlotSceneType.Message) {
                        reorderIdx = 1;
                    }
                    for (let i = idx; i > reorderIdx; i--) {
                        messageScenes[i] = messageScenes[i - 1];
                    }
                    messageScenes[reorderIdx] = model;
                }
            }
            else { // 新会话
                let model = new MessageSceneModel_1.MessageSceneModel(plot.plotSceneTypeId);
                model.firstPlot = plot;
                messageScenes.unshift(model);
            }
            GameModelManager.MessageSceneChanged.emit(messageScenes);
            save();
        }
        else if (plot.plotSceneType === Enums_1.PlotSceneType.PhoneCall) {
            if (!prevPlot || prevPlot.plotSceneType !== Enums_1.PlotSceneType.PhoneCall) {
                phoneCallIndex = AVG_1.GameRecord.getCurrentRecordItems().length; // 当前存档还没生成,不需要减1
                savePhoneCall();
            }
        }
        else if (plot.plotSceneType === Enums_1.PlotSceneType.DatingEvent) {
            let cfg = simba_config_manager_1.ConfigManager.getConfig(DateSceneConfig_1.dateSceneConfig, plot.plotSceneTypeId);
            if (cfg.DateType === EditorEnums_1.DateType.Date_Normal) { // 主线约会剧情
                if (branch !== 0) {
                    console.error("主线约会剧情应在主线开启");
                    return;
                }
                let idx = mainDatingScenes.findIndex(v => v.id === plot.plotSceneTypeId);
                if (idx < 0) { // 新开启
                    let model = new DatingEventSceneModel_1.DatingEventSceneModel(plot.plotSceneTypeId);
                    model.firstPlot = plot;
                    model.status = DatingEventSceneModel_1.DatingEventStatus.New;
                    mainDatingScenes.push(model);
                    GameModelManager.MainDatingEventChanged.emit(mainDatingScenes);
                }
                save();
            }
        }
        if (prevPlot && prevPlot.plotSceneType === Enums_1.PlotSceneType.PhoneCall && plot.plotSceneType !== Enums_1.PlotSceneType.PhoneCall) {
            phoneCallIndex = -1;
            savePhoneCall();
        }
        if (prevPlot && (prevPlot.plotSceneType !== plot.plotSceneType || prevPlot.plotSceneTypeId !== plot.plotSceneTypeId)) { // 切换场景
            if (prevPlot.plotSceneType === Enums_1.PlotSceneType.DatingEvent) {
                let model = mainDatingScenes.find(v => v.id === prevPlot.plotSceneTypeId);
                if (model)
                    model.status = DatingEventSceneModel_1.DatingEventStatus.Completed;
            }
        }
        isChangPlotSceneType = !prevPlot || (prevPlot.plotSceneType !== plot.plotSceneType || prevPlot.plotSceneTypeId !== plot.plotSceneTypeId);
        //main plot line progress
        if (0 === branch && checkIsDotTutorial()) {
            stepMainLinePlotProgress();
        }
    }
    function stepMainLinePlotProgress() {
        let r = AVG_1.GameRecord.recordVariables["p_s_t_i_p"];
        r = r ? r : 0;
        if (isChangPlotSceneType) {
            r = 1;
        }
        else {
            r++;
        }
        AVG_1.GameRecord.recordVariables["p_s_t_i_p"] = r;
    }
    function dotMainLinePlotStart() {
        // main plot line progress and change plot scene (for BI dot);
        let plot = AVG_1.PlotManager.getCurrentPlots()[0];
        let mainPlotLineSession = AVG_1.GameRecord.globalVariables["m_p_l_s"]; //主线总session计数
        mainPlotLineSession = mainPlotLineSession ? mainPlotLineSession : 1;
        let sKey = "m_l_p_s_started";
        let startedSession = AVG_1.GameRecord.globalVariables[sKey];
        startedSession = startedSession ? startedSession : 0;
        if (startedSession >= mainPlotLineSession) { //max is equal
            return;
        }
        AVG_1.GameRecord.globalVariables["m_p_l_s"] = mainPlotLineSession;
        let plotScenTypeSession = AVG_1.GameRecord.globalVariables["p_s_t_s" + plot.plotSceneType];
        plotScenTypeSession = plotScenTypeSession ? plotScenTypeSession : 0;
        plotScenTypeSession++;
        AVG_1.GameRecord.globalVariables["p_s_t_s" + plot.plotSceneType] = plotScenTypeSession; //不同场景类型分别session计数
        if (checkIsDotTutorial()) {
            AVG_1.GameRecord.recordVariables["p_s_t_i_p"] = 1; //主线剧情中,当前场景类型progress进度计数
        }
        AVG_1.GameRecord.globalVariables[sKey] = mainPlotLineSession;
        AVG_1.GameRecord.saveRecord();
    }
    GameModelManager.dotMainLinePlotStart = dotMainLinePlotStart;
    /**
     * 主线剧情结束打点
     */
    function dotMainLinePlotEnd() {
        let mainPlotLineSession = AVG_1.GameRecord.globalVariables["m_p_l_s"];
        AVG_1.GameRecord.globalVariables["m_p_l_s"] = mainPlotLineSession + 1;
        AVG_1.GameRecord.saveRecord();
    }
    GameModelManager.dotMainLinePlotEnd = dotMainLinePlotEnd;
    function checkFuncUnloced(key) {
        return AVG_1.GameRecord.recordVariables[key] === GameEnumData_1.FuncStateEnum.locked ? false : true;
    }
    GameModelManager.checkFuncUnloced = checkFuncUnloced;
    function checkRedPot(key) {
        return AVG_1.GameRecord.globalVariables["red_pot_" + key] === GameEnumData_1.RedPotStateEnum.Show;
    }
    GameModelManager.checkRedPot = checkRedPot;
    function setRedPotState(key, state) {
        AVG_1.GameRecord.globalVariables["red_pot_" + key] = state;
        AVG_1.GameRecord.autoSave();
    }
    GameModelManager.setRedPotState = setRedPotState;
    function checkVoiceNeedShowAD(vCfg) {
        let ret = false;
        if (vCfg) {
            if (vCfg.ads === 0) {
                return ret;
            }
            let voiceAdRecord = AVG_1.GameRecord.globalVariables["voice_ad"];
            let arr = [];
            if (voiceAdRecord) {
                arr = JSON.parse(voiceAdRecord);
            }
            let set = new Set(arr);
            ret = !set.has(vCfg.id);
        }
        return ret;
    }
    GameModelManager.checkVoiceNeedShowAD = checkVoiceNeedShowAD;
    function pushVoiceShowAdToRecord(voiceId) {
        let voiceAdRecord = AVG_1.GameRecord.globalVariables["voice_ad"];
        let arr = [];
        if (voiceAdRecord) {
            arr = JSON.parse(voiceAdRecord);
        }
        let set = new Set(arr);
        if (!set.has(voiceId)) {
            arr.push(voiceId);
        }
        AVG_1.GameRecord.globalVariables["voice_ad"] = JSON.stringify(arr);
        AVG_1.GameRecord.autoSave();
    }
    GameModelManager.pushVoiceShowAdToRecord = pushVoiceShowAdToRecord;
    function getCurDayStr() {
        let t = simba_sdk_1.TimeManager.getTime();
        let time = new Date(t);
        let y = time.getFullYear();
        let m = time.getMonth() + 1;
        let d = time.getDate();
        let timeStr = y + "_" + m + "_" + d;
        return timeStr;
    }
    GameModelManager.getCurDayStr = getCurDayStr;
    function checkIsDotTutorial() {
        let curPlot = AVG_1.PlotManager.getCurrentPlots()[0];
        return curPlot && curPlot.chapterId === GameConstData_1.GameConstData.GAME_CONST_FIRST_CHAPTER_ID;
    }
    GameModelManager.checkIsDotTutorial = checkIsDotTutorial;
    function getLastFreeTime() {
        let time = 0;
        let recordKey = "luck_draw_free_time";
        let record = AVG_1.GameRecord.globalVariables[recordKey];
        time = record ? record : 0;
        return time;
    }
    GameModelManager.getLastFreeTime = getLastFreeTime;
    function checkOverdue(time, refreshhour = 4) {
        let checkTime = new Date(time);
        let currentTime = new Date(simba_sdk_1.TimeManager.getTime());
        let year = checkTime.getFullYear();
        let month = checkTime.getMonth() + 1;
        let day = checkTime.getDate();
        let hour = checkTime.getHours();
        if (currentTime.getFullYear() > year) {
            return true;
        }
        else if (currentTime.getMonth() + 1 > month) {
            return true;
        }
        if (currentTime.getDate() == day) {
            if (hour > 0 && hour < refreshhour) {
                if (currentTime.getHours() >= refreshhour) {
                    return true;
                }
            }
        }
        else if (currentTime.getDate() > day && currentTime.getHours() >= refreshhour) {
            return true;
        }
        return false;
    }
    GameModelManager.checkOverdue = checkOverdue;
    function checkSkinAndGraceCondition(condition) {
        let ret = false;
        if (condition.groups && condition.groups.length > 0
            && condition.groups[0].items
            && condition.groups[0].items.length > 0
            && condition.groups[0].items[0].target) {
            if (condition.groups[0].items[0].target.startsWith("r.like")) {
                let roleIdStr = condition.groups[0].items[0].target.replace("r.like", "");
                let role = getRoleData(parseInt(roleIdStr));
                if (role && role.getRoleLike() >= parseInt(condition.groups[0].items[0].oprand.value)) {
                    ret = true;
                }
            }
            if (condition.groups[0].items[0].target.startsWith("r.skin")) {
                let roleIdStr = condition.groups[0].items[0].target.replace("r.skin", "");
                let role = getRoleData(parseInt(roleIdStr));
                let v = parseInt(condition.groups[0].items[0].oprand.value);
                if (role && role.hasSkin(v) && role.getCurSkin() === v) {
                    ret = true;
                }
            }
        }
        return ret;
    }
    GameModelManager.checkSkinAndGraceCondition = checkSkinAndGraceCondition;
    function getGraceLevelByGraceValue(value) {
        let level = 0;
        let cfgs = simba_config_manager_1.ConfigManager.getAllConfig(RelationLevelConfig_1.relationLevelConfig);
        let gCount = 0;
        for (let id in cfgs) {
            let cfg = cfgs[id];
            gCount += cfg.relation_value;
            if (value >= gCount) {
                level = cfg.id;
            }
        }
        return level;
    }
    GameModelManager.getGraceLevelByGraceValue = getGraceLevelByGraceValue;
    function setNotNeedEnterCurDateChapter() {
        isNeedEnterCurDateChapter = false;
    }
    GameModelManager.setNotNeedEnterCurDateChapter = setNotNeedEnterCurDateChapter;
    function registerAutoPopView(viewType) {
        if (_autoPopView.length === 0) {
            _autoPopView.push(viewType);
        }
        else {
            if (_autoPopView.findIndex((v) => v === viewType) === (-1)) {
                _autoPopView.push(viewType);
            }
        }
    }
    GameModelManager.registerAutoPopView = registerAutoPopView;
    function checkAutoPopView() {
        if (_autoPopView.length === 0) {
            return;
        }
        _autoPopView = _autoPopView.sort((v1, v2) => {
            return v1 - v2;
        });
        let v = _autoPopView.pop();
        if (v) {
            GameModelManager.AutoPopView.emit(v);
        }
    }
    GameModelManager.checkAutoPopView = checkAutoPopView;
    function checkIsOverPlotLimitTime() {
        let isOver = false;
        let timeKeyStr = "plot_limit_time";
        let recordTime = AVG_1.GameRecord.globalVariables[timeKeyStr];
        if (recordTime) {
            isOver = checkOverdue(recordTime);
        }
        else {
            let timeKeyStr = "plot_limit_time";
            AVG_1.GameRecord.globalVariables[timeKeyStr] = simba_sdk_1.TimeManager.getTime();
        }
        return isOver;
    }
    GameModelManager.checkIsOverPlotLimitTime = checkIsOverPlotLimitTime;
    async function dealBlockedPlot(isAdForce) {
        let over = checkIsOverPlotLimitTime();
        let curPlot = AVG_1.PlotManager.getCurrentPlots()[0];
        if (curPlot && curPlot.plotSceneType === Enums_1.PlotSceneType.BlockPlot) {
            if (over || isAdForce) {
                await AVG_1.PlotManager.completePlot(curPlot);
                let timeKeyStr = "plot_limit_time";
                AVG_1.GameRecord.globalVariables[timeKeyStr] = simba_sdk_1.TimeManager.getTime();
                GameModelManager.PlotBlockedChanged.emit();
            }
            else {
                GameModelManager.ShowPlotBlocked.emit();
            }
        }
    }
    GameModelManager.dealBlockedPlot = dealBlockedPlot;
    function checkIsPlotBlocked() {
        let blocked = false;
        let curPlot = AVG_1.PlotManager.getCurrentPlots()[0];
        if (curPlot && curPlot.plotSceneType === Enums_1.PlotSceneType.BlockPlot) {
            blocked = true;
        }
        return blocked;
    }
    GameModelManager.checkIsPlotBlocked = checkIsPlotBlocked;
    function getCurMainLinePlotId() {
        let p = AVG_1.PlotManager.getCurrentPlots()[0];
        return p ? p.id : 0;
    }
    GameModelManager.getCurMainLinePlotId = getCurMainLinePlotId;
    let tipAddGracePlots = [];
    function checkPlotTipAddGraceAlready(plotId) {
        let ret = tipAddGracePlots.findIndex((v) => v === plotId) !== (-1);
        return ret;
    }
    GameModelManager.checkPlotTipAddGraceAlready = checkPlotTipAddGraceAlready;
    function pushTipAddGracePlot(plotId) {
        let exist = tipAddGracePlots.findIndex((v) => v === plotId) !== (-1);
        if (!exist) {
            tipAddGracePlots.push(plotId);
        }
    }
    GameModelManager.pushTipAddGracePlot = pushTipAddGracePlot;
    /**
     * 根据商品类型获得该商品对应的淘宝地址链接
     * @param type 商品类型
     * @returns 返回值为商品类型对应的商品地址
     */
    function getTaoBaoShopUrlByType(type) {
        let link = "";
        let cfg = simba_config_manager_1.ConfigManager.getAllConfig(TaoBaoShopUrlConfig_1.taoBaoShopUrlConfig);
        if (cfg) {
            for (const id in cfg) {
                if (cfg[id].type == type) {
                    link = cfg[id].websiteUrl;
                }
            }
        }
        return link;
    }
    GameModelManager.getTaoBaoShopUrlByType = getTaoBaoShopUrlByType;
    /**
     * 根据商品类型获得该商品对应的有赞地址链接
     * @param type 商品类型
     * @returns 返回值为商品类型对应的商品地址
     */
    function getYouZanShopUrlByType(type) {
        let link = "";
        let cfg = simba_config_manager_1.ConfigManager.getAllConfig(TaoBaoShopUrlConfig_1.taoBaoShopUrlConfig);
        if (cfg) {
            for (const id in cfg) {
                if (cfg[id].type == type) {
                    link = cfg[id].youZanUrl;
                }
            }
        }
        return link;
    }
    GameModelManager.getYouZanShopUrlByType = getYouZanShopUrlByType;
    /**
     * 根据网页链接跳转网页
     * @param url 要跳转的网页链接
     */
    function jumpToTaobaoShop(url) {
        if (GameConfig_1.channel == "dummy") {
            let mUrl = url.replace("taobao:", "https:");
            window.open(mUrl);
        }
        else {
            let packageName = "com.taobao.taobao";
            let errorTips = "您还没有安装淘宝客户端!";
            jsb.reflection.callStaticMethod('org/cocos2dx/javascript/AppActivity', 'jumpToTaobaoShop', "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", packageName, url, errorTips);
        }
    }
    GameModelManager.jumpToTaobaoShop = jumpToTaobaoShop;
    /**特殊剧情id数组 */
    const SpecialPlotIdArr = [AVG_1.SpecialPlotId.CustomPlotStart, AVG_1.SpecialPlotId.End, AVG_1.SpecialPlotId.ToBeContinued];
    /**根据剧情id获取剧情的内容 */
    async function getPlotContent(plotId) {
        let plotContent = undefined;
        let isSpecialPlot = SpecialPlotIdArr.findIndex((v) => v === plotId) !== (-1);
        if (isSpecialPlot) {
            cc.error("can not get special plot content, plotId = ", plotId);
            return undefined;
        }
        try {
            let plot = await AVG_1.getPlot(plotId);
            if (plot && plot.sentences && plot.sentences.length !== 0) {
                const sentence = plot.sentences[0];
                const content = sentence.content;
                if (content) {
                    plotContent = {
                        plotId: plotId,
                        roleId: sentence.roleId,
                        content: []
                    };
                    if (content.type === AVG_1.SentenceType.TEXT) {
                        plotContent.content.push(AVG_1.richNodesToCocosString(content.value));
                    }
                    else if (content.type === AVG_1.SentenceType.SELECT) {
                        for (let i = 0; i < content.value.length; i++) {
                            let value = content.value[i];
                            if (value.content && value.content.type === AVG_1.SentenceType.TEXT) {
                                plotContent.content.push(AVG_1.richNodesToCocosString(value.content.value));
                            }
                            else {
                                plotContent.content.push(value.summary);
                            }
                        }
                    }
                }
                else {
                    cc.error("plot has no content , plotId = ", plotId);
                }
            }
            else {
                cc.warn("plot has no sentence or no such plot , plotId = ", plotId);
            }
        }
        catch (error) {
            cc.error("getPlotContent error plotId = " + plotId + " error info = ", error);
            return undefined;
        }
        return plotContent;
    }
    GameModelManager.getPlotContent = getPlotContent;
    /**
     * 设置是否自动弹出公告界面
     * @param autoShow 是否自动弹出公告界面
     */
    function setAutoShowNotice(autoShow) {
        let autoShowNoticeInfo = {
            time: simba_sdk_1.TimeManager.getTime(),
            autoShow: autoShow,
        };
        AVG_1.GameRecord.globalVariables["AutoShowNoticeInfo"] = autoShowNoticeInfo;
        AVG_1.GameRecord.saveRecord();
    }
    GameModelManager.setAutoShowNotice = setAutoShowNotice;
    /**
     * 获取是否自动弹出公告界面
     * @returns 返回值为是否自动弹出公告界面
     */
    function getAutoShowNotice() {
        let autoShowNoticeInfo = AVG_1.GameRecord.globalVariables["AutoShowNoticeInfo"];
        let autoShow = true;
        if (autoShowNoticeInfo == undefined) {
            autoShow = true;
        }
        else {
            autoShow = autoShowNoticeInfo.autoShow;
            let isOver = checkOverdue(autoShowNoticeInfo.time);
            if (isOver) {
                autoShow = true;
                setAutoShowNotice(autoShow);
            }
        }
        return autoShow;
    }
    GameModelManager.getAutoShowNotice = getAutoShowNotice;
})(GameModelManager = exports.GameModelManager || (exports.GameModelManager = {}));

cc._RF.pop();