-
Notifications
You must be signed in to change notification settings - Fork 11
/
launcher.js
1923 lines (1732 loc) · 84.6 KB
/
launcher.js
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
var ___ga_uaid = "";
var updateDisabled = true;
function trackPageView(e, E) {
console.log('trackPageView:\ne='+e+'\nE='+E);
return
}
function trackEvent(e, E, t, r) {
var m = "<br>EVENT > e="+e+":E="+E+":t="+t+":r="+r;
console.log(m);
try {
debugLogMsg(m, !1);
} catch (e) { }
}
function CustomScroll(e) {
"use strict";
this.element = e,
this.setScrollPx(18),
this.init()
} !function () {
"use strict";
var e, E, t, r, a, _; ___ga_uaid && (e = window, E = document, t = "script", r = "ga", e.GoogleAnalyticsObject = r, e.ga = e.ga ||
function () { (e.ga.q = e.ga.q || []).push(arguments) }, e.ga.l = 1 * new Date,
a = E.createElement(t),
_ = E.getElementsByTagName(t)[0], a.async = 1, a.src = "http://www.google-analytics.com/analytics.js",
_.parentNode.insertBefore(a, _), ga("create",
___ga_uaid, "auto", { allowLinker: !0 }), ga("require", "linkid", "linkid.js"), ga("require", "displayfeatures"), ga("require", "linker"), ga("send", "pageview"))
}(),
CustomScroll.prototype.clear = function (e) {
"use strict";
this.element.off("mousewheel"),
this.element.off("scroll"),
this.element.off("keydown"),
this.sbox && (this.sbar && (this.sbar.off("mousedown"),
this.sbar.remove(),
this.sbar = null),
this.sbase && (this.sbase.off("mouseup"),
this.sbase.remove(),
this.sbase = null),
this.sbox.remove(),
this.sbox = null), e || this.scrollV(0)
},
CustomScroll.prototype.setScrollPx = function (e) { "use strict"; this.speed = -1 * e },
CustomScroll.prototype.hide = function (e) { "use strict"; this.sbox && (e = e || 100, this.sbox.fadeOut(e)) },
CustomScroll.prototype.show = function (e) { "use strict"; this.sbox && (e = e || 200, this.sbox.fadeIn(e)) },
CustomScroll.prototype.updateElement = function (e) {
"use strict";
if (this.height = this.element.innerHeight(), this.maxScroll = this.getMaxScroll(), e || this.scrollV(0), 0 < this.maxScroll) if (this.sbox) {
if (this.slaneHei = this.height - 4, this.sbox) { this.sbox.css("height", this.slaneHei + 2 + "px"); var E = $(this.element.offsetParent()[0]).offset(), t = this.element.offset(); this.sbox.css("left", t.left - E.left + this.element.innerWidth() - 11 + "px"), this.sbox.css("top", t.top - E.top + 1 + "px") } this.sbar && (this.sbarHei = Math.max(20, this.slaneHei * (this.height / (this.height + this.maxScroll))), this.sbarMaxY = this.slaneHei - this.sbarHei - 2, this.setScrollPx(Math.max(18, Math.min(30, this.sbarMaxY / 10))), this.sbar.css("height", this.sbarHei + "px"))
}
else this.initScrollBar();
else this.sbox && (this.sbar && (this.sbar.off("mousedown"), this.sbar.remove(), this.sbar = null), this.sbase && (this.sbase.off("mouseup"), this.sbase.remove(), this.sbase = null), this.sbox.remove(), this.sbox = null); this.onScroll()
},
CustomScroll.prototype.initScrollBar = function () { "use strict"; var a = this; this.slaneHei = this.height - 4, this.sbox = $('<div class="scroll_bar_box"></div>'), this.sbox.css("height", this.slaneHei + 2 + "px"); var e = $(this.element.offsetParent()[0]).offset(), E = this.element.offset(); this.sbox.css("left", E.left - e.left + this.element.innerWidth() - 11 + "px"), this.sbox.css("top", E.top - e.top + 1 + "px"), this.sbox.attr("unselectable", "on"), this.sbox.attr("onSelectStart", "return false;"), this.sbase = $('<div class="scroll_bar_box_base"></div>'), this.sbase.attr("unselectable", "on"), this.sbase.attr("onSelectStart", "return false;"), this.sbox.append(this.sbase), this.sbar = $('<div class="scroll_bar_box_body"></div>'), this.sbarHei = Math.max(20, this.slaneHei * (this.height / (this.height + this.maxScroll))), this.sbarMaxY = this.slaneHei - this.sbarHei - 2, this.setScrollPx(Math.max(18, Math.min(30, this.sbarMaxY / 10))), this.sbar.css("height", this.sbarHei + "px"), this.sbar.attr("unselectable", "on"), this.sbar.attr("onSelectStart", "return false;"), this.sbox.append(this.sbar), this.onScroll(), this.sbox.insertAfter(this.element), this.sbar.on("mousedown", function (e) { return a.startMY = e.clientY, a.startBY = a.sbarTop, $(document).on("mousemove", function (e) { var E = Math.max(0, Math.min(a.sbarMaxY, a.startBY - (a.startMY - e.clientY))) / a.sbarMaxY; a.scrollV(a.maxScroll * E) }), a.sbar.addClass("active"), !1 }), this.sbase.on("mouseup", function (e) { var E, t = e.offsetY; t < a.sbarTop ? E = Math.max(0, Math.min(a.sbarMaxY, a.sbarTop - a.sbarHei)) : a.sbarTop + a.sbarHei < t && (E = Math.max(0, Math.min(a.sbarMaxY, a.sbarTop + a.sbarHei))); var r = E / a.sbarMaxY; a.scrollV(a.maxScroll * r) }), $(document).mouseup(function () { $(document).off("mousemove"); try { a.sbar.removeClass("active") } catch (e) { } return !0 }) },
CustomScroll.prototype.init = function (e) { "use strict"; this.height = this.element.innerHeight(), this.maxScroll = this.getMaxScroll(), this.clear(e); var a = this; this.element.on("scroll", function () { a.onScroll() }), this.element.on("mousewheel", function (e, E, t, r) { r /= Math.abs(r), a.scrollAddV(r * a.speed), a.onScroll() }), this.element.attr("tabindex", "-1"), this.element.css("outline", 0), this.element.on("keydown", function (e) { var E, t = !1; switch (e.which) { case 36: a.scrollV(0), a.onScroll(); break; case 35: a.scrollV(a.maxScroll), a.onScroll(); break; case 38: a.scrollAddV(1 * a.speed * .5), a.onScroll(); break; case 40: a.scrollAddV(-1 * a.speed * .5), a.onScroll(); break; case 33: E = Math.max(0, Math.min(a.sbarMaxY, a.sbarTop - a.sbarHei)) / a.sbarMaxY, a.scrollV(a.maxScroll * E), a.onScroll(); break; case 34: E = Math.max(0, Math.min(a.sbarMaxY, a.sbarTop + a.sbarHei)) / a.sbarMaxY, a.scrollV(a.maxScroll * E), a.onScroll(); break; default: t = !0 }return t }), 0 < this.maxScroll && this.initScrollBar(), e && a.onScroll() },
CustomScroll.prototype.onScroll = function () { "use strict"; if (this.sbox) { var e = this.scrollV(); this.sbarTop = this.sbarMaxY * (e / this.maxScroll) + 2, this.sbar.css("top", this.sbarTop + "px") } },
CustomScroll.prototype.getMaxScroll = function () { "use strict"; return this.element.get(0).scrollHeight - this.element.get(0).offsetHeight },
CustomScroll.prototype.scrollAddV = function (e) { "use strict"; return this.scrollV(this.scrollV() + e) },
CustomScroll.prototype.scrollV = function (e) { "use strict"; return isNaN(e) || (e = Math.max(0, Math.min(e, this.maxScroll)), this.element.scrollTop(e)), this.element.scrollTop() }; var _EUCS = {};
function duc(e) {
"use strict";
return decodeURIComponent(_EUCS[e])
} !function () {
"use strict";
_EUCS.xhrspr = "<!--###content###-->",
_EUCS.dmsrvs = "<?xml version='1.0' encoding='UTF-8'><server_groups><group idx='1' nam='Localhost' cog='pre' /></server_groups>",
_EUCS.anch = "You can create a new character. <br> Press [Start Game] to create your character.",
_EUCS.cwpt = "Weapon",
_EUCS.pcst = "Last Online",
_EUCS.afac = "You do not have permission to do this.",
_EUCS.afde = "Character encoding not supported.",
_EUCS.afnsrv = "Select a server and press the [Log In] button.",
_EUCS.afipe = "Wrong ID/Password.",
_EUCS.af102 = "The server is busy at the moment.<br>Please try again later.",
_EUCS.af301 = "The ID you have entered is temporarily suspended.",
_EUCS.af304 = "Authentication has been temporarily halted due to entering multiple incorrect passwords.<br>Please wait an hour and log in again.",
_EUCS.aferr = "Unknown error occurred.",
_EUCS.af321 = "The security card data is different.",
_EUCS.afipl = "After entering your ID and Password,<br>select a server and press the [Log In] button.",
_EUCS.uflm0 = "The server is currently under maintenance and cannot be joined.<br>Please try again later.",
_EUCS.dmb0 = "Register now",
_EUCS.dmb1 = "Refresh",
_EUCS.dmb2 = "Delete",
_EUCS.dmb3 = "Cancel",
_EUCS.dmb4 = "Close",
_EUCS.dmb5 = "Yes",
_EUCS.dmb6 = "No",
_EUCS.dmb7 = "Add now",
_EUCS.dmb8 = "Ignore",
_EUCS.dmb9 = "Ignore",
_EUCS.dmt0 = "Trial course registration is required.<br>Register for a trial course below.<br>(You can register for free).",
_EUCS.dmt1 = "Once you have registered for the trial course,<br>please wait a moment and then press the [Refresh] button below.",
_EUCS.dmca0 = "Would you like to add a new character?<br>Press [Add now] below.",
_EUCS.dmca1 = "A new character slot will be requested momentarily,<br>please wait a few seconds and then press<br>the [Refresh] button below.",
_EUCS.dmcd0 = "The selected character will be deleted<br>",
_EUCS.dmcd1 = "<span class='uid'> (ID:",
_EUCS.dmcd2 = ") </span><br><div class='sp'></div>",
_EUCS.dmcd3 = "<span class='attention'>Deleted characters will not revert to [Ready to Hunt] status,<br>but will be completely deleted.</span> Proceed?",
_EUCS.dmcd4 = "<span class='notes'>[Warning]<br>You will lose the ability to add characters once an additional character has been deleted.<br>You will need to purchase a new<br>add character license to make one.</span>",
_EUCS.dmcd4_2 = "<span class='notes'>You're about to remove the last character.<br>If you delete all the characters, you will be provided<br>with one character under your basic contract guarantee!</span>",
_EUCS.dmcd5 = "<br>",
_EUCS.dmcd6 = ") </span> will be deleted.<br>",
_EUCS.dmcd7 = "<span class='attention'>Enter the ID of the selected character then click the <br> [Delete] button.</span><br><div class='sp'></div>",
_EUCS.dmcd8 = "<form action='javascript:void(0);'><input type='text' border='0' align='left' name='del_uid' id='del_uid'></form>",
_EUCS.dmcd9 = "The character could not be deleted.<br><div class='sp'></div><span class='attention'>The selected character ID and entered ID do not match.</span>",
_EUCS.dmcd10 = ")<br>is being deleted. <br> Please wait.",
_EUCS.dmcd11 = "This character cannot be deleted. <br> Please try again later.",
_EUCS.dmcd12 = "This character cannot be deleted. <br> A period of 7 days from the last deletion<br>must pass in order to delete all characters.",
_EUCS.dmcd13 = "<span class='attention'>One character is guaranteed and provided<br>under the terms of the basic contract</span> <br> All characters have been deleted. <br> You will be provided with one character<br>under your basic contract guarantee!</span><br><span class='notes'>※ A period of 7 days from today is required<br>in order to delete this character.</span>",
_EUCS.dmcd14 = "Character deleted.",
_EUCS.dmhl0 = "The Hunter Life Course has expired. <br> Please purchase the Hunter Life course<br>by clicking [Buy now]. <br> (Browser will open)",
_EUCS.dmhl1 = "Once you have purchased the Hunter Life Course, <br> please wait a moment and then <br> press the [Refresh] button below.",
_EUCS.dmgs0 = "Selected character <br>",
_EUCS.dmgs1 = ")</span><br><br>Log in and start the game <br> with the selected character?",
_EUCS.SIGN_EFAILED = "Failed to connect to authentication server.",
_EUCS.SIGN_EILLEGAL = "Authentication cancelled due to wrong input.",
_EUCS.SIGN_EALERT = "A processing error has occured with the authentication server.",
_EUCS.SIGN_EALERT_COOP = "The entered ID has not completed COG integration, <br> or a server was selected that you cannot log in to with this ID.",
_EUCS.SIGN_EABORT = "Internal process at the authentication server has crashed.",
_EUCS.SIGN_ERESPONSE = "Process terminated due to abnormal authentication response.",
_EUCS.SIGN_EDATABASE = "Failed to access database.",
_EUCS.SIGN_ESUSPEND = "This account has been temporarily suspended..",
_EUCS.SIGN_EELIMINATE = "This account has been permanently suspended.",
_EUCS.SIGN_ECLOSE_EX = "Login failed due to too much traffic.",
_EUCS.SIGN_EIPADDR = "You cannot connect to the game server from your region.",
_EUCS.SIGN_EOTHER = "Failed to authenticate ID.",
_EUCS.SIGN_EAPP = "Authentication failed with an unexpected error in the client.",
_EUCS.SIGN_EPASS = "Wrong ID/Password.",
_EUCS.SRV_MNT = "<span class='attention'>Unable to log in due to maintenance being performed.</span>"
}
(); var _EXT_MODE = "launcher", _MODE_BRANCH = !1;
function extPreTry() { "use strict"; _EXT_MODE = "launcher" }
function extCatchE() { "use strict"; _EXT_MODE = "" }
function extCatchReturn(e) {
"use strict";
return extCatchE(), e
}
function DoGetMhfBootMode() {
"use strict"; extPreTry();
try {
return window.external.getMhfBootMode()
}
catch (e) {
return extCatchReturn("_MHF_NORMAL")
}
}
function DoGetIniLastServerIndex() {
"use strict"; extPreTry();
try {
return window.external.getIniLastServerIndex()
}
catch (e) {
return extCatchReturn(0)
}
}
function DoSetIniLastServerIndex(e) {
"use strict";
try {
window.external.setIniLastServerIndex(e)
}
catch (e) { }
}
function DoGetServerListXml() {
"use strict"; extPreTry();
try {
return window.external.getServerListXml()
}
catch (e) {
return extCatchReturn(duc("dmsrvs"))
}
}
function DoGetMhfMutexNumber() {
"use strict"; extPreTry();
try {
return window.external.getMhfMutexNumber()
}
catch (e) {
return extCatchReturn(0)
}
}
function DoMinimizeWindow() {
"use strict";
DoPlaySound("IDR_WAV_OK");
try {
window.external.minimizeWindow()
} catch (e) { }
}
function DoCloseWindow() {
"use strict";
DoPlaySound("IDR_WAV_OK");
try {
window.external.closeWindow()
} catch (e) { }
}
function DoOpenMhlConfig() {
"use strict";
DoPlaySound("IDR_WAV_OK");
try {
window.external.openMhlConfig()
} catch (e) { }
}
function DoRestartMhf() {
"use strict";
DoPlaySound("IDR_WAV_OK");
try {
window.external.restartMhf()
} catch (e) { }
}
function DoOpenBrowser(e) {
"use strict";
try {
window.external.openBrowser(e)
} catch (e) { }
}
function DoBeginDrag(e) {
"use strict";
try {
window.external.beginDrag(e)
} catch (e) { }
}
function DoGetUserId() {
"use strict";
extPreTry();
try {
return window.external.getUserId() || ""
} catch (e) {
return extCatchReturn("")
}
}
function DoGetPassword() {
"use strict";
extPreTry();
try {
return window.external.getPassword() || ""
} catch (e) {
return extCatchReturn("")
}
}
function DoLoginCog(e, E, t) {
"use strict";
try {
return window.external.loginCog(e, E, t)
} catch (e) { }
}
function DoLoginHangame() {
"use strict";
try {
window.external.loginHangame()
} catch (e) { }
}
function DoLoginDmm() {
"use strict";
try {
window.external.loginDmm()
} catch (e) { }
}
function DoGetLastAuthResult() {
"use strict";
extPreTry();
try {
return window.external.getLastAuthResult()
} catch (e) {
return extCatchReturn("NULL")
}
}
function DoGetSignResult() {
"use strict";
extPreTry();
try {
return window.external.getSignResult()
} catch (e) {
return extCatchReturn("SIGN_EFAILED")
}
}
function DoStartUpdate() {
"use strict";
extPreTry();
try {
if (updateDisabled) {
return false
} else {
return window.external.startUpdate()
}
} catch (e) {
return extCatchReturn(!0)
}
}
function DoGetUpdatePercentageTotal() {
"use strict";
extPreTry();
try {
return window.external.getUpdatePercentageTotal()
} catch (e) {
return extCatchReturn(0)
}
}
function DoGetUpdatePercentageFile() {
"use strict";
extPreTry();
try {
return window.external.getUpdatePercentageFile()
} catch (e) {
return extCatchReturn(0)
}
}
function DoGetUpdateStatus() {
"use strict";
try {
return String(window.external.getUpdateStatus())
} catch (e) {
return "UM_UPDATE_OK"
}
}
function DoGetAccountRights() {
"use strict";
extPreTry();
try {
return window.external.getAccountRights()
} catch (e) {
return extCatchReturn("")
}
}
function DoGetLauncherReturnCode() {
"use strict";
extPreTry();
try {
return String(window.external.getLauncherReturnCode())
} catch (e) {
return extCatchReturn("NULL")
}
}
function DoExitLauncher() {
"use strict";
try {
window.external.exitLauncher()
} catch (e) { }
}
function DoCheckIsEnableSessionId() {
"use strict";
try {
return window.external.isEnableSessionId()
} catch (e) {
return !0
}
}
function DoGetCharacterInfo() {
"use strict";
extPreTry();
try {
return window.external.getCharacterInfo()
} catch (e) {
return extCatchReturn("")
}
}
function DoDeleteCharacter(e) {
"use strict";
extPreTry();
try {
return window.external.deleteCharacter(e)
} catch (e) {
return extCatchReturn(!0)
}
}
function DoSelectCharacter(e, E) {
"use strict";
try {
window.external.selectCharacter(e, E)
} catch (e) { }
}
function DoPlaySound(e) {
"use strict";
try { window.external.playSound(e) } catch (e) { }
}
function DoExtractLog(e) {
"use strict";
try {
return window.external.extractLog(e)
} catch (e) {
return ""
}
}
function DoDebugGetIniUserId() {
"use strict";
if (!_MODE_BRANCH)
return "";
try {
return window.external.debugGetIniUserId() || ""
} catch (e) {
return ""
}
}
function DoDebugGetIniPassword() {
"use strict";
if (!_MODE_BRANCH)
return "";
try {
return window.external.debugGetIniPassword() || ""
} catch (e) {
return ""
}
}
var _EXE_MUTEX = 0,
_EVT_PHASE = "prepare",
_STORAGE = {},
_TRG_STORAGE_KEY = {},
_HOSTS = {},
_COG_MODE = !0,
_NHN_MODE = !0,
_IE_STATE = {},
_CS_ELMS = {},
_ABS_DOC = null,
_IS_MODAL = !1;
function switchEvtPhase(e) { "use strict"; _EVT_PHASE = e }
function addEvent(e) {
"use strict";
trackEvent("launcher", _EVT_PHASE, e)
}
var _KEY_ACT_MODAL = function () { }, _KEY_ACT_DEF;
function resetKeyActDefMode() {
"use strict";
_KEY_ACT_DEF = function (e) {
switch (e.which) {
case 9:
return !1
}return !0
}
}
function initScrollBar(e) {
"use strict";
var E = $(e);
E.css("overflow", "hidden"), _CS_ELMS[e] = new CustomScroll(E)
}
function updateScrollBar(e, E) {
"use strict";
_CS_ELMS[e] ? _CS_ELMS[e].init(E) : initScrollBar(e)
}
function updateScrollBarElm(e, E) {
"use strict";
_CS_ELMS[e] && _CS_ELMS[e].updateElement(E)
}
function hideScrollBar(e, E) {
"use strict";
_CS_ELMS[e] && _CS_ELMS[e].hide(E)
}
function showScrollBar(e, E) {
"use strict";
_CS_ELMS[e] && _CS_ELMS[e].show(E)
}
function openDefBrowser(e) {
"use strict";
DoPlaySound("IDR_WAV_OK"), trackPageView(e, ""), DoOpenBrowser(e)
}
function getAbsPath(e, E) {
"use strict";
var t = (E = E || location.href).split("/");
if (t.pop(), E = t.join("/") + "/", !_ABS_DOC) {
var r = $('<iframe style="display:none;"></iframe>');
$(document.body).prepend(r), _ABS_DOC = r[0].contentWindow.document
}
return _ABS_DOC.open(), _ABS_DOC.write('<head><base href="' + E + '" /></head><body><a href="' + e + '"></a></body>'), _ABS_DOC.close(), _ABS_DOC.getElementsByTagName("a")[0].href
}
function overrideAnker(e, E) {
"use strict";
for (
var t = (e = e || $("#launcher_body")).find("a"), r = 0;
r < t.length; r++)"_blank" === $(t[r]).attr("target") ? $(t[r]).attr("href", 'javascript:openDefBrowser("' + getAbsPath($(t[r]).attr("href"), E) + '");') : (2 === String($(t[r]).attr("href")).split("/sp/news/").length ? $(t[r]).attr("href", 'javascript:loadtoInnerElement("' + getAbsPath($(t[r]).attr("href"), E) + '");') : 2 !== String($(t[r]).attr("href")).split("openDefBrowser").length && $(t[r]).attr("href", 'javascript:openDefBrowser("' + getAbsPath($(t[r]).attr("href"), E) + '");'), $(t[r]).attr("onclick", "DoPlaySound('IDR_WAV_OK');")), $(t[r]).removeAttr("target")
}
function getIEVer() {
"use strict";
var e = { isIE: !1, version: 0 }, E = window.navigator.userAgent.toLowerCase();
if (E.match(/(msie|MSIE)/) || E.match(/(T|t)rident/)) {
e.isIE = !0;
var t = E.match(/((msie|MSIE)\s|rv:)([\d\.]+)/)[3]; e.version = parseInt(t, 10)
} trackEvent("launcher", "ie", e.version)
}
function modeCheck(e, E) {
"use strict";
return e.indexOf(E) + E.length === e.length
}
function isTrEnabled() {
"use strict";
var e = DoGetAccountRights(); e = e.toLowerCase();
var E = $("<div>" + e + "</div>"), t = !1;
return E.find("right").each(function (e, E) {
if ("trial" === $(E).attr("name"))
return !(t = !0)
}), t
}
function isHlEnabled() {
"use strict";
var e = DoGetAccountRights(); e = e.toLowerCase();
var E = $("<div>" + e + "</div>"), t = !1;
return E.find("right").each(function (e, E) {
if ("basic" === $(E).attr("name"))
return !(t = !0)
}), t
}
function readCookie() {
"use strict";
var e = ""; _STORAGE = {};
try { e = document.cookie } catch (e) { }
if ("" !== e) {
e = e.split(";");
for (var E = 0; E < e.length; E++) {
var t = e[E].split("="), r = t[0].split(" ").join("");
_TRG_STORAGE_KEY[r]=r && (_STORAGE[r] = decodeURIComponent(t[1]));
}
} _STORAGE["cogid" + _EXE_MUTEX] || (_STORAGE["cogid" + _EXE_MUTEX] = ""), _STORAGE["pw" + _EXE_MUTEX] || (_STORAGE["pw" + _EXE_MUTEX] = "")
}
function writeCookie() {
"use strict";
var e = [];
for (var E in _STORAGE)
_STORAGE.hasOwnProperty(E) && e.push(E + "=" + _STORAGE[E]);
if (e.length) {
var t = new Date;
t.setDate(t.getDate() + 365);
try {
for (var r = 0; r < e.length; r++)
document.cookie = e[r] + "; expires=" + t.toGMTString()
} catch (e) { }
}
}
function delCoockie(e) {
"use strict";
if (_STORAGE[e])
try { document.cookie = e + "=" + _STORAGE[e] + "; expires=" + new Date(0).toGMTString() }
catch (e) { }
} resetKeyActDefMode(), function () {
"use strict";
getIEVer(), _EXE_MUTEX = DoGetMhfMutexNumber(), (_TRG_STORAGE_KEY = {})["cogid" + _EXE_MUTEX] = !0
}(), function () {
"use strict";
var e, E, t, r = location.host;
if (_COG_MODE = -1 !== r.indexOf(""), _NHN_MODE = -1 !== r.indexOf("hangame-"), t = _COG_MODE ? "cog-" : _NHN_MODE ? "hangame-" : "dmm-", modeCheck(r, "mhf-z.jp")) _MODE_BRANCH = !1, e = "", E = "jp";
else {
if (!modeCheck(r, "mhf-z.net"))
return;
_MODE_BRANCH = !0, e = -1 !== r.indexOf("stage") ? "stage-" : "debug-", E = "net"
}
}();
var _BNR_INT = 5e3, _BNR_CRR = 0, _BNR_TOI = null;
function startBnrSwitchTimer() {
"use strict";
clearBnrSwitchTimer(), _BNR_TOI = setTimeout(function () {
_BNR_CRR++, $("#launcher_bnr .dots ul li").length <= _BNR_CRR && (_BNR_CRR = 0), switchBnr(_BNR_CRR)
}, _BNR_INT)
}
function clearBnrSwitchTimer() {
"use strict";
if (_BNR_TOI) {
try {
clearTimeout(_BNR_TOI)
} catch (e) { } _BNR_TOI = null
}
}
function getBnrElm(e) {
"use strict";
return $("#launcher_bnr .dots ul li .dot")[e]
}
function switchBnr(e) {
"use strict";
clearBnrSwitchTimer(), _BNR_CRR = e, $("#launcher_bnr .dots ul li .dot").removeClass("crr");
var E = getBnrElm(e);
$(E).addClass("crr"),
$("#launcher_bnr .bnr").html(""),
$("#launcher_bnr .bnr").append($($(E).find("img")[0]).clone());
try {
$("#launcher_bnr .bnr img").removeAttr("onerror")
} catch (e) { }
$("#launcher_bnr .bnr img").hide(),
$("#launcher_bnr .bnr").append($("<div class=\"frame\" onClick=return false\"DoPlaySound('IDR_WAV_OK');('" + $(E).attr("href") + "');\" onMouseOver=\"DoPlaySound('IDR_WAV_SEL');\"></div>")),
$("#launcher_bnr .bnr img").fadeIn(), startBnrSwitchTimer()
}
function retryBnrImgLoad(e) {
"use strict";
var E = parseInt($(e).attr("cnt") || "0", 10);
E++, $(e).attr("cnt", String(E));
var t = String(e.src).split("?").shift();
setTimeout(function () { e.src = t + "?c=" + E }, _BNR_INT)
}
function beginLoadBnr() {
"use strict";
var s = "./bnr/launcher.html"; $("#launcher_bnr .bnr").hover(function () {
clearBnrSwitchTimer(),
$(this).find("img").fadeTo(300, .9)
}, function () {
$(this).find("img").fadeTo(200, 1), startBnrSwitchTimer()
}), $.ajax({
type: "GET",
url: s,
dataType: "text",
cache: !1,
success: function (e) {
var E = e.split(duc("xhrspr"));
3 === E.length && ($("#launcher_bnr .dots ul").html(""),
E = (E = (E = (E = E[1].split('src="/').join('src_root="/')).split('src="').join('srcpre="')).split('srcpre="img/').join('srcpre="/sp_contents/banner/img/')).split('src_root="/').join('src="/'),
(E = $("<ul>" + E + "</ul>")).find("li").each(function (e, E) {
var t = $("#launcher_bnr .dots ul li").length;
if (5 <= t)
return !1; var r = $(E).find("a");
if (_COG_MODE) {
if (r.hasClass("cogHide") || r.hasClass("nhnOnly") || r.hasClass("dmmOnly"))
return !0
} else if (_NHN_MODE) {
if (r.hasClass("nhnHide") || r.hasClass("cogOnly") || r.hasClass("dmmOnly"))
return !0
} else if (r.hasClass("dmmHide") || r.hasClass("cogOnly") || r.hasClass("nhnOnly"))
return !0;
var a = getAbsPath(r.attr("href"), s), _ = getAbsPath($(r.find("img")[0]).attr("srcpre"), s);
$("#launcher_bnr .dots ul").append($('<li><div class="dot" onClick="DoPlaySound(\'IDR_WAV_OK\'); switchBnr(' + t + ');" href="' + a + '"><img src="' + _ + '" onerror="retryBnrImgLoad(this);"/></div></li>'))
}), E = null, switchBnr(0),
$("#launcher_bnr").show())
}
})
}
var _INF_URL = "./launcher_list.html", _INF_SEL_LI = "#launcher_info_list", _INF_SEL_US = "#launcher_info_list img, #launcher_info_list a", _INF_SEL_BACK = "#launcher_bnr,#launcher_info_list", _INF_SEL_DETAIL = "#launcher_info_detail", _INF_SEL_FRAME = _INF_SEL_DETAIL + " .article_frame", _INF_SEL_BODY = _INF_SEL_FRAME + " .article", _INF_SEL_DUS = "#launcher_info_detail img, #launcher_info_detail a";
function formattingInfoDetail(e, r) {
"use strict";
var E = ""; -1 !== e[0].indexOf('showLocalNaviInformation("bug_t")') ? E = " bug_trouble" : -1 !== e[0].indexOf('showLocalNaviInformation("info")') ? E = " info" : -1 !== e[0].indexOf('showLocalNaviInformation("g_event")') ? E = " game_event" : -1 !== e[0].indexOf('showLocalNaviInformation("campaign")') ? E = " campaign" : -1 !== e[0].indexOf('showLocalNaviInformation("system")') ? E = " system" : -1 !== e[0].indexOf('showLocalNaviInformation("o_news")') && (E = " other_news"), e[1] = e[1].split('src="').join('srcpre="');
var t = '<div class="article_category' + E + '"></div>' + e[1] + '<div style="width:100%; height:20px;"></div>'; $(_INF_SEL_BODY).html(t), $(_INF_SEL_BODY + " a").each(function (e, E) {
$(E).removeAttr("target");
var t = String($(E).attr("href")); 2 === t.split("/sp/news/").length ? $(E).attr("href", 'javascript:loadtoInnerElement("' + getAbsPath(t, r) + '");') : 0 === t.indexOf("#") ? $(E).attr("href", 'javascript:scrollToInfoDetail("' + t.substr(1) + '");') : $(E).attr("href", 'javascript:openDefBrowser("' + getAbsPath(t, r) + '");')
}), $(_INF_SEL_BODY + " img").each(function (e, E) { $(E).attr("src", getAbsPath($(E).attr("srcpre"), r)), $(E).removeAttr("srcpre") }), $([_INF_SEL_BODY + " script", _INF_SEL_BODY + " iframe", _INF_SEL_BODY + " video", _INF_SEL_BODY + " audio", _INF_SEL_BODY + " source", _INF_SEL_BODY + " video", _INF_SEL_BODY + " input"].join(",")).each(function (e, E) { $(E).attr("src", getAbsPath($(E).attr("srcpre"), r)), $(E).removeAttr("srcpre") }), $(_INF_SEL_BODY).css("visibility", "hidden"), $(_INF_SEL_BACK).css("visibility", "hidden"), $(_INF_SEL_DETAIL).show(), $($(_INF_SEL_FRAME)[0]).scrollTop(0), $(_INF_SEL_BODY).css("visibility", "visible"), hideScrollBar(_INF_SEL_LI), $(_INF_SEL_DUS).attr("unselectable", "on"), $(_INF_SEL_DUS).attr("onSelectStart", "return false;"), updateScrollBar(_INF_SEL_FRAME)
}
function hideInfoDetail() { "use strict"; DoPlaySound("IDR_WAV_OK"), $(_INF_SEL_DETAIL).hide(), $(_INF_SEL_BODY).html(""), $(_INF_SEL_BACK).css("visibility", "visible"), showScrollBar(_INF_SEL_LI) }
function scrollToInfoDetail(e) { "use strict"; var E = 0; "contents_top" !== e && (E = ($(_INF_SEL_BODY + ' a[name="' + e + '"]') || $(_INF_SEL_BODY + " #" + e + "]")).offset().top, E -= $(_INF_SEL_BODY).offset().top); $(_INF_SEL_FRAME).animate({ scrollTop: E }) }
function loadtoInnerElement(t) { "use strict"; _IE_STATE.isIE && _IE_STATE.version < 8 ? openDefBrowser(t) : $.ajax({ type: "GET", url: t, dataType: "text", cache: !1, error: function () { openDefBrowser(t) }, success: function (e) { var E = e.split(duc("xhrspr")); 3 === E.length ? (trackPageView(t, ""), formattingInfoDetail(E, t)) : openDefBrowser(t) } }) }
function beginLoadInfo() {
"use strict";
$.ajax({
type: "GET",
url: _INF_URL,
dataType: "text",
cache: !1,
success: function (e) {
var E = e.split(duc("xhrspr")); 3 === E.length && ($(_INF_SEL_LI).html(E[1]), $(_INF_SEL_LI + " a").each(function (e, E) {
$(E).removeAttr("target");
var t = String($(E).attr("href")); 2 === t.split("/sp/news/").length ? $(E).attr("href", 'javascript:loadtoInnerElement("' + getAbsPath(t, _INF_URL) + '");') : $(E).attr("href", 'javascript:openDefBrowser("' + getAbsPath(t, _INF_URL) + '");'), $(E).attr("onclick", "DoPlaySound('IDR_WAV_OK');")
}), initScrollBar(_INF_SEL_LI), $(_INF_SEL_LI).show(), updateScrollBar(_INF_SEL_LI), $(_INF_SEL_US).attr("unselectable", "on"), $(_INF_SEL_US).attr("onSelectStart", "return false;"))
}
})
}
var _CHR_CRR = 0,
_CHR_DEF = 0,
_CHR_UNIT_Y = [0, 18, 60, 102, 120],
_CHR_UNIT_I = Math.floor(.5 * _CHR_UNIT_Y.length),
_CHR_SCR = !1,
_CHR_UID = null,
_CHR_HR = null,
_CHR_DEL_TOI = null,
_CHR_DEL_STATE = "NULL",
_CHR_DEL_NAME = "",
_CHR_DEL_UID = null,
_CHR_SEL_BOX = "#launcher_character_select",
_CHR_SEL_UNIT = _CHR_SEL_BOX + " .unit",
_CHR_SEL_UP = _CHR_SEL_BOX + " .scroll.up",
_CHR_SEL_DOWN = _CHR_SEL_BOX + " .scroll.down",
_CHR_SEL_ADD = _CHR_SEL_BOX + " .btn_add",
_CHR_SEL_DEL = _CHR_SEL_BOX + " .btn_del",
_CHR_IS_WAIT = !1;
function convWpType(e) {
"use strict";
var E = {
"Sword%20%26%20Shield": "onehandsword",
"%E7%89%87%E6%89%8B%E5%89%A3": "onehandsword",
"Dual%20Swords": "twinsword",
"%E5%8F%8C%E5%89%A3": "twinsword",
"Great%20Sword": "largesword",
"%E5%A4%A7%E5%89%A3": "largesword",
"Long%20Sword": "longsword",
"%E5%A4%AA%E5%88%80": "longsword",
"Hammer": "hammer",
"%E3%83%8F%E3%83%B3%E3%83%9E%E3%83%BC": "hammer",
"Hunting%20Horn": "horn",
"%E7%8B%A9%E7%8C%9F%E7%AC%9B": "horn",
"Lance": "lance",
"%E3%83%A9%E3%83%B3%E3%82%B9": "lance",
"Gunlance": "gunlance",
"%E3%82%AC%E3%83%B3%E3%83%A9%E3%83%B3%E3%82%B9": "gunlance",
"Tonfa": "senryukon",
"%E7%A9%BF%E9%BE%8D%E6%A3%8D": "senryukon",
"Switch%20Axe%20F": "slashaxe",
"%E3%82%B9%E3%83%A9%E3%83%83%E3%82%B7%E3%83%A5%E3%82%A2%E3%83%83%E3%82%AF%E3%82%B9": "slashaxe",
"%E3%82%B9%E3%83%A9%E3%83%83%E3%82%B7%E3%83%A5%E3%82%A2%E3%83%83%E3%82%AF%E3%82%B9F": "slashaxe",
"%E3%82%B9%E3%83%A9%E3%83%83%E3%82%B7%E3%83%A5%E3%82%A2%E3%83%83%E3%82%AF%E3%82%B9%EF%BC%A6": "slashaxe",
"Magnet%20Spike": "magnetspike",
"%E3%83%9E%E3%82%B0%E3%83%8D%E3%83%83%E3%83%88%E3%82%B9%E3%83%91%E3%82%A4%E3%82%AF": "magnetspike",
"Light%20Bowgun": "lbowgun",
"%E3%83%A9%E3%82%A4%E3%83%88%E3%83%9C%E3%82%A6%E3%82%AC%E3%83%B3": "lbowgun",
"Heavy%20Bowgun": "hbowgun",
"%E3%83%98%E3%83%93%E3%82%A3%E3%83%9C%E3%82%A6%E3%82%AC%E3%83%B3": "hbowgun",
"Bow": "bow",
"%E5%BC%93": "bow"
};
return E[encodeURIComponent(e)] || ""
}
function convLastDateStr(e) {
"use strict";
var E = new Date(1e3 * e);
return E.getFullYear() + "." + (E.getMonth() + 1) + "." + E.getDate()
}
function entityRef(e) {
"use strict";
return e = (e = (e = (e = e.split("&").join("&")).split("<").join("<")).split(">").join(">")).split('"').join(""")
}
function createCharUnit(e, E, t, r, a, _, s, n) {
"use strict"; _ = _.split("F").join("F"); E = E.split("狩人申請可能").join("Ready to Hunt");
var o = $('<div class="unit" uid="' + t + '" name="' + E + '" hr="' + r + '" to="0"></div>');
if (o.append($('<div class="num n' + e + '"></div>')), o.append($('<div class="sign"></div>')), o.append($('<p class="name">' + entityRef(E) + "</p>")), 0 === r) o.addClass("new"), o.append($('<p class="new">' + duc("anch") + "</p>"));
else {
var i = convWpType(_); o.addClass(i), o.append($('<div class="icon' + ("" !== i ? " " + i : "") + '"></div>')), o.append($('<p class="wp">' + duc("cwpt") + "<br>" + translateWeapon(_) + "</p>")), o.append($('<p class="data">HR' + r + (0 < a ? " GR" + a : "") + " " + ("M" === s ? "♂" : "♀") + "<br>ID:" + t + "<br>" + duc("pcst") + ":" + convLastDateStr(n) + "</p>"))
}
return o.append($('<div class="cover"></div>')), o.click(function () {
$(this).hasClass("crr") && gameStart()
}), o
}
function removeStampe() { }
function addStamp() { }
function getCrrChar() {
"use strict";
return $($(_CHR_SEL_UNIT)[_CHR_CRR])
}
function convTop2Z(e) {
"use strict";
var E = Math.max(0, Math.min(120, parseInt($(e).css("top"), 10)));
return 100 - Math.abs(E - 60) / 60 * 100
}
function scrollCharUni(e, r) {
"use strict";
if (!_CHR_SCR) {
_CHR_SCR = !0;
var a = "easeOutBounce" !== (r = r || "easeOutBounce") ? 1 : 400; _CHR_CRR += e;
var E = $(_CHR_SEL_UNIT).length; _CHR_CRR = Math.max(0, Math.min(_CHR_CRR, E - 1)), "easeOutBounce" === r && (updateScrollBtnState(), updateCharCtrlBtnState()), $(_CHR_SEL_UNIT).each(function (E, t) {
$(t).stop();
var e = E - _CHR_CRR + _CHR_UNIT_I; e < 0 ? ($(t).css("top", _CHR_UNIT_Y[0] + "px"), $(t).css("display", "none"), $(t).css("z-index", "0"), $(t).removeClass("crr"), $($(t).children(".cover")[0]).stop().fadeTo(100, 1), removeStampe(t)) : _CHR_UNIT_Y.length <= e ? ($(t).css("top", _CHR_UNIT_Y[_CHR_UNIT_Y.length - 1] + "px"), $(t).css("display", "none"), $(t).css("z-index", "0"), $(t).removeClass("crr"), $($(t).children(".cover")[0]).stop().fadeTo(100, 1), removeStampe(t)) : ($(t).css("display", "block"), $($(t).children(".cover")[0]).stop().fadeTo(a, Math.min(.85, .65 * Math.abs(e - _CHR_UNIT_I))), $(t).animate({ top: _CHR_UNIT_Y[e] }, {
duration: a, easing: r, progress: function () {
var e = convTop2Z(t); $(this).css("z-index", e), 60 < e ? E === _CHR_CRR && ($($(t).children(".cover")[0]).stop().fadeTo(100, 0), $(t).addClass("crr"), addStamp(t)) : ($(t).removeClass("crr"), removeStampe(t))
}, complete: function () { _CHR_SCR = !1, E === _CHR_CRR && "easeOutBounce" !== r && (_CHR_CRR !== _CHR_DEF ? scrollCharUni(1, "swing") : (addStamp(t), updateScrollBtnState(), updateCharCtrlBtnState(), $(_CHR_SEL_BOX).show())) }
}))
})
}
}
function updateScrollBtnState() {
"use strict";
var e = $(_CHR_SEL_UNIT).length; 1 < e ? (0 !== _CHR_CRR ? $(_CHR_SEL_UP).removeClass("disabled") : $(_CHR_SEL_UP).addClass("disabled"), _CHR_CRR !== e - 1 ? $(_CHR_SEL_DOWN).removeClass("disabled") : $(_CHR_SEL_DOWN).addClass("disabled"), $(_CHR_SEL_BOX + " .scroll").show()) : $(_CHR_SEL_BOX + " .scroll").hide(), kdCharSelMode()
}
function updateCharCtrlBtnState() { "use strict"; $(_CHR_SEL_UNIT).length < 11 ? ($(_CHR_SEL_ADD).removeClass("disabled"), $(_CHR_SEL_ADD).fadeTo(100, 1), $(_CHR_SEL_ADD).attr("onMouseOver", "DoPlaySound('IDR_WAV_SEL');")) : ($(_CHR_SEL_ADD).attr("onMouseOver", ""), $(_CHR_SEL_ADD).removeAttr("onMouseOver"), $(_CHR_SEL_ADD).addClass("disabled"), $(_CHR_SEL_ADD).fadeTo(200, .4)), "0" !== getCrrChar().attr("hr") ? ($(_CHR_SEL_DEL).removeClass("disabled"), $(_CHR_SEL_DEL).fadeTo(100, 1), $(_CHR_SEL_DEL).attr("onMouseOver", "DoPlaySound('IDR_WAV_SEL');")) : ($(_CHR_SEL_DEL).attr("onMouseOver", ""), $(_CHR_SEL_DEL).removeAttr("onMouseOver"), $(_CHR_SEL_DEL).addClass("disabled"), $(_CHR_SEL_DEL).fadeTo(200, .4)) }
function kdCharSelMode() {
"use strict";
_KEY_ACT_DEF = function (e) {
if (_IS_MODAL)
return !1;
var E = !0;
switch (e.which) {
case 38:
case 33: _CHR_SCR || !$(_CHR_SEL_UP).is(":visible") || $(_CHR_SEL_UP).hasClass("disabled") || $(_CHR_SEL_UP).click(), E = !1;
break;
case 40:
case 34: _CHR_SCR || !$(_CHR_SEL_DOWN).is(":visible") || $(_CHR_SEL_DOWN).hasClass("disabled") || $(_CHR_SEL_DOWN).click(), E = !1;
break;
case 13: _CHR_IS_WAIT || (_CHR_IS_WAIT = !0, $(_CHR_SEL_BOX + " .btn_start").click()), E = !1;
break;
case 9: E = !1
}return E
}
}
function translateWeapon(e) {
var E = {
'Sword & Shield': 'Sword & Shield',
'片手剣': 'Sword & Shield',
'Dual Blades': 'Dual Blades',
'Dual Swords': 'Dual Blades',
'双剣': 'Dual Blades',
'Great Sword': 'Great Sword',
'大剣': 'Great Sword',
'Long Sword': 'Long Sword',
'太刀': 'Long Sword',
'Hammer': 'Hammer',
'ハンマー': 'Hammer',
'Hunting Horn': 'Hunting Horn',
'狩猟笛': 'Hunting Horn',
'Lance': 'Lance',
'ランス': 'Lance',
'Gunlance': 'Gunlance',
'ガンランス': 'Gunlance',
'Tonfa': 'Tonfa',
'穿龍棍': 'Tonfa',
'Switch Axe F': 'Switch Axe F',
'スラッシュアックスF': 'Switch Axe F',
'Magnet Spike': 'Magnet Spike',
'マグネットスパイク': 'Magnet Spike',
'Heavy Bowgun': 'Heavy Bowgun',
'ヘビィボウガン': 'Heavy Bowgun',
'Light Bowgun': 'Light Bowgun',
'ライトボウガン': 'Light Bowgun',
'Bow': 'Bow',
'弓': 'Bow'
};
return E[e] || "Unknown"
}
function showCharSelector() {
"use strict";
switchEvtPhase("standby"), _CHR_DEF = _CHR_CRR = 0, _CHR_IS_WAIT = !1,
$("#launcher_login_panel").hide(),
$("#launcher_update_progress").hide(),
$("#launcher_log_area").hide(), $(_CHR_SEL_BOX).hide(),
$("#launcher_logout").show(),
$(_CHR_SEL_BOX + " .units").html(""), $(_CHR_SEL_BOX + " .scroll").hide();
var e = DoGetCharacterInfo();
e = (e = e.split("'").join('"')).split("'").join("'"), e = $("<div>" + e + "</div>");
var t = $(e.find("CharacterInfo")[0]).attr("defaultUid");
e.find("Character").each(function (e, E) {
$(E).attr("uid") === t && (_CHR_DEF = e),
$(_CHR_SEL_BOX + " .units").append(createCharUnit(
e + 1,
$(E).attr("name"),
$(E).attr("uid"),
parseInt($(E).attr("HR"), 10),
parseInt($(E).attr("GR"), 10),
$(E).attr("weapon"),
$(E).attr("sex"),
parseInt($(E).attr("lastLogin"), 10)
))
}), $(_CHR_SEL_UNIT).each(function (e, E) {
$(E).removeClass("crr"),
$(E).css("display", "none"),
$(E).css("z-index", "0");
var t = e - _CHR_CRR + _CHR_UNIT_I;
t < 0 ? $(E).css("top", _CHR_UNIT_Y[0] + "px") : _CHR_UNIT_Y.length <= t ? $(E).css("top", _CHR_UNIT_Y[_CHR_UNIT_Y.length - 1] + "px") : ($(E).css("top", _CHR_UNIT_Y[t] + "px"), $(E).css("display", "block"), $(E).css("z-index", convTop2Z(E)), t === _CHR_UNIT_I ? ($(E).addClass("crr"), $($(E).children(".cover")[0]).stop().fadeTo(0, 1), addStamp(E)) : $($(E).children(".cover")[0]).stop().fadeTo(0, Math.min(.75, .45 * Math.abs(t - _CHR_UNIT_I))))
}), _CHR_CRR !== _CHR_DEF ? scrollCharUni(1, "swing") : (updateScrollBtnState(), updateCharCtrlBtnState(), $(_CHR_SEL_BOX).show())
}
function charDelPolling() {
"use strict"; stopCharDelPolling();
var e = DoGetLastAuthResult();
if (e !== _CHR_DEL_STATE)
switch (_CHR_DEL_STATE = e) {
case "AUTH_NULL":
case "AUTH_PROGRESS":
case "AUTH_SUCCESS":
case "AUTH_ERROR_NET":
case "AUTH_ERROR_ACC":
case "AUTH_ERROR_PWD":
case "DEL_PROGRESS":
break;
case "DEL_SUCCESS":
return 1 < $(_CHR_SEL_UNIT).length ? showCompleteDelCharDialog() : showAddGuaranteeCharDialog(), showCharSelector(), void (_CHR_DEL_UID = null);
case "DEL_ERROR_NET":
case "DEL_ERROR_IVL":
case "DEL_ERROR_MNC":
return void showFailDelCharDialog($(_CHR_SEL_UNIT).length)
}_CHR_DEL_TOI = setTimeout(function () {
charDelPolling()
}, 1e3)
}
function stopCharDelPolling() {
"use strict";
if (_CHR_DEL_TOI) {
try {
clearTimeout(_CHR_DEL_TOI)
} catch (e) { } _CHR_DEL_TOI = null
}
}
function charDelReset() {
"use strict";
_CHR_DEL_UID = null, hideModalDialog()
}
function charDelete() {
"use strict";
stopCharDelPolling(), _CHR_DEL_STATE = "NULL",
DoDeleteCharacter(_CHR_DEL_UID), _CHR_DEL_TOI = setTimeout(function () {
charDelPolling()
}, 1e3)
}
function waitGameStart() {
"use strict";
DoSelectCharacter(_CHR_UID, _CHR_UID),
DoPlaySound("IDR_WAV_LOGIN"),
$("#launcher_game_start_wait").show(), hideModalDialog(), setTimeout(function () {
DoExitLauncher()
}, 500)
}
function checkHasHL() {
"use strict";
100 <= _CHR_HR ? isHlEnabled() ? waitGameStart() : (DoPlaySound("IDR_WAV_OK"),
showGetHLDialog()) : waitGameStart()
}
function gameStartCalcel() {
"use strict";