difenduandada
2024-12-31 34abe6963b344c882358274957f4b992456fee40
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
// --------------------------------------------------------------------
// @author: xxx@syg.com(必填, 创建模块的人员)
// @description:
//      冒险主控制器
// <br/>Create: 2019-05-09 14:14:52
// --------------------------------------------------------------------
var AdventureEvent = require("adventure_event");
var BattleConst         = require("battle_const");
var MainuiController = require("mainui_controller");
var MainuiConst = require("mainui_const");
var BattleController = require("battle_controller");
 
var AdventureController = cc.Class({
    extends: BaseController,
    ctor: function () {
    },
 
    // 初始化配置数据
    initConfig: function () {
        var AdventureModel = require("adventure_model");
 
        this.model = new AdventureModel();
        this.model.initConfig();
    },
 
    // 返回当前的model
    getModel: function () {
        return this.model;
    },
 
    // 注册监听事件
    registerEvents: function () {
    },
 
    // 注册协议接受事件
    registerProtocals: function () {
        this.RegisterProtocal(20600, this.handle20600)    //基本信息
        this.RegisterProtocal(20601, this.handle20601)    //BUFF信息
        this.RegisterProtocal(20602, this.handle20602)    //房间信息
        this.RegisterProtocal(20603, this.handle20603)    //服务端通知更新指定房间信息
        this.RegisterProtocal(20604, this.handle20604)    //获取当前伙伴信息数据
        this.RegisterProtocal(20605, this.handle20605)    //设置上阵伙伴信息
        this.RegisterProtocal(20606, this.handle20606)    //每一层结算
        this.RegisterProtocal(20607, this.handle20607)    //使用3个主要技能的
        this.RegisterProtocal(20608, this.handle20608)    //进去指定房间
        this.RegisterProtocal(20609, this.handle20609)    //技能信息
        this.RegisterProtocal(20610, this.handle20610)    //选中伙伴
        this.RegisterProtocal(20611, this.handle20611)    //一击必杀请求
        this.RegisterProtocal(20612, this.handle20612)    //冒险重置
 
        this.RegisterProtocal(20620, this.handle20620)    //事件反馈
        this.RegisterProtocal(20621, this.handle20621)    //猜拳结果反馈
        this.RegisterProtocal(20622, this.handle20622)    //buff信息查看
        this.RegisterProtocal(20623, this.handle20623)    //答题信息
        this.RegisterProtocal(20624, this.handle20624)    //怪物信息
 
        this.RegisterProtocal(20625, this.handle20625)    //获得技能,主要是用于表现效果处理
 
        this.RegisterProtocal(20627, this.handle20627)    //NPC对话序号
        this.RegisterProtocal(20628, this.handle20628)    //NPC对话结果
        this.RegisterProtocal(20630, this.handle20630)    //宝箱打开结果
        this.RegisterProtocal(20631, this.handle20631)    //神秘商店事件
 
        this.RegisterProtocal(20632, this.handle20632)    //神秘商店总览
        this.RegisterProtocal(20633, this.handle20633)    //神秘商店购买
 
        this.RegisterProtocal(20634, this.handle20634)
        this.RegisterProtocal(20635, this.handle20635)
    },
 
    isMonster:function(event_type){
        return event_type == AdventureEvent.EventType.boss || event_type == AdventureEvent.EventType.mon || event_type == AdventureEvent.EventType.mon1 || event_type == AdventureEvent.EventType.mon2 || event_type == AdventureEvent.EventType.mon3;
    },
 
    openAnswerView:function(value,data){
        if(value == false){
            if(this.adventure_answer_view != null){
                this.adventure_answer_view.close();
                this.adventure_answer_view = null;
            }
        }else{
            if(this.adventure_answer_view == null){
                this.adventure_answer_view = Utils.createClass("adventure_evt_answer_window",this);
            }
            if(this.adventure_answer_view && this.adventure_answer_view.isOpen() == false){
                this.adventure_answer_view.open(data);
            }
        }
    },
 
    //==============================--
    //desc:进入冒险的主入口
    //@return 
    //==============================--
    requestEnterAdventure:function(){
        var form_list = this.model.getFormList();
        if(form_list == null || Utils.next(form_list) == null){
            this.openAdventureFormWindow(true);
        }else{
            MainuiController.getInstance().requestOpenBattleRelevanceWindow(BattleConst.Fight_Type.Adventrue) 
        }
    },
 
    // ==============================--
    // desc:打开冒险站前布阵界面
    // @status:
    // @return 
    // ==============================--
    openAdventureFormWindow:function(status){
        if(!status){
            if(this.form_window){
                this.form_window.close();
                this.form_window = null;
            }
        }else{
            if(this.form_window == null){
                this.form_window = Utils.createClass("adventure_form_window",this);
            }
            if(this.form_window && this.form_window.isOpen() == false){
                this.form_window.open();
            }
        }
    },
 
    
    // -- 引导需要
    // function AdventureController:getAdventureRoot()
    //     if this.adventure_window then
    //         return this.adventure_window.root_wnd
    //     end
    // end
 
    // -- 引导需要下一层的指引
    // function AdventureController:getNextAlertRoot()
    //     if this.adventure_window then
    //         var alert = this.adventure_window:getAlert()
    //         if alert then
    //             return alert.root_wnd
    //         end
    //     end
    // end
 
    openAdventureMainWindow:function(status){
        if(!status){
            if(this.adventure_window){
                this.adventure_window.close();
                this.adventure_window = null;
            }
        }else{
            // 没有布阵是不给进去的
            var form_list = this.model.getFormList();
            if(form_list == null || Utils.next(form_list) == null){
                // print("跳转进入神界冒险有误,当前还没有布阵 ============>")
                return;
            }
            // 没有基础数据也不做响应
            var base_data = this.model.getAdventureBaseData();
            if(base_data == null)return;
 
            if(this.adventure_window == null){
                this.adventure_window = Utils.createClass("adventure_main_window",this);
            }
            if(this.adventure_window && this.adventure_window.isOpen() == false){
                this.adventure_window.open();
            }
        }
    },
 
    openWindowByConfig:function(data){
        if(data == null || data.config == null)return;
        var config = data.config;
        if(this.isMonster(config.evt_type)){//boss或者怪物
            if(this.model.allHeroIsDie() == true){
                message(Utils.TI18N("英雄全部阵亡,本轮冒险已结束!"));
                return;
            }
            this.openEvtViewByType(true, "adventure_evt_challenge_window", data);
        }else if(config.evt_type == AdventureEvent.EventType.box){//B宝箱
            this.openEvtViewByType(true, "adventure_evt_box_window", data);
        }else if(config.evt_type == AdventureEvent.EventType.finger_guessing){//猜拳
            this.openEvtViewByType(true, "adventure_evt_fighterguess_window", data);
        }else if(config.evt_type == AdventureEvent.EventType.answer){//答题
            this.openEvtViewByType(true, "adventure_evt_answer_start_window", data);
        }else if(config.evt_type == AdventureEvent.EventType.npc){//npc事件
            this.openEvtViewByType(true, "adventure_evt_npc_window", data);
        }else if(config.evt_type == AdventureEvent.EventType.freebox){//免费宝箱
            this.openEvtViewByType(true, "adventure_evt_free_box_window", data);
        }else if(config.evt_type == AdventureEvent.EventType.npc_talk){//npc对话
            this.openEvtViewByType(true, "adventure_evt_other_npc_window", data);
        }else if(config.evt_type == AdventureEvent.EventType.shop){//神秘商店
            this.openEvtViewByType(true, "adventure_evt_shop_window", data);
        }else if(config.evt_type == AdventureEvent.EventType.effect){//特效事件
            this.send20620(data.id, AdventureEvent.AdventureEvenHandleType.handle, {});
        }
    },
 
    // 打开各种事件面板
    openEvtViewByType:function(status, ref_class, data, extendparam, is_other){
        if(status == false){
            if(this.adventure_evt_view!=null){
                this.adventure_evt_view.close();
                this.adventure_evt_view = null;
            }
        }else{
            if(data == null)return;
            var ref_class = ref_class || "adventure_evt_challenge_window" 
            if(this.adventure_evt_view == null){
                this.adventure_evt_view = Utils.createClass(ref_class,this);
            }
            if(this.adventure_evt_view && this.adventure_evt_view.isOpen() == false){
                this.adventure_evt_view.open(data);
            }
        }
    },
 
    // ==============================--
    // desc:冒险商店
    // @status:
    // @return 
    // ==============================--
    openAdventrueShopWindow:function(status){
        if(!status){
            if(this.shop_window){
                this.shop_window.close();
                this.shop_window = null;
            }
        }else{
            if(this.shop_window == null){
                this.shop_window = Utils.createClass("adventure_shop_window",this);
            }
            if(this.shop_window && this.shop_window.isOpen() == false){
                this.shop_window.open();
            }
        }
    },
 
    // ==============================--
    // desc:一击必杀界面
    // @status:
    // @return 
    // ==============================--
    openAdventureShotKillWindow:function(status, config){
        if(!status){
            if(this.shot_kill_window){
                this.shot_kill_window.close();
                this.shot_kill_window = null;
            }
        }else{
            if(config == null)return;
            if(this.shot_kill_window == null){
                this.shot_kill_window = Utils.createClass("adventure_shot_kill_window",this);
            }
            if(this.shot_kill_window && this.shot_kill_window.isOpen() == false){
                this.shot_kill_window.open(config);
            }
        }
    },
 
    // ==============================--
    // desc:使用药品
    // @status:
    // @return 
    // ==============================--
    openAdventureUseHPWindow:function(status, config){
        if(!status){
            if(this.use_hp_window){
                this.use_hp_window.close();
                this.use_hp_window = null;
            }
        }else{
            if(config == null)return;
            if(this.use_hp_window == null){
                this.use_hp_window = Utils.createClass("adventure_use_hp_window",this);
            }
            if(this.use_hp_window && this.use_hp_window.isOpen() == false){
                this.use_hp_window.open(config);
            }
        }
    },
 
    // 事件操作
    send20620:function(room_id,action,ext_list){
        var protocal = {};
        protocal.room_id = room_id;
        protocal.action = action;
        protocal.ext_list = ext_list || {};
        this.SendProtocal(20620, protocal);
    },
 
    handle20620:function(data){
        message(data.msg);
        if(data.code == 2){
            this.openEvtViewByType(false);
        }
    },
 
    // 请求房间信息
    send20602:function(){
        var protocal = {};
        this.SendProtocal(20602, protocal);
    },
 
    // 房间信息返回
    handle20602:function(data){
        this.model.setRoomList(data);
    },
 
    // 服务端通知更新指定房间信息
    handle20603:function(data){
        this.model.updateRoomList(data);
    },
 
    send20604:function(){
        this.SendProtocal(20604, {});
    },
 
    // 获取当前伙伴信息数据
    handle20604:function(data){
        this.model.updateFormPartner(data.partners, data.id);
        // if(NEEDCHANGEENTERSTATUS == 2 && !this.first_enter){//如果是1就跳转到出具
        //     this.first_enter  = true;
        //     MainuiController.getInstance().changeMainUIStatus(MainuiConst.btn_index.drama_scene);
        // }
    },
 
    // 请求布阵
    requestSetForm:function(plist){
        var protocal = {};
        protocal.plist = plist || {};
        this.SendProtocal(20605, protocal);
    },
 
    handle20605:function(data){
        if(data.code == 1){
            this.openAdventureFormWindow(false);
            // 请求进入
            MainuiController.getInstance().requestOpenBattleRelevanceWindow(BattleConst.Fight_Type.Adventrue);
        }
    },
 
    send20608:function(room_id){
        var protocal = {};
        protocal.room_id = room_id;
        this.SendProtocal(20608, protocal);
    },
 
    handle20608:function(data){
        message(data.msg);
        if(data.code == 1){
            gcore.GlobalEvent.fire(AdventureEvent.HandleRoomOverEvent, data.room_id);
        }
    },
 
    // 基本信息
    send20600:function(){
        var protocal = {};
        this.SendProtocal(20600, protocal);
    },
 
    // 基本信息返回
    handle20600:function(data){
        if(data) {
            this.model.setAdventureBaseData(data);
        }
    },
 
    // buff信息
    send20601:function(){
        this.SendProtocal(20601, {});
    },
 
    // buff信息返回
    handle20601:function(data){
        if(data){
            this.model.setBuffData(data);
        }
    },
    
    handle20622:function(data){
        if(data){
            gcore.GlobalEvent.fire(AdventureEvent.Update_Evt_Buff_Info,data);
        }
    },
 
    handle20621:function(data){
        if(data){
            gcore.GlobalEvent.fire(AdventureEvent.Update_Evt_Guess_Result,data);
        }
    },
 
    handle20623:function(data){
        if(data){
            gcore.GlobalEvent.fire(AdventureEvent.Update_Evt_Answer_Info,data);
        }
    },
    
 
    handle20628:function(data){
        if(data){
            message(data.msg);
            gcore.Timer.set(function () {
                this.openEvtViewByType(false);
                this.showGetItemTips(data.items);
            }.bind(this), 1000, 1);
        }
    },
 
    handle20630:function(data){
        if(data){
            gcore.GlobalEvent.fire(AdventureEvent.Update_Evt_Box_Result_Info,data);
        }
    },
 
    handle20627:function(data){
        if(data){
            gcore.GlobalEvent.fire(AdventureEvent.Update_Evt_Npc_Info,data);
        }
    },
 
    handle20631:function(data){
        if(data.type == 1){//点击房间事件时候请求20协议之后返回处理
            gcore.GlobalEvent.fire(AdventureEvent.Update_Evt_Shop_Info,data);
        }else if(data.type == 2){//点击技能商店直接弹出
            this.openAdventureEvtShopView(true, data.list);
        }
    },
 
    // ==============================--
    // desc:主动打开神秘商店
    // @status:
    // @data:
    // @return 
    // ==============================--
    openAdventureEvtShopView:function(status, data){
        if(!status){
            if(this.shop_evt_window){
                this.shop_evt_window.close();
                this.shop_evt_window = null;
            }
        }else{
            if(this.shop_evt_window == null){
                this.shop_evt_window = Utils.createClass("adventure_evt_shop_window",this);
            }
            if(this.shop_evt_window && this.shop_evt_window.isOpen() == false){
                if(data){
                    data.is_auto = true;
                }
                this.shop_evt_window.open(data);
            }
        }
    },
 
    // ==============================--
    // desc:冒险中飘字处理
    // @items:
    // @is_guess:是否是猜拳结果
    // @ret:猜拳的结果
    // @return 
    // ==============================--
    showGetItemTips:function(items, is_guess, ret){
        if(items){
            var str = "";
            for(var i in items){
                var v = items[i];
                if(str != ""){
                    str = str + ","
                }
                var item_config = Utils.getItemConfig(v.bid);
                if(gdata("item_data","data_assets_id2label",v.bid)){
                    str = cc.js.formatStr("%s<img src=%s></img><color=#289b14>x%s</color>", str, item_config.icon, v.num);
                }else{
                    var BackPackConst = require("backpack_const");
                    str = cc.js.formatStr("%s<color=%s>%s</color><color=#289b14>x%s</color>", str, BackPackConst.quality_color(item_config.quality), item_config.name, v.num);
                }
            }
            if(is_guess == true){
                ret = ret || 0;
                if(ret == 0){//平
                    str = cc.js.formatStr(Utils.TI18N("平局!太可惜了,%s还你"), str);
                }else if(ret == 1){//赢
                    str = cc.js.formatStr(Utils.TI18N("好吧,这%s归你了"), str);
                }else{
                    str = cc.js.formatStr(Utils.TI18N("看你这么可怜,还你%s吧"), str);
                }
            }else{
                str = cc.js.formatStr(Utils.TI18N("获取%s"), str);
            }
 
            Utils.playButtonSound("c_get");
            message(str);
        }
    },
 
    // 冒险每一层结算数据
    openAdventureFloorResultWindow:function(status, data){
        if(!status){
            if(this.floor_result_window){
                this.floor_result_window.close();
                this.floor_result_window = null;
            }
        }else{
            if(data == null || data.items_list == null)return;
            if(this.floor_result_window == null){
                this.floor_result_window = Utils.createClass("adventure_floor_result_window",this);
            }
            if(this.floor_result_window && this.floor_result_window.isOpen() == false){
                this.floor_result_window.open(data);
            }
        }
    },
 
    //  服务端主动推送的结算界面
    handle20606:function(data){
        this.openAdventureFloorResultWindow(true, data);
    },
 
    // ==============================--
    // desc:请求技能信息
    // @return 
    // ==============================--
    send20609:function(){
        this.SendProtocal(20609, {});
    },
 
    // ==============================--
    // desc:使用3个技能
    // @skill_id:
    // @val:
    // @return 
    // ==============================--
    send20607:function(skill_id, val){
        var protocal = {};
        protocal.skill_id = skill_id;
        protocal.val = val;
        this.SendProtocal(20607, protocal);
    },
 
    // ==============================--
    // desc:使用技能
    // time:2019-01-24 04:57:32
    // @data:
    // @return 
    // ==============================--
    handle20607:function(data){
        message(data.msg);
        if(data.code == 1){
            this.openAdventureShotKillWindow(false);
            this.openAdventureUseHPWindow(false);
        }
    },
 
    //  请求技能信息,这里就不缓存了
    send20609:function(data){
        this.SendProtocal(20609, {});
    },
 
    //  技能信息
    handle20609:function(data){
        if(data){
            gcore.GlobalEvent.fire(AdventureEvent.UpdateSkillInfo, data.skill_list);
        }
    },
 
    requestSelectPartner:function(id){
        var protocal = {};
        protocal.id = id;
        this.SendProtocal(20610, protocal);
    },
 
    //  选中伙伴返回
    handle20610:function(data){
        // -- message(data.msg)
        if(data.code == 1){
            this.model.updateSelectPartnerID(data.id);
        }
    },
 
    //  设置怪物血量
    handle20624:function(data){
        gcore.GlobalEvent.fire(AdventureEvent.UpdateMonsterHP, data.hp_per);
    },
 
    // ==============================--
    // desc: 请求一击必杀的信息列表
    // @return 
    // ==============================--
    send20611:function(){
        this.SendProtocal(20611, {});
    },
    
    handle20611:function(data){
        gcore.GlobalEvent.fire(AdventureEvent.UpdateShotKillInfo, data.room_list);
    },
 
    // ==============================--
    // desc:请求神秘商店总览
    // @return 
    // ==============================--
    requestShopTotal:function(){
        this.SendProtocal(20632, {});
    },
 
    // ==============================--
    // desc:神秘商店总览
    // @data:
    // @return 
    // ==============================--
    handle20632:function(data){
        gcore.GlobalEvent.fire(AdventureEvent.UpdateShopTotalEvent, data.list);
    },
 
    // ==============================--
    // desc:请求购买商店总店
    // @id:
    // @return 
    // ==============================--
    requestBuyShopItem:function(id){
        var protocal = {};
        protocal.id = id;
        this.SendProtocal(20633, protocal);
    },
 
    // ==============================--
    // desc:购买神秘商店
    // @data:
    // @return 
    // ==============================--
    handle20633:function(data){
        message(data.msg);
        if(data.code == 1){
            gcore.GlobalEvent.fire(AdventureEvent.UpdateShopItemEvent, data.id);
        }
    },
 
    // 宝箱奖励展示
    send20634:function(){
        this.SendProtocal(20634,{});
    },
 
    handle20634:function(data){
        this.model.setAdventureBoxStatus(data);
        gcore.GlobalEvent.fire(AdventureEvent.UpdateBoxTeskEvent,data);
    },
 
    // 领取宝箱
    send20635:function(id){
        var proto = {};
        proto.id = id;
        this.SendProtocal(20635,proto);
    },
 
    handle20635:function(data){
        message(data.msg);
    },
 
    // 打开宝箱界面
    openAdventureBoxRewardView:function(status,kill_master){
        if(status == true){
            if(this.box_reward_window == null){
                this.box_reward_window = Utils.createClass("adventure_box_reward_window",this);
            }
            if(this.box_reward_window && this.box_reward_window.isOpen() == false){
                this.box_reward_window.open(kill_master);
            }
        }else{
            if(this.box_reward_window){
                this.box_reward_window.close();
                this.box_reward_window = null;
            }
        }
    },
 
    // ==============================--
    // desc:获得技能
    // @data:
    // @return 
    // ==============================--
    handle20625:function(data){
        gcore.GlobalEvent.fire(AdventureEvent.GetSkillForEffectAction,data.id, data.skill_id);
    },
 
    // ==============================--
    // desc:冒险重置,这里需要判断是不是在当前界面,是不是在战斗中
    // @data:
    // @return 
    // ==============================--
    handle20612:function(data){
        var ui_fight_type = MainuiController.getInstance().getUIFightType();
        if(ui_fight_type == MainuiConst.ui_fight_type.sky_scene){
            var is_in_fight = BattleController.getInstance().isInFight();
            if(is_in_fight){//如果是在战斗中,则等战斗结束之后,弹出提示
                if(this.battle_exit_event == null){
                    this.battle_exit_event = gcore.GlobalEvent.bind(EventId.EXIT_FIGHT,(function(combat_type){
                        if(combat_type == BattleConst.Fight_Type.Adventrue){
                            this.showAdventureReset();
                        }
                    }).bind(this))
                }
            }else{
                this.showAdventureReset();
            }
        }
    },
 
    showAdventureReset:function(){
        if(this.battle_exit_event){
            gcore.GlobalEvent.unbind(this.battle_exit_event);
            this.battle_exit_event = null;
        }
        MainuiController.getInstance().changeMainUIStatus(MainuiConst.btn_index.main_scene);   
        gcore.Timer.set(function () {
            var msg = Utils.TI18N("神界冒险已重置,是否重新进入?");
            var CommonAlert = require("commonalert");
            CommonAlert.show(msg, Utils.TI18N("确定"),function(){
                this.requestEnterAdventure();
            }.bind(this), Utils.TI18N("取消"))
        }.bind(this), 200, 1);
    },
 
});
 
module.exports = AdventureController;