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
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
M.,hc@sÙddlZddlZddlTddlZddlTddlZddlZddlZddlZddl    j
Z
ddl m Z m Z mZmZmZmZddlTddlZedƒZddlmZddlZddlZddlTddlZddlmZmZmZddlZddl Z ddl!Z!ddl"Z"ddl#Z#ddl$Z$ddl%Z%ddl&Z&ddl'Z'ddl(m)Z)m*Z*ddl+Z+ddl,m-Z-m.Z.m/Z/m0Z0dd    l1m2Z2m3Z3m4Z4m5Z5m6Z6ddl7Z7ddl8Z8ddl9Z9ddl:Z:d
d d d ddgZ;dZ<dZ=dZ>ej?a?e@dƒ\ZAZBZCZDd„ZEddlFZFeFjGƒaHeFjGƒaId„ZJd„ZKd„ZLde9j9fd„ƒYZMdS(iÿÿÿÿN(t*(tgetADOExceptionCounttgetSIDErrorCnttaddADOExceptionCounttseqtfix_outgoingTexttfix_incomingTextsConfig.DBConfig(t    string_at(tCommFunctmylogt
CommFuncEx(tDataServerGameDatatDataServerPlayerData(tGlobalFunctionst DBControllerterrort
DataDumper(t
MMORPGPacktRecvPackProtocoltSendPackProtocoltMergeServerRecvProtocoltMergeServerSendProtocoltweekdaytyeartmonthtdaythourtminuteiiicCs¶ddl}tj}tj}||f}d}d}d}y6tjƒ}|jtjjt    j
ƒdƒƒ|j ddƒ}|j ddƒ}tj }    |j|j |jƒ}
|
j|ƒd||    |f} |
j| ƒ|
j|ƒ} tjd    | ƒt| ƒ} d}| r.| d
r.| d }n||krZtjd ||    ||fƒn tjd ƒ|
jƒWn7tk
r˜}tjd|ƒntjdƒnX||fS(NiÿÿÿÿitsGameVersion.initconfigtGameIDtVersionsGameVersion:%s|%s|%ss%IDDispatch  CheckGameVersion  recv:%stresulttversionsTCheckGameVersion,gameID=%s,groupID=%s,curVersion=%s is not equal to centerVersion=%ss!IDDispatch  CheckGameVersion  OK!s1IDDispatch  CheckGameVersion Connect Exception %ss6IDDispatch  CheckGameVersion Connect unknown Exception(tsockettDBConfigtIDDispatchServerIPtIDDispatchServerPortt ConfigParsertreadtostpathtjoinR tgetServerConfigPathtgettGroupIDtAF_INETt SOCK_STREAMtconnecttsendtrecvR    tinfotevaltPegasusCollectorProxyt ErrorReporttcloset    ExceptionR(R"thosttporttaddrtBUF_SIZEt
curVersiont centerVersiont    cfGameVertgameIDtgroupIDtclienttdatatdataRecvt
resultDictte((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytCheckGameVersionJsB           "              cCs˜tjƒt|_tjdƒddl}ddl}tj    }tj
}||f}d}yë|j|j |j ƒ}|j |ƒd}    |j|    ƒ|j|ƒ}
tjd|
ƒt|
ƒ} | r<| dr<| d} | d} g}x/t| | d    ƒD]}|ji|d
6ƒqW|t}|j|ƒq<n|jƒWn7tk
rm}tjd |ƒntjd ƒnXt|_tjƒdS( Ns IDDispatch  CallDispatchPlayerIDiÿÿÿÿitPIDsIDDispatch  recv:%sR tminIDtmaxIDitPlayerIDs5IDDispatch  CallDispatchPlayerID Connect Exception %ss:IDDispatch  CallDispatchPlayerID Connect unknown Exception(t lockPlayerIDtacquiretTruetisDispatchingPlayerIDR    R3R"ttimeR#R$R%R.R/R0R1R2R4txrangetappendtUCN_Dispatch_PlayerIDtinsertR7R8RtFalsetrelease(tdbtselfR"RPR9R:R;R<RBRCRDRERIRJtrecstidt
collectionRF((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytCallDispatchPlayerIDysD
                   
 
 
 
    
cCs®tjƒt|_tjdƒddl}ddl}tj    }tj
}||f}d}    y|j|j |j ƒ}
|
j |ƒd} |
j| ƒ|
j|    ƒ} tjd| ƒt| ƒ} | rR| drR| d}| d}g}x/t||d    ƒD]}|ji|d
6ƒqW|t}|j|ƒ|j||||ƒqRn|
jƒWn7tk
rƒ}tjd |ƒntjd ƒnXt|_tjƒdS( Ns IDDispatch  CallDispatchFamilyIDiÿÿÿÿitFIDsIDDispatch  recv:%sR RIRJitFamilyIDs5IDDispatch  CallDispatchFamilyID Connect Exception %ss:IDDispatch  CallDispatchFamilyID Connect unknown Exception(t lockFamilyIDRMRNtisDispatchingFamilyIDR    R3R"RPR#R$R%R.R/R0R1R2R4RQRRtUCN_Dispatch_FamilyIDRTtCallBackToSendFamilyIDPackR7R8RRURV(RWtfromPackttypeRXR"RPR9R:R;R<RBRCRDRERIRJRYRZR[RF((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytCallDispatchFamilyIDŸsF
                   
 
 
 
     
cCsÃx¼ttƒD]®\}}||dkr/q nt||ƒtkrHdSt||ƒ}t|ƒtkr|ƒd}|||kr dSq n|||kr¦q n|||krºtStSWt    S(Ns-i(
t    enumeratetATTR_CALL_TIMEthasattrRNtgetattrRdtinttDef_Cmp_Greatert Def_Cmp_Lowert Def_Cmp_Equ(tcurTimettimeInfotindextcallObjt
curCallObjtwday((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytCompareActTimeÍs" t
UserCtrlDBcBsïeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z    d„Z
d    „Z d
„Z d „Z d „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z e!d„Z"e!d „Z#d!„Z$d"„Z%d#„Z&d$„Z'd%„Z(d&„Z)d'„Z*d(„Z+d)„Z,d*„Z-d+„Z.d,„Z/d-„Z0d.„Z1d/„Z2d0„Z3e!d1„Z4e!d2„Z5d3„Z6d4„Z7d5„Z8d6„Z9d7„Z:d8„Z;d9„Z<d:„Z=d;„Z>e?d<d=„Z@d>„ZAd?„ZBd@„ZCdA„ZDdB„ZEdC„ZFdD„ZGdE„ZHdF„ZIdG„ZJdH„ZKdI„ZLdJ„ZMdK„ZNdL„ZOdM„ZPdN„ZQdO„ZRdP„ZSdQ„ZTdR„ZUdS„ZVdT„ZWdU„ZXdV„ZYdW„ZZdX„Z[dY„Z\dZ„Z]d[„Z^d\„Z_d]„Z`d^„Zad_„Zbd`„Zcda„Zddb„Zedc„Zfdd„Zgde„Zhdf„Zidg„Zjdh„Zkdi„Zldj„Zmdk„Zndl„Zodm„ZpRS(ncCs–tjj|dƒt|_d|_tjr@tj    ƒ|_
ntj tj ƒ|_
t|_ t|_d|_tƒ|_tƒ|_|jƒdS(NRui(tCtrlDBt__init__RUt    ConnectedtNoneRWR#tbase64RtBase64StringManipulatort
translatortEncodeStringManipulatortencodingROR`t    loginHeapRPtloginStartTimetlastCleanMergePlayerTimet    connectDB(RX((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRwìsZ                          
cCstS(N(t IsMergeServer(RX((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRƒXscCs»tj}|sdStƒ}d}||j|kr9dS||_x[|jƒD]M\}}|t|tkruqOn||t|krqOn|j|ƒqOWtj    dt
|ƒƒdS(Niôs!PopOfflineMergePlayer hascnt = %s( t
PyGameDatatg_mergeRegisterPlayerDictRPRtitemstMergeRegPInfoIndex_LogoutTimetMergeRegPInfoIndex_LoginTimetpopR    tdebugtlen(RXR…Rnt Def_CleanTimetaccIDtpackInfo((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytPopOfflineMergePlayer^s             cCsÃ|js¿tjdtjtjfƒtjtjtjdtƒ|_    t
j tj tj d|j    ƒsldS|j    tj|_t|_tjdtjtjfƒtjdƒ|jƒndS(Ns!!!!!!!!!!!connect %s:%stauto_start_requestt
connections!!!!!!!!!!!connect %s:%s ok!slogin on user db ok!(RxR    R3R#t
USER_DB_IPt USER_DB_PORTtpymongot
ConnectionRUR‘R t LoginMongoDBt userdb_usert
userdb_pwdt USER_DB_NAMERWRNt onConnectedOK(RX((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR‚vs    !!      cCs t|_dS(N(RURx(RX((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyt
disconnect†scCs*tjs&tt_|jƒtƒndS(N(R„tg_UserCtrlDBFirstInitRNt_UserCtrlDB__PlayerBackupSaveRG(RX((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRš‰s
        
 
cCs!|j}|jƒr"|jƒnd}tj|jƒ|ƒ\}}tjd|ƒ|tj    krœ|j
dƒ}|j ƒ|j ||ƒ|j ƒn|tjkrâ|j
dƒ}|j ƒ|j||ƒ|j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UpdateNewGuyCardStatetgstSaveGameServerDatatgstGetGameServerPlayerDatatgstGMCommandListReqtgstPlayerLogintgstSaveGameServerPlayerSaveDatat    gstUpdatetgstSavePlayerInfot gstInsertAcctgstPlayerIDMarkDeletedt
gstGetCoint gstCoinChangetgstCheckPlayerExisttgstOnDaytgstSavePlayerGMOPertgstGetExpiationCounttgstGetPetExpiationCounttgstGetExpiationtgstGetPetExpiationtgstUpdateServerDataVersionNOtgstMapServerInfotgstUpdateTotalSavePointtgstGetPlayerMailStatetgstGetMailDetailtgstGetPlayerMailtgstAddPlayerMailByAccIDt gstDeleteMailt gstUpdateMailtgstQueryCanSendMailtgstAccIDSendPrizetgstCheckItemPrizetgstCheckLoadAcct gstAddAccItemtgstUpdateTelLockStatetgstUpdateAccAdulttgstAddExpiationtgstAddPetExpiationtgstServerMergeDeleteRoletgstServerMergeUpdateAccStatetgstServerMergeChangeNametgstInsertImpeachtgstGMToolCmdUserDBRequesttgstMergerChildToCentertgstPrepareCreateRoles%s not processed!({RWRƒRRtReadBYTEt    getBufferR    RŠt CommonDefineRžt GetFuncGradetStarttOnDiapatchFamilyIDtEndRŸtOnGeneralDBOperRNR tOnGameServerToDBLogicR¡tOnMergeQueryRegisterResultR¢tOnMergeRegisterPlayerByCacheR£tOnMergeChildToCenterPlayerDataR¤tOnQueryNewGuyCardStateR¥tOnQueryRechargeR¦tOnFinishRechargeR§tonCheckUpdateNewGuyCardStateR¨tonSaveGameServerDataR©tonGetGameServerPlayerDataRªtonGMCmdListReqR«tonAuthenticationtgstGetGameServerPlayerLoginDataR¬tonSaveGameServerPlayerSaveDataR­t$onSaveMapServerPlayerDataMergeServertonSaveMapServerPlayerDataR®tOnSavePlayerInfoR¯t OnInsertAccR°tOnPlayerIDMarkDeletedR±t    OnGetCoinR²t OnCoinChangeR³tOnCheckPlayerExistR´tOnDayRµtOnSavePlayerGMOPerR¶tOnGetExpiationCountR·tOnGetPetExpiationCountR¸tOnGetExpiationR¹tOnGetPetExpiationRºtOnUpdateServerDataVersionNOR»tOnMapServerInfoR¼tOnUpdateTotalSavePointR½tOnGetPlayerMailStateR¾tOnGetMailDetailR¿tOnGetPlayerMailRÀtOnAddPlayerMailByAccIDRÁt OnDeleteMailRÂt OnUpdateMailRÃtOnQueryCanSendMailRÄtOnAccIDSendPrizeRÅtOnCheckItemPrizeRÆtOnCheckLoadAccRÇt OnAddAccItemRÈtOnUpdateTelLockStateRÉtOnUpdateAccAdultRÊtOnAddExpiationRËtOnAddPetExpiationRÌtOnServerMergeDeleteRoleRÍtOnServerMergeUpdateAccStateRÎtOnServerMergeChangeNameRÏtOnInsertImpeachRÐtOnGMToolCmdUserDBRequestRÑtOnMergerChildToCenterRÒtOnPrepareCreateRoletwarningt outputString(RXtpackRWtpost requestTypet
oFuncGrade((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytrequestLogicProcess“s’      
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
#
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cCs{tjƒ}tj|_||_x+t||dƒD]}|jj|ƒq5Wt    |jƒ|_
|j ||j ƒƒdS(Ni( RttagDGCanUseFamilyIDListRÕtdgDiapatchFamilyIDtTypet
UpdateTypetranget FamilyIDListRRR‹tCountt
sendStringt    GetBuffer(RXRcRRIRJtsendPackRZ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRb:s      c     CsÔ|jƒ}tjƒ}d}|j||ƒtjd|jƒƒ|jdkry|t}|j    ƒ}tjd|ƒ| s”|j
ƒdkrî|j r¡dSddl }|j dtd|||j|fƒ}    |    jƒtjdƒqÐtjƒ}
tj|
_|j|
_x"|D]} |
jj| dƒqWt|
jƒ|
_|j||
jƒƒtjd    |
jƒƒnW|j r†dSddl }|j dtd|||j|fƒ}    |    jƒtjd
ƒdS( NisOnDiapatchFamilyID pack = %ss:OnDiapatchFamilyID  db[UCN_Dispatch_FamilyID]  result = %siÿÿÿÿttargettargssCallType 0 need dispatchR^s#CallType 0 sendPack.FamilyIDList %ssCallType 1 need dispatch(RÔRttagGDRequestCanUseFamilyIDListtReadDataR    RŠt OutputStringtCallTypeRatfindtcountR`t    threadingtThreadRetstartRRRÕRRRRRRR‹RRR( RXRWRtbuftrecvPackRR[R R)ttR trec((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRØDs>  
      '
         '
 cCs‰tjƒ}tj|_||_||_t|jƒ|_||_    t|j    ƒ|_
|j |ddtj t jt j|jƒƒdS(Ni(RttagDGGeneralDBOperResultRÕtdgDBOperResultRtResultt    ResultSetR‹t ResultSetLentErrMsgt    ErrMsgLentpackSendt atMergeLogicRtstGametstDataR(RXt    sessionIDR t    resultSetterrMsgR ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytsendGameServerDBOperResultks              cCsÒ|jƒ}tjƒ}d}|j||ƒtjd|jƒƒd}ytj    |j
ƒ}WnPt k
r³}tj d|j
ƒ|j r¯|j|jƒdddƒndSXt|tƒs|j rÿtj d|j
ƒ|j|jƒdddƒndS|jdƒ}|sQtj dƒ|j rM|j|jƒdddƒndSt|tƒstj d    |ƒ|j r™|j|jƒddd
ƒndS||}    |jd ƒ}
|
sõtj d ƒ|j rñ|j|jƒddd ƒndSt|
tƒsAtj d |
ƒ|j r=|j|jƒdddƒndS|
jƒ}
|
dkrd} d} y|    jƒWn_t k
r±}tj d||fƒd} t|ƒ} n$tj d|ƒd} d} nX|j rý|j|jƒ| d| ƒndS|
dkrÖ|jdƒ} d} d} y|    j| ttƒWnht k
r€}tj d| ||fƒd} t|ƒ} n*tj d| |fƒd} d} nX|j rÒ|j|jƒ| d| ƒndS|
dkrÉ|jdƒ}|jdƒ}d} d} y |    j||ttttƒWnnt k
rp}tj d||||fƒd} t|ƒ} n-tj d|||fƒd} d} nX|j rÅ|j|jƒ| d| ƒndS|
dkr›|jdƒ}d} d} y|    j|tƒWnht k
rE}tj d|||fƒd} t|ƒ} n*tj d||fƒd} d} nX|j r—|j|jƒ| d| ƒndS|
dkr½|jdƒ}|jd iƒ}d} d} d}y4|ikrû|    j|ƒ}n|    j||ƒ}Wnet k
rL}tj d!||fƒd} t|ƒ} n*tj d!||fƒd} d} nX|j r¹|rštt|ƒƒ}n|j|jƒ| || ƒndStj d"|
ƒdS(#Nis    pack = %sscPickle.loads('%s') failed!RsOperDict parse failed!s%s is not a dict!R[scollection not specified!scollection name:%s not valid!scollection name not valid!topersoper not specified!soper:%s not valid!soper not valid!tdropisdrop %s failed!error = %ssdrop %s failed!unknown error!sunknown exception!RTtdocss#insert %s into %s failed!error = %ss+insert %s into %s failed!unknown exception!tupdatetspecs0update %s failed!spec = %s, doc = %s, error = %ss=update %s failed!spec = %s, doc = %s,unknown exception occur!tremoves+remove from %s failed!spec = %s, error = %ss3remove from %s failed!spec = %s, unknown exception!R'tfieldss%s.find(%s) failed!soper %s not support!(RÔRttagGDGameServerGeneralDBOperR$R    RŠR%RytcPickletloadstOperDictR8Rt
NeedReturnR>t getSessionIDt
isinstancetdictR,t
basestringtlowerR@tstrRTRURNRBRDR'tlist(RXRWRR,R-RtoperDictRFtcolNametcolR?R terrorMsgt doc_or_docstdocRCt
spec_or_idRER<((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRÚvs                   
           
     
       
     
      
    c CsŒ|jƒ}tjƒ}d}|j||ƒ|j}tjd|jƒƒ|tj    kr |j
}|j |ƒ}|r•d}    tjd|ƒnW|j ||ƒ\}    }
tjd||    fƒ|    rìt j|
ƒ}|j||ƒn|j|jƒ|    ||ƒdS|tjkrA|j
}|j}|j||ƒdS|tjkrˆtj|jƒ} |j|jƒd|t| ƒƒdSdS(Nis    pack = %sis$packData get from cache. playerID=%ss+packData get from db. playerID=%s,result=%s(RÔRttagGDGameServerToDBLogicR$t    QueryTypeR    RŠR%RÕtgstDBLogic_PlayerPackDataReqtIDtgetPlayerPackDatatGetPlayerDataByPlayerIDRzt    b64encodetupdPlayerPackDatatSendGameServerToDBLogicResultRKtgstDBLogic_PlayerPackDataUpdtDatatgstDBLogic_GMCmdtGMShellt DBGMCommandRP( RXRWRR,R-Rt    queryTypetplayerIDtpackDataR t
playerDatat dbAnswerList((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRÛs:                  "cCs±tjƒ}tj|_||_|j|_|j|_|j|_t    |jƒ|_
||_ t    |j ƒ|_ |j |ddtjtjtj|jƒƒtjdƒdS(sñ»Ø¸´GameServer·¢Ë͵ÄSendDBLogic£¬¿ÉÒÔ²»»Ø¸´£¬ÓɾßÌåÀàÐ;ö¶¨
        @param result: ½á¹û£º1³É¹¦£¬0ʧ°Ü
        @param recvPack: GameServer·¢À´µÄÊý¾Ý°ü£¬Data¿ÉÔ­Öµ·µ»Ø£¬Ò²¿ÉÐ޸ĺ󷵻أ¬ÓɾßÌåÀàÐ;ö¶¨
        @param resultSet: »Ø¸´Êý¾Ý
        is"»Ø¸´ SendGameServerToDBLogicResultN(RttagDGGameServerToDBLogicResultRÕtdgDBGameServerToDBLogicResultRR2R\RZRcR‹tDataLenR3R4R7tatInnerRR9R:RR    RŠ(RXR;R R-R<R ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRa.s              cCs¶tjƒ}||_|t}|j|i|d6ƒ}|sVtjd|jƒdStjd|jƒi|jd6}|t    }|j
||tj t ƒ}|t }|j
||tjƒ}|t}|j
||tjƒ}    |t}|j
||tjƒ}
|t}|j
||tjƒ} |t}|j
||tjƒ} |t}|j
||tjƒ} |t}|j
||tjƒ}|t}|j
||tjƒ}|t}|j
||tjƒ}|t}|j
||tj ƒ}|t!}|j
||tj"ƒ}|t#}|j
||tj$ƒ}tj%ƒ}|jj&ƒ|_|t'}|j(|ƒ}d|j)ƒ|||    |
| | | |||||||fS(NRKs0GetPlayerDataByPlayerID  Exception playerID = %siRs
accid = %si(is(*R t tagDBPlayerRKt UCN_DBPlayert
adoLoadCExR    RR3tAccIDt UCN_RoleItemtreadPlayerPackSaveDatat tagRoleItemRNtUCN_RoleMissionttagRoleMissiontUCN_RoleMissionDictttagRoleMissionDictt UCN_RoleSkillt tagRoleSkillt UCN_RoleBufft tagRoleBufftUCN_RoleRepeatTimettagRoleRepeatTimetUCN_PlayerHorseTablettagPlayerHorseTablet
UCN_GMOpert    tagGMOpert UCN_RolePett
tagRolePett UCN_PetSkillt tagPetSkilltUCN_RoleNomalDictttagRoleNomalDicttUCN_PlayerDienstgradttagPlayerDienstgradtUCN_BattleFormationttagBattleFormationt    tagDBGMIPROt
UCN_DBGMIPt adoQueryIndexRÔ(RXRWRhtdbPlayerR[tloadOKt    queryDicttitemDatat missionDatatroleMissionDictDatat roleSkillDatat roleBuffDatatroleRepeatTimeDatat roleHorseDatat
gmOperDatat rolePetDatat petSkillDatatroleNormalDictDatatroleDienstgradDatatbattleFormationDatatgmIPtgmIPData((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR^CsR     
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c Cs•tj}|jƒ}tjƒ}d}|j||ƒ|jjtdƒƒ}t    j
d|ƒ|j ƒ}t j ƒj|ƒ}    |    sœt    jd|ƒdStjƒ}
tj|
_|j|gƒr!d|
_|j|j ƒ|jƒjdtjtjtj|
jƒƒt    jd|ƒdSd|
_||
_t|ƒ|
_ d|
_!d|
_"|j|j ƒ|jƒjdtjtjtj|
jƒƒdS(Nis accID = %s.sclient not found!sessionID = %ssquery failed!spec = %siR(#R„R…RÔRttagLPQueryRegisterResultR$RststriptchrR    RŠRKtMergeProxyClientMgrtgetMergeProxyClientMgrtfindClientBySessionIDRRttagMPQueryRegisterResultRÕtdgMergeQueryNewAccountRR,R2R7t getPackHeadR;R8Rt    stNoSenseRtAccountR‹t
AccountLentPwdtPwdLen( RXRWRR…R,R-RRtclientSessionIDRBR ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR܄s6             *                *cCsHtj}y |jƒ}tjƒ}d}|j||ƒtjƒ}tj    |_
|j }t j ƒ}    d}|    j||t|ƒƒ}
d|
krd|_d|_t|jƒ|_|j|jƒ|jƒjdtjtjtj|jƒƒtjdƒdS|    jdkr‡d|_d|_t|jƒ|_|j|jƒ|jƒjdtjtjtj|jƒƒtjdƒdS|jƒ} tjƒj | ƒ} | sÃtjd| ƒdS| j!} |    j}|    j"j#ƒj$t%dƒƒ}|    j&j$ƒ}d    |_||_'t|ƒ|_(d
|_)d|_*|j|jƒ|jƒjdtjtjtj|jƒƒtj+d | |||fƒt,ƒd|| g||<Wn˜t-k
rÿ}t.j/d t.j0d |t1j2ƒt3j4|ƒfƒ}tj.|ƒnEt.j/d t.j5dt1j2ƒt3j4|ƒfƒ}tj.|ƒnXdS(sß »º´æ¿ç·þÍæ¼ÒÉÏ´«Êý¾ÝÐÅÏ¢ 
            Ä¿Ç°Õ˺š¢Íæ¼ÒID¡¢½ÇÉ«Ãû¾ùÒÑÈ·±£Î¨Ò»£¬¹ÊÎÞÐèÔÙÖØÐÂÉú³ÉеÄÕ˺ż°½ÇÉ«ÐÅÏ¢
            Ö±½Ó½ÓÊÕ¸üлº´æ¼´¿É£¬Íæ¼ÒµÇ½¿ç·þ·þÎñÆ÷ʱֱ½Ó´Ó»º´æÊý¾ÝÖнâÎö½ÇÉ«Êý¾Ý£¬´Ó¶ø½ÚÊ¡db´æÈ¡²½Öè
        iiÿÿÿÿsPlayer data length not enough!splayer data too short!NsPlayer data error!splayer data error!sclient not found!sessionID = %siRs3player %s accID=%s, playerID=%s, %s register PK ok!Rs8OnMergeRegisterPlayer error %s!traceback = %s, pack = %ss5OnMergeRegisterPlayer error!traceback = %s, pack = %s(6R„R…RÔRttagLPRegisterPlayerR$RttagMPRegisterPlayerResultRÕtdgMergeRegisterResultRRcR RptreadDataR‹R2tErrorMsgt ErrorMsgLenR7RKR¬R;R8RR­RR    RRKR§R¨R©RARsROR¥R¦t
PlayerNameR®R¯R°R±R3RPR8Rt    formatMsgt ERROR_NO_175t    tracebackt
format_exctbinasciitb2a_hext ERROR_NO_176(RXRWRR…R,R-RtloginResultPackRjt    playerRectdbPlayerReadLenR²RBRARhRt
playerNameRFtmsg((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRݦsj                      *         *                          *41cCsy|jƒ}|jƒ}tjƒ}d}|j||ƒ|jjtdƒƒ}tj    d|ƒ|t
}|j i|d6ƒ}    |     sŸ|    j ƒdkr£dSt j jƒ}
t|
ƒ} | jdƒd} |ji|d6iidd6| d6d6ƒtj    d    |ƒdSWnƒtk
r`} tjd
tjd | tj|ƒfƒ} tj| ƒn9tjd
tjd tj|ƒƒ} tj| ƒnXdS( NisOnFinishRecharge ...%stOrderIDs.it    IsProcesst EndOrderTimes$setsOnFinishRecharge OrderID = %sRs#OnFinishRecharge error %s!pack = %ss OnFinishRecharge error!pack = %s(RÔt    getLengthRttagMDFinishRechargeR$RÆR¥R¦R    RŠt UCN_PayInfoR'R(tdatetimettodayRPtsplitRBR8RRºt ERROR_NO_170R¾R¿(RXRWRR,tpackLenR-RtorderIDRTR Rnt
curTimeStrRFRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRáïs2   
 ,+%cCsBy¸|jƒ}|jƒ}tjƒ}d}|j||ƒ|jjtdƒƒ}tj    d|ƒ|t
}|j i|d6dd6dd6ƒ}    |     s­|    j ƒdkr±dS|    d}
t jƒ} tj| _tj| _t|
dƒ| _t| jƒ| _t|
dƒ| _t| jƒ| _t|
dƒ| _t|
d    ƒ| _t| jƒ| _|ji| jd6iid
d6d 6ƒ|j|| j ƒƒtj    d | jƒdSWnƒt!k
r} t"j#d t"j$d| t%j&|ƒfƒ} tj"| ƒn9t"j#d t"j$dt%j&|ƒƒ} tj"| ƒnXdS(NisOnQueryRecharge ...%sRsRÇRÈRÆt    OrderInfot OrderAmounttExtrasis$setsOnQueryRecharge OrderID = %sRs"OnQueryRecharge error %s!pack = %ssOnQueryRecharge error!pack = %s('RÔRÉRttagMDQueryRechargeR$R®R¥R¦R    RŠRËR'R(RttagDMRechargePushRÕtdgDBToMapServerRtgmReChargePushtSubTypeRRÆR‹t
OrderIDLenRÓt OrderInfoLenRjtMoneyRÕt    ExtrasLenRBRRR8RRºRÏR¾R¿(RXRWRR,RÐR-RtaccountRTR tbillInfoR RFRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRàsD   
$
   (+%c Cs¦yë|jƒ}|jƒ}tjƒ}d}|j||ƒtjd|jƒtj    ƒ}t
j |_ t
j |_|j|_|j|_tjƒ}|j|_|j|_|t}    tƒ}
|j|    ƒst|
tƒkr+d|_d|_d|_|j||jƒƒtjd|jƒdSd|_d|_d|_|j||jƒƒtjd|jƒdS|j|_|j|_|j|_|j|_|j|_|j||jƒƒtjd|j|jƒfƒdSWnƒtk
r8} tj dtj!d    | t"j#|ƒfƒ} tj| ƒn9tj dtj!d
t"j#|ƒƒ} tj| ƒnXd|_d|_d|_|j||jƒƒdS( Nis%OnQueryNewGuyCardState cardID = %s...Rs-OnQueryNewGuyCardState cardID = %s not found!is.OnQueryNewGuyCardState query error!cardID = %ss+OnQueryNewGuyCardState cardID = %s state:%sRs)OnQueryNewGuyCardState error %s!pack = %ss&OnQueryNewGuyCardState error!pack = %s($RÔRÉRttagMDIsMediaCardUsedR$R    RŠtCardIDRttagDMIsMediaCardUsedRÕRØRtgmQueryNewGuyCardStateRÚt    CardIDLenR ttagDBNewGuyCardStatetUCN_DBNewGuyCardStateRtadoLoadtIsUsedt UserDataLentUserDataRRRtCardTypet    ValidTimeRR8RRºRÏR¾R¿( RXRWRR,RÐR-RR tobjRTtlastExceptionCntRFRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRßCsb           
                                  +%            c Csyt|jƒ}|jƒ}tjƒ}d}|j||ƒtjƒ}tj|_    tj
|_ |j |_ |j |_ tjd|jƒƒtjƒ}|j |_ |j |_ |j|_|j|_|j|_|j|_|j|_|t}    |j|    ƒs@d|_|j||jƒƒtjd|j ƒdSd|_|j||jƒƒtjd|j ƒWnƒtk
rÁ}
tjdtj d|
t!j"|ƒfƒ} tj| ƒn9tjdtj dt!j"|ƒƒ} tj| ƒnXd|_|j||jƒƒdS(    NisonCheckUpdateNewGuyCardState %ss/onCheckUpdateNewGuyCardState failed!cardID = %sis0onCheckUpdateNewGuyCardState success!cardID = %sRs/onCheckUpdateNewGuyCardState error %s!pack = %ss,onCheckUpdateNewGuyCardState error!pack = %s(#RÔRÉRttagMDCheckUpdateMediaCardStateR$RttagDMCheckUpdateMediaCardResultRÕRØRtgmUpdateNewGuyCardStateRÚRåRâR    RŠR%R RæRéRêRëRìRíRçtadoCheckUpdateR2RRR8RRºt ERROR_NO_171R¾R¿( RXRWRR,RÐR-RR RîRTRFRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRâ}sJ                
        +%    cCsë|jƒrdSd}tjƒ}|j|jƒ|ƒ}|jsGdS|t}tjƒ}|j    j
ƒ|_ |j |ƒsÎ|j r¶t jdt jd|j ƒ}tj |ƒntjd|j ƒdS|j|_|j|ƒdS(s ±£´æÍæ¼ÒÐÅÏ¢NiRsload account failed, accid = %ss0OnSavePlayerInfo load account failed, accid = %s(RƒRttagGDSavePlayerInfoR$RÔt GeTuiClientIDt UCN_DSAccountR t tagDSAccountRsROtACCIDtadoLoadCRRºt ERROR_NO_57R    Rt
adoUpdateC(RXRWRRt
PlayerInfoRTt    PlayerAccRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRë¨s$      
      cCsud}tjƒ}|j|jƒ|ƒ}|j|j|ƒ}tjdd|jdt    j
|jƒ|j fƒdS(s ½øÈë´´½ÇÂñµãii)#s:OperatorID=%s&Step=%s&AccountID=%s&Flag=1000&DeviceFlag=%siN( RttagLDPrepareCreateRoleR$RÔtGetAccountFromTableRsR5t EventReporttAppIDRtGetPlatformAccIDt
DeviceFlag(RXRWRRRýRß((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRÄs   cCs“tjƒ}d}|j||t|ƒƒ}d|krFtddfS||7}|j}|dkrrtddfStjd|ƒt||j    fS(NiiÿÿÿÿRs__ReadPlayerID playerID = %s(
R RpR¶R‹RURKR    R3RNRs(RXRWtsaveDataRÂRRÃRh((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyt__ReadPlayerIDÎs   
      c    Cs¾tj}d}tj|jƒ||jƒ|ƒ\}}|j||ƒ\}}}||kr´tƒ||t<|||t    _
t |ƒ||t    _ t jd||fƒn||fS(Nis?onSaveMapServerPlayerDataMergeServer result = %s, playerID = %s(R„R…Rt
ReadStringRÔRÉt_UserCtrlDB__ReadPlayerIDRPR‡tMergeRegPInfoIndex_PackDataRcR‹RnR    R3(    RXRWRR…RRR RhR((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRéÛs    + c CsÒd}tj|jƒ||jƒ|ƒ\}}t}d}tjrd|j||ƒ\}}}n|j||ƒ\}}}|sÑt    j
dt    j d|ƒ}t j    |ƒt jtjƒdd||ƒn|j||ƒt jd||fƒtjjtjt|ƒƒ}    tjj|    ƒrÈtjj|    dƒ}
xˆtj|    ƒD]t} | jtjƒskqMntjj|    | ƒ} tjjtjj|
| ƒƒs´tj| |
ƒqMtj| ƒqMWn||fS(    s#Íæ¼ÒÏÂÏߣ¬±£´æÍæ¼ÒÔÚMapServerµÄÊý¾ÝiiRs%Player save data failed!playerID = %ssUserLogs\SaveFailDumps%s.mdats4onSaveMapServerPlayerData result = %s, playerID = %stBackup(RRRÔRÉRUR#tPackSavetSavePlayerMapServerDataExtSavePlayerMapServerDataRRºt ERROR_NO_59R    RtDumpDataR t
getAppPathtRevoverBillProcessR3R(R)R*t PlayerBakRootRPtexiststlistdirtendswithtPlayerBakFileTypetshutiltmoveRD( RXRWRRRR RhRRÅt PlayerBakDirt
BakCopyDirtfilenametfullPath((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRêðs0+     #!c Cs<|j}|jƒrdStj s9tjjtjƒ r=dStjdtjƒxätj    tjƒD]Ð\}}}|j
dƒrˆqdnx©|D]¡}|j
tj ƒs­qnt |ƒdkrÔtj d|ƒdSyMtjj||ƒ}t|dƒ}|jƒ}|jƒtj|ƒ}Wntj d|ƒdSXtjrd|j||ƒ\}    }
} n|j||ƒ\}    }
} |    sštj d|ƒdStjjtjt|
ƒdƒ} tjjtjj| |ƒƒs    tj|| ƒtjd|
| |fƒqtj|ƒtjd    |
| |fƒqWqdWdS(
Ns&Íæ¼Ò±¸µµÂ·¾¶ DBConfig.PlayerBakRoot=%sR
isNÍæ¼Ò±¸µµ¸öÊýÒì³£: The number of backup files is greater than one. filenames=%strbsÍæ¼Ò±¸µµ´ò¿ªÊ§°Ü. %ssÍæ¼Ò±¸µµÈë¿âʧ°Ü fail. %ss/Íæ¼Ò±¸µµÈë¿â³É¹¦: playerID=%s,accID=%s, move %ss1Íæ¼Ò±¸µµÈë¿â³É¹¦: playerID=%s,accID=%s, remove %s(RWRƒR#RR(R)RR    R3twalkRRR‹tfatalR*topenR'R7tzlibt
decompressR R R RPRRRD( RXRWtparentt_t    filenamesRRt fileHandlerRR RhRR((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyt__PlayerBackupSavesJ      "  
    !! "c
Cs}tjd|ƒy*t||jdƒ jdƒdƒ}Wn d}nXtjjtj    t
|ƒd|ƒ}tjj |ƒsœd|}tj|ƒdSy8t |dƒ}|j ƒ}|jƒtj|ƒ}Wnd|}tj|ƒdSXtjr|j||ƒ\}}}    n|j||ƒ\}}}    |sYd    |}tj|ƒdSd
||    |f}tj|ƒdS( Ns===Ö´ÐÐÍæ¼ÒÖ¸¶¨±¸µµÈë¿â: %ss.R$iR
s²»´æÔÚ¸ÃÍæ¼Ò±¸µµÎļþ: %sRsÍæ¼ÒÖ¸¶¨±¸µµ´ò¿ªÊ§°Ü: %ssÍæ¼ÒÖ¸¶¨±¸µµÈë¿âʧ°Ü: %ss.Íæ¼ÒÖ¸¶¨±¸µµÈë¿â³É¹¦: playerID=%s,accID=%s, %s(R    R3RjRpRÎR(R)R*R#RRPRR R'R7R!R"R R R (
RXRWt bakFileNameRhRRÅR&RR R((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytSavePlayerDataByBackupLs:*
$
 
 
     
  cCs×y¸|s dS|jtdƒƒ}|t}|ji|d6dd6dd6ƒ}| si|jƒdkrmdS|d}|d}|ji|d6iidd6d6ƒtjd|ƒWntjd    |ƒnXdS(
NiRsiRÇRÈRÆs$setsRevoverBillProcess success...%ssRevoverBillProcess error %s(    R¥R¦RËR'R(RBR    RŠR(RXRWRRßRTR RàRÑ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRrs
$
 
%c Csltjƒ}d}|j||t|ƒƒ}d|krFtddfS||7}tjd|jƒ|jdkr€tddfS|jj    ƒ|_|t
}|j dƒ}|j ƒ|j |ƒsÔt|jdfS|jƒ|j|ƒ|j dƒ}|j ƒ||j|j|ttj||tƒ7}|jƒ|j dƒ}|j ƒ||j|j|ttj||ƒ7}|jƒ|j dƒ}|j ƒ||j|j|ttj||ƒ7}|jƒ|j d    ƒ}|j ƒ||j|j|ttj||ƒ7}|jƒ|j d
ƒ}|j ƒ||j|j|ttj||ƒ7}|jƒ|j d ƒ}|j ƒ||j|j|ttj||ƒ7}|jƒ|j d ƒ}|j ƒ||j|j|ttj||ƒ7}|jƒ|j d ƒ}|j ƒ|j |j|j||ƒ|jƒ||j|j|t!tj"||ƒ7}t#j$||ƒ\}}tj%ƒ}    x3t&|ƒD]%}
||    j||t|ƒƒ7}qœW|j dƒ}|j ƒ||j|j|t'tj(||ƒ7}|jƒ|j dƒ}|j ƒ||j|j|t)tj*||ƒ7}|jƒ|j dƒ}|j ƒ||j|j|t+tj,||ƒ7}|jƒ|j dƒ}|j ƒ||j|j|t-tj.||ƒ7}|jƒ|j dƒ}|j ƒ||j|j|t/tj0||ƒ7}|jƒ|t|ƒksYt1‚t|j|jfS(NiiÿÿÿÿRs$Saving player data,playerID = %s....t'gstSaveMapServerCrashData_1_tagDBPlayert%SavePlayerMapServerData_1_tagRoleItemt(SavePlayerMapServerData_1_tagRoleMissiont,SavePlayerMapServerData_1_tagRoleMissionDictt&SavePlayerMapServerData_1_tagRoleSkillt%SavePlayerMapServerData_1_tagRoleBufft+SavePlayerMapServerData_1_tagRoleRepeatTimet-SavePlayerMapServerData_1_tagPlayerHorseTablet%SavePlayerMapServerData_1_gmOperCheckt$SavePlayerMapServerData_1_tagRolePett%SavePlayerMapServerData_1_tagPetSkillt*SavePlayerMapServerData_1_tagRoleNomalDictt-SavePlayerMapServerData_1_tagPlayerDienstgradt,SavePlayerMapServerData_1_tagBattleFormation(2R RpR¶R‹RUR    R3RKRsRORqRÖR×RüRÙtrecPlayerLogofftsavePlayerDataRtRvRNRwRxRyRzR{R|R}R~RR€RR‚t gmOperCheckRƒR„Rt    ReadDWORDRRQR…R†R‡RˆR‰RŠR‹RŒRRŽtAssertionError( RXRWRRÂRRÃR[RtgmIPCnttgmIPRecti((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR ‡s˜   
 
 
 
 
,
 
)
 
)
 
)
 
)
 
)
 
)
 
 
) #
)
 
)
 
)
 
)
 
)
c Cs~tjƒ}d}|j||t|ƒƒ}d|krFtddfS||7}tjd|jƒ|jdkr€tddfS|jj    ƒ|_|t
}|j dƒ}|j ƒ|j |ƒsÔt|jdfS|jƒ|jdkrý|j|ƒn|j dƒ}|j ƒ||j|j|ttj||tƒ7}|jƒ|j dƒ}|j ƒ||j|j|ttj||ƒ7}|jƒ|j dƒ}|j ƒ||j|j|ttj||ƒ7}|jƒ|j d    ƒ}|j ƒ||j|j|ttj||ƒ7}|jƒ|j d
ƒ}|j ƒ||j|j|ttj||ƒ7}|jƒ|j d ƒ}|j ƒ||j|j|ttj||ƒ7}|jƒ|j d ƒ}|j ƒ||j|j|ttj ||ƒ7}|jƒ|j d ƒ}|j ƒ|j!|j|j||ƒ|jƒ||j|j|t"tj#||ƒ7}t$j%||ƒ\}}tj&ƒ}    x3t'|ƒD]%}
||    j||t|ƒƒ7}q®W|j dƒ}|j ƒ||j|j|t(tj)||ƒ7}|jƒ|j dƒ}|j ƒ||j|j|t*tj+||ƒ7}|jƒ|j dƒ}|j ƒ||j|j|t,tj-||ƒ7}|jƒ|j dƒ}|j ƒ||j|j|t.tj/||ƒ7}|jƒ|j dƒ}|j ƒ||j|j|t0tj1||ƒ7}|jƒ|t|ƒkskt2‚t|j|jfS(NiiÿÿÿÿRs$Saving player data,playerID = %s....t'SavePlayerMapServerDataEx_1_tagDBPlayert'SavePlayerMapServerDataEx_1_tagRoleItemt*SavePlayerMapServerDataEx_1_tagRoleMissiont.SavePlayerMapServerDataEx_1_tagRoleMissionDictt(SavePlayerMapServerDataEx_1_tagRoleSkillt'SavePlayerMapServerDataEx_1_tagRoleBufft-SavePlayerMapServerDataEx_1_tagRoleRepeatTimet/SavePlayerMapServerDataEx_1_tagPlayerHorseTablet'SavePlayerMapServerDataEx_1_gmOperCheckt&SavePlayerMapServerDataEx_1_tagRolePett'SavePlayerMapServerDataEx_1_tagPetSkillt,SavePlayerMapServerDataEx_1_tagRoleNomalDictt/SavePlayerMapServerDataEx_1_tagPlayerDienstgradt.SavePlayerMapServerDataEx_1_tagBattleFormation(3R RpR¶R‹RUR    R3RKRsRORqRÖR×RüRÙtCountryLastWeekHornorR8tsavePlayerDataExRtRvRNRwRxRyRzR{R|R}R~RR€RR‚R:RƒR„RR;RRQR…R†R‡RˆR‰RŠR‹RŒRRŽR<( RXRWRRÂRRÃR[RR=R>R?((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR ösš   
 
 
 
 
,
 
)
 
)
 
)
 
)
 
)
 
)
 
 
) #
)
 
)
 
)
 
)
 
)
c
Cs÷d}t|ƒ}tj||ƒ\}}||8}tjƒ}x°t|ƒD]¢}|jƒ|j|||ƒ}    ||    7}||    8}|jt    j
krM|j ||t t jƒt|jt jƒƒ|jdt j|jƒ|jfƒqMqMWdS(NisEndTime = %s.Reason = %s(R‹RR;R R„RQtclearR¶tOperRÕt gmForbidAcctonForbiddenUpdateRNR
t TDateTime_NowRjtEndTimetGMAccIDtTDateTimeToStringtMsg(
RXRRhRCRtlengthtcntt    gmOperRecR?treadLen((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR:fs 
 
 
 
4cCstj}||kr"i||<n|jd|ƒ}|jƒ||}    |jd|ƒ}
|
jƒ|
jƒd} tj|| ƒ\} } tjd||| fƒ|ƒ} t    |ƒ}i}| rê||d<| |d<d|d<nxt
| ƒD]ö}|jd    |ƒ}
|
jƒ| j ƒ|
jƒ|jd
|ƒ}
|
jƒ| j || |ƒ}|
jƒ|d kr‘tjd t |ƒƒd S| |7} |rÕ|jd|ƒ}
|
jƒ| jƒ|
jƒn| jƒ|d |d<q÷W|rd}xòtr yx|jd|ƒ}
|
jƒ|    ji|d6|dtƒ|
jƒ| |||<tjd||| ||fƒPWqtjjk
r}tj|krµ|d7}qntƒtjd|jjtjƒdd|fƒtjd|||fƒPqXqWnâd}xÙtrñyo|jd|ƒ}
|
jƒ|    ji|d6ƒ|
jƒd|||<tjd||| ||fƒPWqtjjk
rí}tj|krÅ|d7}qntƒtjd||||fƒPqXqW|jƒ| S(s±£´æÍæ¼ÒÎïÆ·µÈÊý¾Ý£¬ÓÅ»¯°æssavePlayerDataEx_%s_AllssavePlayerDataEx_%s_removeis'saving %s data, playerID = %s, cnt = %sRKRit
__PackSavessavePlayerDataEx_%s_clearssavePlayerDataEx_%s_readDataiÿÿÿÿs%sNssavePlayerDataEx_%s_makeSIDssavePlayerDataEx_%s_updatetupsertsAupdate end %s data, playerID = %s, cnt = %s, playerDataCntInfo=%ss%s.%s:docs = %sis0update failed!docs = %s, error = %s, trycnt = %dsAremove end %s data, playerID = %s, cnt = %s, playerDataCntInfo=%ss7remove failed!%s playerID = %s, error = %s, trycnt = %d(R„tg_playerDataCntInfoRÖR×RÙRR;R    R3R‹RQRPR¶R¿tmakeSIDt    getRecordRNRBR”terrorstOperationFailureR#tTryCntOnWriteFailRt    __class__t__name__tinspecttstackRRD(RXRhRWtcollectionNamet
structNameRCtcheckSIDR_t oAllFuncGradeR[RRRZR/RYRWR?R\ttrycntterr((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyROws˜      
 
 
 
     
 
 
 
 
 
 
 
 
 
     
 
!
.     
 
!
    
cCstj}||kr"i||<n|jd|ƒ}|jƒ||}    |jd|ƒ}
|
jƒ|    ji|d6ƒ|
jƒd} tj|| ƒ\} } tj    d||| |fƒ|ƒ} t
|ƒ}g}x,t | ƒD]}|jd|ƒ}
|
jƒ| j ƒ|
jƒ|jd|ƒ}
|
jƒ| j || |ƒ}|
jƒ|dkrtjd    t|ƒƒd
S| |7} |rÅ|jd |ƒ}
|
jƒ| jƒ|
jƒn|jd |ƒ}
|
jƒ| jƒ}|
jƒ|j|ƒqçWt
|ƒrd}xótrÿyM|jd |ƒ}
|
jƒ|    j|ttƒ|
jƒ| |||<PWqtjjk
rû}tj|kr¨|d7}qntƒtjd|jjtjƒdd|fƒtj d|||fƒPqXqWnd|||<|jƒ| S(s±£´æÍæ¼ÒÎïÆ·Êý¾ÝssavePlayerData_%s_AllssavePlayerData_%s_removeRKis;saving %s data for player playerID = %s cnt = %s, data = %sssavePlayerData_%s_clearssavePlayerData_%s_readDataiÿÿÿÿs%sNssavePlayerData_%s_makeSIDssavePlayerData_%s_getRecordssavePlayerData_%s_insertis%s.%s:docs = %sis0Insert failed!docs = %s, error = %s, trycnt = %d(!R„R_RÖR×RDRÙRR;R    RŠR‹RQRPR¶R3R¿R`RaRRRNRTRUR”RbRcR#RdRReRfRgRhR(RXRhRWRiRjRCRkR_RlR[RRRZR/RYRAR?R\RWRmRn((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR9Õsx      
 
 
 
     
 
 
 
 
 
 
 
 
 
     
 
 
. 
cCsdS(N((RXR’((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR8 sc    Cs×ttjƒƒ}tjdtjd|jƒj|fƒ}tj|ƒt    j
t j ƒd||ƒt jƒ}d}t|ƒ}d|j|||ƒkr¢n1|j||jtjƒrÓ|j|jdƒndS(NRs sessionID = 0x%x dump to file %stUserLogsiiÿÿÿÿi(RPtuuidtuuid4RRºt ERROR_NO_60R¬R;R    RRR RR RpR‹R¶tupdatePlayerAccStateRKRÕt pysForbiddentsendAccForbiddenLogReqRs(    RXRWRtsaveDataWithCRCt dumpFileNameRÅRÂRRY((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytonSavePlayerDataCRCError8s+   cCsdS(N((RXtaccidt isForbidden((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRuQscCsÐ|t}tjƒ}||_tƒ}|j|ƒ}|s°|tƒks~tjd|jj    t
j ƒdd|fƒt Stj d|jj    t
j ƒdd|fƒt S||_|j|ƒsÌt StS(s·âºÅs7%s.%s SID error found on reading data of playerID = %s!iis%s.%s playerID = %s not found!(RqR RpRKRRúR    RReRfRgRhRURŠtAccStateRüRN(RXRWRhtnewStateR[RWtlastSIDErrorCnttret((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRs\s
         ..    cCshtjƒ}|j|jƒd|jƒƒ|jdkrd|jtjƒ|j    t
j |dƒdSdS(s$Íæ¼ÒÏÂÏߣ¬±£´æÍæ¼ÒÔÚGameServerµÄÊý¾ÝiiRN( Rt*tagGameServerToBalanceServerPlayerSaveDataR$RÔRÉRJt setSrcSvrTypeRtstLogint sendOKStringRÕtdgPlayerSaveGameServerData(RXRWRtsaveGameServerPlayerDataReq((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRèqs  cCsdS(N((RXRWR((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytonGetGameServerPlayerLoginData‚sc
Cs¾ytjƒ}|j|jƒƒtjƒ}tj|_|j    |_    t
j ƒ}|j    j ƒ|_    d|_ |t}tƒ}tƒ}|j|it|j    ƒd6|j d6ƒrÞtjd|j    ƒd|_d|_nx|tƒksd|_t|_nT|tƒksDtjr/d|_t|_qVd|_d|_nd|_d|_|j||jƒƒtjd|j    ƒWn6tjdtj dt!j"ƒƒ}    tj|    ƒnXdS(    NiRst    IsDeletedsplayer of accid = %s exists!is1onCreateRoleServerCheckIsHaveRole ok, Accid = %s!Rs)Catch a unexpetcted exception, error = %s(#RttagCSIsHaveRoleR$RÔRttagDRequestResultRÕt"gstCreateRoleServerCheckIsHaveRoleRRsR RpROR†RqRRRrRR    R3R2tExAttrtdisDataBaseErrorR#RktdisAccStateErrorRRRŠRRºt ERROR_NO_62R¼R½(
RXRWRR-R tPlayerR[RïR}RÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyt!onCreateRoleServerCheckIsHaveRolešs@         
        ,                                "cCsáy¤tjƒ}|j|jƒƒtjƒ}tj|_|j    |_    d|_
|j ||j ƒrpd|_ n    d|_ |j||jƒƒtjd|j    ƒWn6tjdtjdtjƒƒ}tj|ƒnXdS(Niis2onCreateRoleServerCheckPlayerExist ok, Accid = %s!Rs)Catch a unexpetcted exception, error = %s(RttagCSCheckPlayerNameExistR$RÔRRˆRÕt#gstCreateRoleServerCheckPlayerExistRRsR2thasPlayerByPlayerNameR¹RŠRRR    RŠRRºt ERROR_NO_63R¼R½(RXRWRR-R RÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyt"onCreateRoleServerCheckPlayerExistÆs             "cCsx|jtjƒ|j||ƒ\}}}}|r^|jtj||ƒtjd|ƒn|j    tj||ƒdS(Ns'send created player info for accid = %s(
R€RRt
CreateRoleR‚RÕtdgCreatePlayerR    RŠtsendFailString(RXRWRtSuctdisCodetAccIdRC((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytonCreatePlayerÜs c    CsËyŽ|j||ƒ\}}}}tjƒ}tj|_||_||_|r]d|_n    ||_t    j
d|ƒ|j ||j ƒƒWn6t jdt jdtjƒƒ}t    j |ƒnXdS(Nis'send created player info for accid = %sRs)Catch a unexpetcted exception, error = %s(R•RRˆRÕt$gstCreateRoleServerRequestCreateRoleRR2RsRŠR    RŠRRRRºt ERROR_NO_64R¼R½(    RXRWRR˜R™RšRCR RÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyt#onCreateRoleServerRequestCreateRoleès               "cCs[tjdƒ|t}|jƒ}|sŠ|jryd}x:|dkrt|jrt|js]tStdƒ|d7}q;WtSt||ƒtS|j    ƒ}|t
j kr©tS|dkr|jrd}x:|dkr|jr|jsétStdƒ|d7}qÇWtSt||ƒtS|jr#tSddl }|j dtd||fƒ}|jƒtS(NsCheckEmptyPlayerIDCount startiiiiÿÿÿÿR!R"(R    RŠRSR'RORNtsleepRUR\R(R#tIDDispatchPlayeIDLimitR)R*R+(RXRWR[R t    try_counttemptyCntR)R.((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytCheckEmptyPlayerIDCountýsD 
         
           
      
cCs;|t}|jƒ}|r7|d}|j|ƒ|SdS(NRKiÿÿÿÿ(RStfind_oneRD(RXRWR[R/tnewID((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytPopEmptyPlayerID,    s
 
 cCsEtj}|s+t|tdtjtjƒS|j|ƒ|j|ƒS(NRK(R#tUseIDDispatchServerRRqt PLAYERID_FEEDt PLAYERID_STEPR£R¦(RXRWR§((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytDispatchNewPlayerID6    s
     cCs0tjƒ}||_|t}|j|ƒ|S(N(R RøRùR÷Rè(RXRRWt accountDataR[((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRA    s
     
 cCsÂ|t}|j|it|jƒd6|jd6ƒr]tjd|jƒdt|jdfS|j||j    ƒr™tjd|j    ƒdt
|jdfSt j t j ƒƒ|_|j|ƒ}|dkr tjdtjd    |jƒ}tj|ƒdt|jdfS||_d
t|ƒ|_    tjd |j|j    fƒ|j|ƒs’tjdtjd |jƒ}tj|ƒdt|jdfS|j|ƒsàtjdtjd |jƒ}tj|ƒdt|jdfStjd |j|j    fƒd}tj|dƒ}|}|}|}    |}
|} |} |} |}|}|}|}|}|}|jƒ||||    |
| | | ||||||}t|ƒ}d}tj||ƒ}tj|dƒ}||}tjd|jƒdd|j|f}|j|j|ƒ}t j!dd|j"dtj#|jƒ|j$fƒt%j&i|j"d6|j    d6tj#|jƒd6|j'd6|j$d6ƒ}t j!d|ƒt(j)|ƒ|S(NRsR†splayer of accid = %s exists!iRs!player of playerName = %s exists!iÿÿÿÿRs#PlayerID Dispatch failed!accid = %stroles.Before insert role!accid = %s, PlayerName = %ssinsert player failed!accid = %ss*insert role ok!accid = %s, PlayerName = %ss'send created player info for accid = %sii)#s:OperatorID=%s&Step=%s&AccountID=%s&Flag=1000&DeviceFlag=%sit
OperatorIDtRoleIDt    AccountIDtJobRiO(*RqRrRRsR†R    Rt disCreatePlayerError_PlayerExistR’R¹t'disCreatePlayerError_PlayerNameConflictR
RWRTtCreateRoleTimeRªRRºt ERROR_NO_65R‹RKRPRŠt
adoInsertCRèt ERROR_NO_66Rt
WriteDWORDRÔtcrc32t    WriteBYTERR5RRRRturllibt    urlencodeR°tDataRecordPackt DR_CreateRole(RXRWt createPlayerR[t newPlayerIDRÅR•R–tmissionDictDatat    skillDatatbufDatatrepeatTimeDatat    horseDataRœt gmPermitDatatpetDataRžtnormalDictDatatdienstgradDataR¡tallDatatcrctdataCrct dataWithCrcR Rßt
playerInfo((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR•H    sv
,        D 
 &
 
 cCs=|t}|jit|ƒd6dd6ƒ}|jƒdkS(NR¹iR†(RqR'RR((RXRWRÄR[tresultCollection((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR’     s
#c Csd}|j|ƒjdƒ}|jƒsFtj||jƒƒ}|S|ƒ}t|ƒd}|jdƒrî|d}    d}
tj|
|    ƒ}
tjd|||    fƒx=t    |    ƒD]/} |j
|d| dƒ|
|j ƒ7}
q·W|
S|r|j ||ƒS|j ||ƒSdS(NRiiR]Rs$####reading %s of player %s,cnt = %ss%s(R'tlimitR(RR·RQthas_keyR    RŠRQt
readRecordRÔtadoQueryCustomCtadoQueryCustom( RXRTtqueryRjRkR,RARîRWtdocCntR R?((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRu¦    s&     
cCsž|jd|ƒ}|jƒd}tj||ƒ\}}tjd|||fƒ|ƒ}t|ƒ}    d}
tj|
|ƒ}
xt|ƒD]÷} |jd|ƒ} | jƒ|j    ƒ| j
ƒ|jd|ƒ} | jƒ|j |||    ƒ} | j
ƒ| dkr)tj dt |ƒƒdS|| 7}d}tj|d    ƒr`|j}||_ntj|d
ƒr­|r­|j}|j|d }tj||ƒ|_q­ntj|d ƒrÔtj|ƒ|_ntj|d ƒr<|r<|j}||jkr-|j|d }tj||ƒ|_q9||_q<n|rv|jd|ƒ} | jƒ|jƒ| j
ƒn|
|jƒ7}
qW|j
ƒ||
fS(s  »ñÈ¡¿ç·þÍæ¼Òͬ²½Êý¾Ý»º´æbuffer sgetMergePlayerDataBuffer_%s_Allis9getMergePlayerDataBuffer %s data, playerID = %s, cnt = %sRs!getMergePlayerDataBuffer_%s_clears$getMergePlayerDataBuffer_%s_readDataiÿÿÿÿs%sRKtPetIDitTruckIDtOwnerIDs#getMergePlayerDataBuffer_%s_makeSID(is(RÖR×RR;R    RŠR‹R·RQRPRÙR¶RR¿R
thasFieldRKRÖRÕt    makePetIDt makeTruckIDtTructIDRØR`RÔ(RXR¿RjRCRkRlRRZR/RYR R?RR\t orgPlayerIDtoldPetIDtpetIndext
oldOwnerID((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytgetMergePlayerDataBufferÀ    s`
     
 
 
 
 
 
             
 
 
cCsWtj}|j}tjd|ƒ||kr?|j||ƒS||}|t}dS(s »ñÈ¡¿ç·þÍæ¼ÒÏêϸÐÅÏ¢ s)getting mergePlayer detail for accid = %sN(R„R…RsR    RŠtonGetPlayerDetailR    (RXRWtauthPackR…t
queryAccidt regPlayerInfoR-((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytonGetMergePlayerDetail
s         
 
 
c7 Csô tj}|j}tjd|ƒtr-dStjƒ}||_d|_|t    }t
ƒ}t ƒ}|j |it |jƒd6|jd6ƒ}    |t
ƒks¼|jtjttƒdS|j|jiƒ}
|t ƒksdtj|jƒs>tjr>tj|_|j|ƒtjd|ƒ|j|jdƒq>ntjrd|jtjttƒdSnt} i|jd6} t} || }|j|| tj t!ƒ}t"j#|dƒ}|
j| ƒ}| på|dkoå|d|k} tjd| |d|fƒt%} || }|j|| tj&ƒ}t"j#|dƒ}|
j| ƒ}| pn|dkon|d|k} tjd| |d|fƒt'} || }|j|| tj(ƒ}t"j#|dƒ}|
j| ƒ}| p÷|dko÷|d|k} tjd| |d|fƒt)} || }|j|| tj*ƒ}t"j#|dƒ}|
j|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4_itjjkƒjlƒ|4_mtnjo|4jpƒ|4jqƒƒtjd||jfƒdS(Ns$getting player detail for accid = %siRsR†sAccID = %s check SID failed!iRKs%s cnt = %s, lastCnt=%ss####dgPlayerInit cntError accid = %sslogin data cntError accid=%ssPyMongoDataServer.initdatasettDataCntErrorKicks"Time past.EndTime = %s.Reason = %ss$auto unforbidden accid = %s msg = %ssNo forbidden oper found!Rs gmIP cnt = %ss-gstPlayerDetail Send accid = %s playerID = %s(rR„R_RsR    R3RUR RpR†RqRRRrRR—RÕt dgPlayerInitRR‹R,RKtisAccStateForbiddenR{R#RktpysSIDCheckErrorForbiddenRüRŠRuRŒRtRuRvRNRR;RyRwRxRyRzR{R|R}R~RR€RR‚RƒR„R…R†R‡RˆR‰RŠR‹RŒRRŽR5R6R&R'R(R)R*R R+t
has_optiontgetintRtt extractGMOperRRRUR
RTRWRXt unFobbidenAccRVRRORR‘RÔR¸R·R¹RttagMapServerPlayerLoginRtServerRoleIndext    SessionIDtIPtClientIPtPlayerInfoPackR‹tPlayerInfoPackLenR÷RøRútPlayerAccountInfoRÉtPlayerAccountInfoLent    GameWorldt GetGameWorldtGetMapIDtMapIDt NetPackCommontSendPyPackToMapServerSelfRt    GetLength(7RXRWRãR_RäR’R[RïR}R“tplayerDataCntInfotcntErrorR”RiR•titemCnttlastCntR–t
missionCntR—t missonDictCntR˜tskillCntR™tbufCntRšt repeatTimeCntR›thorseCntRœt    gmOperCntRtpetCntRžt petSkillCntRŸtdictCntR troleDienstgradCntR¡tbattleFormationCnttdbIniRèR[RÅR¢R£R=RÉRÊRËRÌR RTtdbDoc((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRâ)
sV         4         
        ,          
"
"
"
"
"
"
"
"
"
"
"
"
" "* 
D 
         
      cCsotj|_|t}|j|it|jƒd6|jd6ƒ|j|j|j    t
t j ƒd||ƒdS(NRsR†i( RÕt    pysNormalR{Rqt adoUpdateExCRRsR†RSRKRUR
RT(RXRWR’tgmAccidRÅR[((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRït s 
*c    CsFtjd|||t|ƒ|||fƒ|j|jƒ|ƒdS(Ns`accid = %s playerID = %s isForbidden = %s operTime = %s timeLimit = %s operGMAccid = %s msg = %s(R    R3tctimeRuRO(RXRyRhRztoperTimet    timeLimitt operGMAccidRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRS} s    #
cCs…d}tj||ƒ\}}tjd||fƒtjƒ}x=t|ƒD]/}||j||ƒ7}|j|krN|SqNWdS(Nisaccid = %s gmOperCnt = %s(
RR;R    R3R R„RQR¶RQRy(RXRytgmOperRœRtoperCntR[R?((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRî™ s cCs0|t}t|ji|d6dgƒƒ}|S(NtLeaderIDR\(tUCN_FamilyInfoRQR'(RXRWtleaderIDR[tfamilyInfoSnap((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytgetFamilyLeaderFamilyID§ s
"cCsb|t}t|jit|ƒd6dd6tjd6ƒƒ}|jr^|jj|dƒ}n|S(s²éѯ´¦ÓںϷþ״̬µÄ½ÇÉ«ÁбíRsiR†R{N(    RqRQR'RRÕtpysServerMergeR|ttransform_outgoingRy(RXRWRyR[t
playerList((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytqueryMergePlayerList¬ s
 
3    cCs± tjƒ}|j|jƒd|jƒƒtjƒ}|jjƒj    t
dƒƒ|_|j}||_ t j d||jfƒ|t}t|jƒ}d}|tjkr¦|j|ƒ|jj    t
dƒƒ|_|j|_|jj    t
dƒƒ|_|j|_|jj    t
dƒƒ|_|j|_|jj    t
dƒƒ|_tjƒsj|jdkrzt j dƒqm    |jdkrm    |jtj|tƒt SnÇ|tj!krÅ|j|ƒ|jj    t
dƒƒ|_|j|_|jj    t
dƒƒ|_|j|_d|_|j|_|jj    t
dƒƒ|_|j"j#dƒ}    t$|    ƒ|dkr‚|jtj|tƒt S|    |}
|    |d    } |jdkr¹t j dƒqm    |j%d
kr‚i|
d 6t&j'||jƒd 6| d 6} yƒt(j)| ƒ} t*j+d| ƒ}t*j,|dd    ƒ}|j-ƒ}|dkrtt j d|
|fƒ|jtj|tƒt SWq‚q‚Xnt.ƒ}||j/dkr°|j%d    7_%qm    ||_/d|_%n¨|tj0krä|j|ƒ|jj    t
dƒƒ|_|j|_|jj    t
dƒƒ|_|j|_d|_|j|_|jj    t
dƒƒ|_|j"j#dƒ}    t$|    ƒ|dkr¡|jtj|tƒt S|    |}
|    |d    } |jdkrØt j dƒqm    |j%d
kr¡i|
d 6t&j'||jƒd 6| d 6} yƒt(j)| ƒ} t*j+d| ƒ}t*j,|dd    ƒ}|j-ƒ}|dkr“t j d|
|fƒ|jtj|tƒt SWq¡q¡Xnt.ƒ}||j/dkrÏ|j%d    7_%qm    ||_/d|_%n‰|tj1kr;|j|ƒ|jj    t
dƒƒ|_|j|_|jj    t
dƒƒ|_|j|_d|_|j|_|jj    t
dƒƒ|_|j"j#dƒ}    t$|    ƒ|d    krÀ|jtj|tƒt S|    |}
|jdkrét j dƒqm    |j%d
krøi|
d6|jd6t&j2|ƒd6} yÌt(j)| ƒ} t3j4j#dƒ}dj5|d ƒd| }t j |ƒt*j+|ƒ}t*j,|dd    ƒ}|j-ƒ}|j6ddƒ}|dkrêt j d|
|fƒ|jtj|tƒt SWqøqøXnt.ƒ}||j/dkr&|j%d    7_%qm    ||_/d|_%n2t7ƒ}t8ƒ}|j|ƒs        |t7ƒkr’t j9dƒ|jtj|t:ƒt S|t8ƒkrÏt j9d|jƒ|jtj|t;ƒt St3j<r        t j d|jƒ|jtj|t=ƒt Sn|j|jj    t
dƒƒksm    t j d|jj    ƒ|jj    ƒfƒ|jtj|tƒt S|j"rÍ    |j"j#dƒ}t$|ƒdkrÍ    t>j>|d    ƒj?ƒ|_@|jA|d ƒqÍ    ntBjCd!d"|jd    t&j2|ƒ|j@fƒ|jDd    7_DtEjFtEjGƒƒ|_H|jI|ƒs`
t j9d#|jƒ|jtj|t:ƒt StjJƒ}|j|_d|_K|tL}t7ƒ}t8ƒ}|jM|itN|jƒd$6|jKd%6ƒr t jOd&|jƒ|jPƒrü
|jQ||ƒq­ |jR||ƒnž|t7ƒks" t S|t8ƒks5 t Sd    |_Sd    |_Td'|_Ud    |_Vd    |_Wd    |_Xd    |_YtZj[ƒj\ƒ|_]|j]|_^|j]|__d|_`d|_ad|_bd    |_cd|_d|je||ƒ\}}}} |sö t Stfjgƒ}tjh|_i|jj|_j|jk|_k|j|_l| |_mt$| ƒ|_n|jƒ|_o|jƒ|_ptZj[ƒj\ƒ|_]t jOd(|j ƒtqjr|jsƒ|jtƒƒt S()sÕʺÅÈÏÖ¤isauth accid = %s-%s...is    127.0.0.1s iner no checkt7758520t1s|iittokent product_codetuids2http://checkuser.sdk.quicksdk.net/v2/checkUserInfottimeoutschecktoken fail:%s-%si
s1http://checkuser.happilygame.com/v2/checkUserInfottokenkeytchanneltguids/is/centerapi/checkuser.php?sRtOKsDB access excption!saccid = %s not found!sauthPack.AccID = %s, sid errors$input psw = %s while stored psw = %siþÿÿÿi)#s:OperatorID=%s&Step=%s&AccountID=%s&Flag=1000&DeviceFlag=%ss%s update LogNum errorRsR†splayer of accid = %s exists!i's(gstPlayerDetail Send OnCreate accid = %s(uRttagDataServerPlayerLoginR$RÔRÉR RøRsROR¥R¦RùR    RŠtIDTypeR÷RjRÕt
gitFreeSDKRúRR¯t TokenExpiretPhonetPswtAdultRótRegIPtIsDebugR—t dgPlayerLogintdisPswCheckErrorRNt    gitQkGametExtraRÎR‹RRt GetLoginKeyRºR»turllib2tRequestturlopenR'RPR€t    gitHYGametgitX7RR#t    ReportUrlR*treplaceRRRR‹tdisUserNameNotExistRkt    disGMKicktmd5t    hexdigestRtSetClientVersionR5RtLogNumR
RWRTt LastLoginTimetadoCheckUpdateCRpR†RqRrRR3RƒRæRâtLVtSextHairt    HairColort
PlayerTypeR°tCountryRùRúRûRüt    DataMapIDt    CopyMapIDtPosXtPosYtHPt UseGoldTypet UseSilverTypeR•RRðRéRRñRòRôRõRöR÷RøRýRþRRÿ(RXRWRRãt
accountRect    authAccIDR[tappTypet redefineIndext    extraListR&R(tvaluesRCtreqtresponsetthe_pagetnowTimeturlListttmpurlRïR}tinfoListRŽR˜R™RšR ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRæµ s²  !        
 
              
 
 
                   
 
 
                   
 
 
                         !)     #      
        ,                                                            cCsdS(N((RXRdt
fromPacketR,((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR‚ sicCs@d}tj||ƒ}tj|dƒ}tj||ƒ}dS(NRi(RR¹(RXRdRetdisconnectReasontpackBuf((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR— scCsdS(N((RXReRg((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR scCsdS(N((RXRWR((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRå scNCscd}|t}tjƒ}||j|ƒ7}tjdƒ|t}tjƒ}||j|ƒ7}tjdƒ|t}tj    ƒ}||j|ƒ7}tjdƒ|t
}tj ƒ}||j|ƒ7}tjdƒ|t }tj ƒ}    ||    j|ƒ7}tjdƒ|t}tjƒ}
||
j|ƒ7}tjdƒ|t}tjƒ} || j|ƒ7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ifyLoveGiftRec okstagDBPyCharmValueRec okstagDBPyPlayerIntimacy oks!tagDBCrossPersonalCompensation okstagDBCrossBillboard okstagDBAssistThanks okstagDBAssist okstagPlayerViewCachePy okstagDBAuctionAttention okstagDBAuctionRecord okstagDBAuctionItem okstagDBCrossPKUnNotifyOverInfo okstagDBCrossPKBillboard okstagDBPyXMZZ okstagDBPySealDemonRecord okstagDBPyBossAttention okstagDBPyBourseItemLastPrice okstagDBPyBourseRecord okstagDBPyFamilyStoreItem okstagDBPyPlayerFriend okstagPlayerEnemy okstagDBPyPlayerContacts okstagDBPyPlayerBlack okstagPersonalSocial okstagPlayerTeamTable okstagTeamMemberTable okstagFamilyInfo okstagPlayerFamily okstagDBFamilyVS okstagGameWorldEvent okstagDBMissionPub okstagDBIPManage okstagDBGameServerEventTrig okstagDBCountryInfo okstagDBCountryFamilyWarResult okstagDBCountryFamilyWarRace okstagDBCountryFamilyWarRequest okstagDBBillboard okstagDBGoldOrderForm okstagDBOverdueGoldOrderForm okstagDBFamilyTech okstagDBPlayerLabel okstagDBPlayerRecall okstagDBVsReward okstagDBFamilyReward okstagDBFamilyRewardRec okstagDBFamilyAction okstagGameFBPassRec okstagUniversalGameRec okstagGameGroup okstagGameGroupMember okstagGameGroupMutualInfo okstagGameBourseItem okstagHighLadderPlayer okstagDBHighLadderItem okstagHighLadderVSRec okstagDBCompensationItem okstagDBPersonalCompensation oks!tagDBEntireCompensationRequire okstagCompensationPlayerRec okstagPlayerViewCache oki    Rs2Compress game server player data failed!error =
%ss)Game server player data send ok! len = %d(¡t UCN_DBGameRecR t tagDBGameRect adoQueryAllR    RŠtUCN_DBPyFuncTeamttagDBPyFuncTeamtUCN_DBPyFuncTeamMemttagDBPyFuncTeamMemtUCN_DBPlayerRecDatattagDBPlayerRecDatatUCN_DBPyMineAreaAwardttagDBPyMineAreaAwardtUCN_DBPyMineAreaRecordttagDBPyMineAreaRecordtUCN_DBPyMineAreaItemttagDBPyMineAreaItemtUCN_DBPyCouplet tagDBPyCoupletUCN_DBPyUnNotifyLoveGiftRecttagDBPyUnNotifyLoveGiftRectUCN_DBPyCharmValueRecttagDBPyCharmValueRectUCN_DBPyPlayerIntimacyttagDBPyPlayerIntimacytUCN_DBCrossPersonalCompensationttagDBCrossPersonalCompensationtUCN_DBCrossBillboardttagDBCrossBillboardtUCN_DBAssistThanksttagDBAssistThankst UCN_DBAssistt tagDBAssisttUCN_PlayerViewCachePyttagPlayerViewCachePytUCN_DBAuctionAttentionttagDBAuctionAttentiontUCN_DBAuctionRecordttagDBAuctionRecordtUCN_DBAuctionItemttagDBAuctionItemtUCN_DBCrossPKUnNotifyOverInfottagDBCrossPKUnNotifyOverInfotUCN_DBCrossPKBillboardttagDBCrossPKBillboardt UCN_DBPyXMZZt tagDBPyXMZZtUCN_DBPySealDemonRecordttagDBPySealDemonRecordtUCN_DBPyBossAttentionttagDBPyBossAttentiontUCN_DBPyBourseItemLastPricettagDBPyBourseItemLastPricetUCN_DBPyBourseRecordttagDBPyBourseRecordtUCN_DBPyFamilyStoreItemttagDBPyFamilyStoreItemtUCN_DBPyPlayerFriendttagDBPyPlayerFriendtUCN_PlayerEnemyttagPlayerEnemytUCN_DBPyPlayerContactsttagDBPyPlayerContactstUCN_DBPyPlayerBlackttagDBPyPlayerBlacktUCN_PersonalSocialttagPersonalSocialtUCN_PlayerTeamTablettagPlayerTeamTabletUCN_TeamMemberTablettagTeamMemberTableRt tagFamilyInfotUCN_PlayerFamilyttagPlayerFamilytUCN_DBFamilyVSt tagDBFamilyVStUCN_GameWorldEventttagGameWorldEventtUCN_DBMissionPubttagDBMissionPubtUCN_DBIPManaget tagDBIPManagetUCN_DBGameServerEventTrigttagDBGameServerEventTrigtUCN_DBCountryInfottagDBCountryInfotUCN_DBCountryFamilyWarResultttagDBCountryFamilyWarResulttUCN_DBCountryFamilyWarRacettagDBCountryFamilyWarRacetUCN_DBCountryFamilyWarRequestttagDBCountryFamilyWarRequesttUCN_DBBillboardttagDBBillboardtUCN_DBGoldOrderFormttagDBGoldOrderFormtUCN_DBOverdueGoldOrderFormttagDBOverdueGoldOrderFormtUCN_DBUnclaimedGoldFormttagDBUnclaimedGoldFormtUCN_DBFamilyTechttagDBFamilyTechtUCN_DBPlayerLabelttagDBPlayerLabeltUCN_DBPlayerRecallttagDBPlayerRecalltUCN_DBVsRewardt tagDBVsRewardtUCN_DBFamilyRewardttagDBFamilyRewardtUCN_DBFamilyRewardRecttagDBFamilyRewardRectUCN_DBFamilyActionttagDBFamilyActiontUCN_GameFBPassRecttagGameFBPassRectUCN_UniversalGameRecttagUniversalGameRect UCN_GameGroupt tagGameGrouptUCN_GameGroupMemberttagGameGroupMembertUCN_GameGroupMutualInfottagGameGroupMutualInfotUCN_GameBourseItemttagGameBourseItemtUCN_HighLadderPlayerttagHighLadderPlayertUCN_DBHighLadderItemttagDBHighLadderItemtUCN_HighLadderVSRecttagHighLadderVSRectUCN_DBCompensationItemttagDBCompensationItemtUCN_DBPersonalCompensationttagDBPersonalCompensationtUCN_DBEntireCompensationRequirettagDBEntireCompensationRequiretUCN_CompensationPlayerRecttagCompensationPlayerRectUCN_PlayerViewCachettagPlayerViewCacheR!tcompressRRºt ERROR_NO_75R¼R½RRR·tVersionNoDefinet$GAMESERVER_GAMEWORLD_DATA_VERSION_NOtsendGameServerStringRÕtdgGameServerDataR3R‹(NRXRWRRCR[t    DBGameRect DBPyFuncTeamtDBPyFuncTeamMemtDBPlayerRecDatatDBPyMineAreaAwardtDBPyMineAreaRecordtDBPyMineAreaItemt
DBPyCoupletDBPyUnNotifyLoveGiftRectDBPyCharmValueRectDBPyPlayerIntimacytDBCrossPersonalCompensationtDBCrossBillboardtDBAssistThankstDBAssisttPlayerViewCachePytAuctionAttentionInfotAuctionRecordInfotAuctionItemInfotcrossPKOverInfotcrossPKtXMZZtsealDemonRecordt bossAttentiontbourseItemLastPricet bourseRecordtfamilyStoreItemt playerFriendt playerEnemytplayerContactstplayerBlacklistt playerSocialt
playerTeamt
teamMembert
familyInfot playerFamilytfamilyVStgameWorldEventt
missionPubtipManagetgameServerEventTrigt countryInfotcountryFamilyWarResulttcountryFamilyWarRacetcountryFamilyWarReqt    billboardt goldOrderFormtoverdueGoldOrderFormtunclaimeGoldFormt
familyTecht
playrLabelt playerRecallt
dbVSRewardtdbFamilyRewardtdbFamilyRewardRectdbFamilyActiontdbGameFBPassRectdbUniversalGameRect dbGameGrouptdbGameGroupMembertdbGameGroupMutualInfotdbGameBourseItemtdbHighLadderPlayertdbDBHighLadderItemtdbHighLadderVSRectdbDBCompensationItemtdbDBPersonalCompensationtdbDBEntireCompensationRequiretdbCompensationPlayerRectdbPlayerViewCachet compressDataRÅtSendData((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRä sF
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  " 
cCshd}tj|jƒ|ƒ\}}tj|jƒ|ƒ\}}|j|||jƒ|||ƒdS(Ni(RRÓRÔtsaveGameServerGameData(RXRWRRt
needReturnRd((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRãus#cCsƒ|tjkrì
tj||ƒ\}}tj||ƒ\}}tj||ƒ\}    }tj||ƒ\}
}tj|||
ƒ\} }|
rW
|tjkstj    dtj
d|tjfƒ} t j | ƒt jtjjtjƒtjƒdd|ƒtSymtj| ƒ} | jddƒ\}}t|ƒ}t jd||| fƒtj|| ƒ||} Wn6tj    dtjd    tjƒƒ} t j| ƒqd
Xt j d
t!| ƒƒd }yE|j"| |t#t$j%|ƒ}|j"| |t&t$j'|ƒ}|j"| |t(t$j)|ƒ}|j"| |t*t$j+|ƒ}|j"| |t,t$j-|ƒ}|j"| |t.t$j/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tvt$jw|ƒ}|j"| |txt$jy|ƒ}|j"| |tzt$j{|ƒ}|j"| |t|t$j}|ƒ}|j"| |t~t$j|ƒ}|j"| |t€t$j|ƒ}|j"| |t‚t$jƒ|ƒ}|j"| |t„t$j…|ƒ}|j"| |t†t$j‡|ƒ}|j"| |tˆt$j‰|ƒ}|j"| |tŠt$j‹|ƒ}|j"| |tŒt$j|ƒ}|j"| |tŽt$j|ƒ}|j"| |tt$j‘|ƒ}|j"| |t’t$j“|ƒ}|j"| |t”t$j•|ƒ}|j"| |t–t$j—|ƒ}|j"| |t˜t$j™|ƒ}|j"| |tšt$j›|ƒ}|j"| |tœt$j|ƒ}|j"| |tžt$jŸ|ƒ}|j"| |t t$j¡|ƒ}|j"| |t¢t$j£|ƒ}|j"| |t¤t$j¥|ƒ}|j"| |t¦t$j§|ƒ}|j"| |t¨t$j©|ƒ}|j"| |tªt$j«|ƒ}|j"| |t¬t$j­|ƒ}|j"| |t®t$j¯|ƒ}t j d ƒWqhtj°k
rWtj    dtjÃd ƒ} t j| ƒqhXn t j dƒ|dkrt²j³ƒ}tj´|_µtjÄ|_·d|_¸|j¹|jºƒ|j»ƒj¼|j»ƒj½|j»ƒj¾|j»ƒj¿|j»ƒjÀ|jÁƒƒt j d|ƒqno|tjÅkr?|jÆ||dt$jÇ|ƒn@|tjÈkrn|jÆ||dt$jÉ|ƒnt jÊd|ƒdS(NRsWSave game server crash data error:data version conflict!versionNO = %s, db version = %sttagGDGameServerGameDatas0.mdats|is'disCompresspydata len %s, GameData = %sRs4Decompress game server world data failed!error = 
%ss=Decompress game server world data success, len = %d!saving...isSave game server world data ok!sShort data buf, ignore...s Save game server player data ok!sEmpty crash data,ignore...s5Decompress game server world data failed! error = 
%ss=Decompress game server world data success, len = %s!saving...sIsaveGameServerGameData saveType = 0 decompressGameDataLen = %s responsed!t tagDBMailListttagDBMailItemListssaveType = %s not processed!(ËRÕtdgGameServerCrashDataRtReadWORDR;RRöR÷RRºt ERROR_NO_76R    RRRR(R)R*R Rt    DUMP_PATHRNR!R"RÎRjRŠR¾ta2b_hext ERROR_NO_77R¼R½R3R‹tsavegameServerWorldDataRhR RiRkRlRmRnRoRpRqRrRsRtRuRvRwRxRyRzR{R|R}R~RR€RR‚RƒR„R…R†R‡RˆR‰RŠR‹RŒRRŽRRR‘R’R“R”R•R–R—R˜R™RšR›RœRRžRŸR R¡R¢R£R¤R¥R¦R§R¨R©RªR«R¬RR­R®R¯R°R±R²R³R´RµR¶R·R¸R¹RºR»R¼R½R¾R¿RÀRÁRÂRÃRÄRÅRÆRÇRÈRÉRÊRËRÌRÍRÎRÏRÐRÑRÒRÓRÔRÕRÖR×RØRÙRÚRÛRÜRÝRÞRßRàRáRâRãRäRåRæRçRèRéRêRëRìRíRîRïRðRñRòRótShortBuft ERROR_NO_78RttagDBUpdateReturntdgUpDateR&tgstSaveGameServerCrashDataRR2R7RKR¬R;t    poolIndexRdt
srcSvrTypet
dstSvrTypeRt ERROR_NO_80t ERROR_NO_81R¨tdgPlayerMailListtsavePlayerMailDataREtdgPlayerMailItemListRFR(RXRWRRCRtsaveTypeRCtmarkt    versionNORÊt gameDataLentgameDataRÅtdecompressGameDatat    pyDataLent    pyDataHextgameDataReadPosR tdecompressGameDataLen((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRBžs®% . "         
 "             cCsÛ|t|ƒkr$tj|ƒ‚ntj||ƒ\}}tjd|||fƒ||}|ƒ}    ||    _|    j|ƒg}
xwt    d|ƒD]f} |    j
ƒ|    j ||t|ƒƒ} | dkrÞtj|ƒ‚n|| 7}|
j |    j ƒƒq•W|
s    |Sd} xÅtrÖy|j|
ttƒPWqtjjk
rÒ}tj| krg| d7} qntƒtjd|jjtjƒdd|    fƒtjdtjd||| fƒ}tj|ƒ|SXqW|S(    Ns Saving %s cnt = %s playerID = %siiÿÿÿÿis%s.%s:rec = %siRs4Insert failed!PlayerID = %s, error = %s, trycnt = %d(R‹RÕRNRR;R    R3RKtadoDeleteByIndexRQRPR¶RRRaRNRTRUR”Rbt PyMongoErrorR#RdRReRfRgRhRRºt ERROR_NO_152(RXRhRCRRiRjRWtrecCntR[R/RAR?R\RmRnRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytsaveGameServerPlayerDataÀsB
         
 
    
.%     cCsì|t|ƒkr;tjd||fƒtj|ƒ‚ntj||ƒ\}}tjd||fƒ||}|j|ƒg}|ƒ}    x¯td|ƒD]ž}
|    j    ƒ|    j
||t|ƒƒ} |    j ƒd| kr!tj d|j jtjƒdd|
fƒtj|ƒ‚n|| 7}|j|    jƒƒq W|sL|Sd} x“trçyçd} tt|ƒƒ}|| kr˜|j|ttƒn¨ttj|t| ƒƒƒ}t|ƒ|}tjd    ||fƒx_t|ƒD]Q}
|
|}|
|d
kr||}n||||!}|j|ttƒqëWPWqUtjjk
rã}tj | kry| d
7} qUnt!ƒtjd |j j"tjƒdd|fƒtj d |j j"tjƒdd|| fƒ|SXqUW|S(Ns!!!Saving Error %s cnt = %ssSaving %s cnt = %siiÿÿÿÿs!%s.%s readData failed, index = %siiis"    insertTimes=%s,perTimeCount=%sis%s.%s save %s failed!s%s.%s, error = %s, trycnt = %sii(#R‹R    R3RÕRNRR;tdrop_collectionRQRPR¶t
dumpStringRRet_UserCtrlDB__name_RgRhRRRaRNRPRTRURjtmathtceiltfloatRR”RbRcR#RdRRf(RXRCRRiRjRWRhR[RAR/R?R\Rmtmax_sizet
docsStrLent insertTimest perTimeCountR+tinsDocsRn((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRMës\
     
 
 .
     
 
.1    c Cs¬|t|ƒkr$tj|ƒ‚ntj||ƒ\}}tjd|ƒ||}|ƒ}xEtd|ƒD]4}    |j||t|ƒƒ}
d|
kr¯tj|ƒ‚n||
7}d} xât    r£yG|j
i|j d6|j d6ƒ|j
i|j d6|j d6ƒPWqÂt jjk
rŸ} tj| krÂ| d7} qÂqÂtƒtjd|jjtjƒdd|j fƒtjd    |j | | fƒ|SXqÂWqpW|S(
Ns'Saving PlayerDeleteFriend data Cnt = %siiÿÿÿÿRKtFriendIDis%s.%s:PlayerID = %sis5delete failure!PlayerID = %s, error = %s, trycnt = %d(R‹RÕRNRR;R    R3RQR$RNRDRKRuR”RbRcR#RdRReRfRgRhR( RXRCRt
packStructRiRWRhR[R/R?R\RmRn((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytsavePlayerDeleteFriendData&s4
     
    !! 1 c Cs|rt|ƒdkrDtjdtjd|ƒ}tj|ƒdSd}tj||ƒ\}}tjd||fƒ||}|ƒ}    t|ƒ}
x{t|ƒD]Z} |    j    ƒ|    j
|||
ƒ} d| krèt j |ƒ‚n|| 7}|    j |ƒq¥Wntjd|ƒdS(NiRs-invalid player mail data, collectionName = %sisSaving %s cnt = %siÿÿÿÿs0empty player mail list data, collectionName = %s(R‹RRºt ERROR_NO_82R    RR;R3RQRPR¶RÕRNt    adoInsert( RXRCRiRjRWRÅRRhR[R/tdatalenR?R\((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRYGs& 
     
 
c
Cs|jƒ}d}t|ƒ}y¯tjƒ}|j|||ƒ}tjƒ}|j|jd|j    ƒt
j t
j ƒƒ|_ |t}|j|ƒs²|jtj|dƒtS|jtj|dƒtSWn?tjdtjd|jtjƒfƒ}    tj|    ƒnXtS(NiRRs*Insert Acc failed, accid = %s, error = 
%s(RÔR‹RttagBDStringTypeSendR$R RøR¶RcRnR
RWRTt RegisterTimeR÷RµR—RÕt dgInsertAccRUR‚RNRRºt ERROR_NO_83RùR¼R½R    (
RXRWRRCRRzt    oTypeSendtAccR[RÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRìds&    
+c Cs#|jƒ}t|ƒ}d}y¿tjƒ}|j|||ƒ}|t}tjƒ}|j|_t    ƒ}    |j
|ƒsŸ|    t    ƒkrt St j rŸt Snd|_|j|it|jƒd6|jd6ƒsØt StSWn?tjdtjd|jtjƒfƒ}
tj|
ƒnXt S(NiiRsRKRs;OnPlayerIDMarkDeleted failed! Playerid = %d, exception = %s(RÔR‹RttagMarkPlayerDeletedR$RqR RpRKRRúRUR#RkR†RRRsRNRRºt ERROR_NO_84R¼R½R    ( RXRWRRCRzRtoMarkPlayerDeletedRTtoPlayert SidErrorCntRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRí{s.   
              , +cCsyÓtjƒ}|j|jƒƒ|t}tjƒ}|j|_|j    |ƒsdt
j dƒt St
j dt j|j|jfƒtjƒ}t j|_|j|_|j||jƒƒt
j dƒtSWn6tjdtjdtjƒƒ}t
j|ƒnXt S(Ns"gstGetCoin, not found match records%Type = %d, AccId = %s, GoldCoins = %dsprocess gstGetCoin okRs'OnGetCoin catch excepption, error = 
%s(RttagDGetValueByAccR$RÔt UCN_AccCoinsR t tagAccCoinsR€RsRèR    R3RURÕR±t    GoldCoinsRttagDServerValueTypetdgCoinRtValueRRRNRRºt ERROR_NO_85R¼R½(RXRWRtoDGetValueByAccRTt    oAccCoinst    oSvrValueRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRî¢s( 
   #    "cCs.yðtjƒ}|j|jƒƒtjd|j|j|jfƒ|t    }t
j ƒ}|j|_ t jƒ}tj|_|j|ƒsµtjdƒ|j||jƒƒtStjdtj|j|j|jfƒ|j|jkrtjdƒ|j||jƒƒtS|j|j8_|j|j7_|j|ƒsŸ|j||jƒƒtjdtjdtj|j|jfƒ}tj|ƒtS|j|_|j||jƒƒtj|_|j|_|j||jƒƒWn7tjdtjdt j!ƒƒ}tj|ƒtSXt"S(Ns3gstCoinChange, AccId = %s, PlayerID = %d, coin = %ds"gstGetCoin, not found match recordsEType = %d, AccId = %s, PlayerID = %d,  Before exchange GoldCoins = %dsnot enough coin to exchangeRsEType = %d, AccId = %s, PlayerID = %d,  update exchange GoldCoins failsOnCoinChange throw exception
%s(#RttagMDCoinChangeReqR$RÔR    R3R€RKtCoinR‡R RˆRsRRŠRÕtdgCoinChangeResultRRèRRRUR²R‰t UseGoldCoinst    adoUpdateRRºt ERROR_NO_87RŒR‹t ERROR_NO_88R¼R½RN(RXRWRtoCoinChangeReqRTRtretPackRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRï¾sF #
     ) .    " cCsyÕtjƒ}|j|jƒƒtjƒ}tjƒ}|j|_    d|_
|t }t j |_|j|_t|jƒ|_|j|it|j    ƒd6|j
d6ƒ|_|j|_|j||jƒƒWn7tjdtjdtjƒƒ}tj|ƒtSXtS(NiR¹R†Rs%OnCheckPlayerExist catch exception
%s(RttagBDCheckNameExistR$RÔRttagDBPlayerNameIsExistR RptNameR¹R†RqRÕtdgCheckPlayerExistR&R‹tNameLenRrRR2RKRRRRºt ERROR_NO_89R¼R½R    RURN(RXRWRtcurPackR™R„RTRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRðs&        
  / " cCstjdƒdS(Nsprocess gstOnDay in the future!(R    R(RXRWR((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRñscCsƒ|jƒ}d}tj||ƒ\}}d|j||dtj||ƒkrtjdtjd|ƒ}t    j|ƒt
St S(NiiÿÿÿÿR„Rs)Save Player GM Oper failed, playerid = %d( RÔRR;R9R R„RRºt ERROR_NO_90R    RURN(RXRWRRCRtPlayerIdRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRò$s ( cCs‰tjƒ}|j|jƒƒ|t}|jit|jƒd6ƒjƒ}t    j
ƒ}t j |_ ||_|j||jƒƒtS(NRs(RR†R$RÔt UCN_ExpiationR'RR€R(RRŠRÕtdgGetExpiationCountRRŒRRRN(RXRWRR RTtrecCountR™((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRó.s 
%      cCs‰tjƒ}|j|jƒƒ|t}|jit|jƒd6ƒjƒ}t    j
ƒ}t j |_ ||_|j||jƒƒtS(NRs(RR†R$RÔtUCN_PetExpiationR'RR€R(RRŠRÕtdgGetPetExpiationCountRRŒRRRN(RXRWRR RTR¥R™((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRô<s 
%      c Csªtjƒ}|j|jƒƒ|j}tjƒ}tj|_    d|_|t
}|j it |j ƒd6ƒ}|t
}xþ|D]ö}    |j|krœPntjƒ}
|    d|
_t|    dƒ|
_|    d|
_|    d|
_|    d|
_|    d|
_|    d|
_|    d    |
_|    d
|
_|    d |
_|    d |
_|    d |
_|    d|
_|    d|
_|    d|
_|    d|
_|    d|
_|    d|
_ |    d|
_!|    d|
_"|    d|
_#t|    dƒ|
_$|    d|
_%|    d|
_&|    d|
_'|    d|
_(|    d|
_)|    d|
_*|    d|
_+|    d|
_,|    d |
_-|    d!|
_.t|    d"ƒ|
_/|    d#|
_0|    d$|
_1|    d%|
_2|    d&|
_3|    d'|
_4|    d(|
_5|    d)|
_6t|    d*ƒ|
_7|    d+|
_8|    d,|
_9|    d-|
_:|    d.|
_;|    d/|
_<|    d0|
_=|    d1|
_>t|    d2ƒ|
_?|j@jA|
ƒ|jBi|
jd6ƒ|jd37_qƒW|jdkrtCS|jD||jEƒƒtFS(4NiRstExpiationIndext ExpiationTimetGoldt    GoldPapertSilvert SilverPapert
ItemTypeIDRtIsLockedt ItemPlaceTypetItemPlaceIndextIsBindt
ItemStarLVt IdentifyPartCurDurgtMaxDurgtCanPlaceStoneCountt ItemPropertyt SoulPropertytMakert    MakerNametStone1tStone2tStone3tStone4tStone5tStone6tStone7tStone8tStone9t
RemainHourt
CreateTimet ElementEffecttIsSuitetFitLVtEquipAddSkillCntt
ExpireTimet BaseAtkPlust BaseDefPlust AddSkillDatatBaseHPt BaseMagicDeftEquipMinAtkValuet ProficiencytRelMaxAddSkillCnttFamilyActiveValueRêRëi(GRttagMDGetExpiationExR$RÔRRttagDMGetExpiationExResultRÕtdgGetExpiationRR£R'RR€t tagExpiationR¨RRsR©RªR«R¬R­R®R¯R°R±R²R³R´RµR¶R·R¸R¹RºR»R¼R½R¾R¿RÀRÁRÂRÃRÄRÅRÆRÇRÈRÉRÊRËRÌRÍRÎRÏRÐRÑRÒRÓRÔRêRëtDatasRRRDRURRRN( RXRWRR t    needCountR R[t
expiationstcolDeltcurDatat    expiation((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRõJsŠ           
 
                                              7cCsªtjƒ}|j|jƒƒ|t}tjƒ}|j|_|j    |ƒ}tj
ƒ}t j |_ |jƒ|_|jƒ|_|j||jƒƒ|s¦tStS(N(RR†R$RÔR¦R ttagPetExpiationR€RsRèR{RÕtdgGetPetExpiationRRcRÉRnRRRURN(RXRWRR RTtdbDataR R ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRös 
    cCs¤tjƒ}d|j|jƒƒkrTtjdtjddƒ}tj|ƒtS|t    }|j
ƒ|j |ƒs tjdtj dƒ}tj|ƒtSt S(s·þÎñÆ÷Êý¾Ý¿â°æ±¾Ë¢ÐÂiÿÿÿÿRstagServerDataVersionNO:%Sslack of pack datas*insert tagServerDataVersionNO data failed!(R ttagServerDataVersionNOR¶RÔRRºt ERROR_NO_91R    RUtUCN_ServerDataVersionNOR@Ryt ERROR_NO_92RN(RXRWRtdbRecvRÅRT((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRºDs  
 
 cCstjƒ}|j|jƒƒtjƒ}d|j|jƒkrltj    dtj
dƒ}t j|ƒt St ƒ|_t|ddtjtjƒ|_|t}|j|i|jd6t|jƒd6ƒstj    dtjd|j|j|jfƒ}t j|ƒt StS(    NiÿÿÿÿRs$tagDBMapServerInfo:lack of pack datattagDBMapServerInfotLogIndextLogIDRXs:OnMapServerInfo failed:LogID = %s, LogIndex = %s, Msg = %s(RR{R$RÔR RçR¶RcRRºt ERROR_NO_93R    RURPtTimeRR#t LOGINDEX_FEEDt LOGINDEX_STEPRètUCN_DBMapServerInfotadoCheckUpdateExRéRRXt ERROR_NO_94RN(RXRWRR-RáRÅRT((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRøXs    !
,. cCs|ytjdƒWnWtjdtjdt|jƒƒt|jƒƒtj    ƒƒƒ}tj|ƒt
SXtjdƒt S(Ns%begin process gstUpdateTotalSavePointRsMOnUpdateTotalSavePoint throw a exception, packdata = %s, packdata len = %d
%ss#end process gstUpdateTotalSavePoint( R    R3RRºt ERROR_NO_96R¿RÔR‹R¼R½RURN(RXRWRRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRùnsB  c    Cspy2tjƒ}|j|jƒƒ|t}|ji|jd6itjd6d6ƒj    ƒ}|tj
krwtj }nJ|ji|jd6tj d6ƒj    ƒ}|dkr¸tj }n    tj}tjƒ}||_|jƒjtjkrtj|jƒ_|j|jƒ_n|j|tj|jƒƒWn7tjdtjdtj ƒƒ}t!j|ƒt"SXt#S(Nt    ReceverIDtMailTypes$neiRs)OnGetPlayerMailState throw a exception
%s($RttagDBGetMailListReqR$RÔtUCN_DBMailListR'RKRÕtwmtSaveR(tMAX_PLAYER_MAIL_COUNTtpmiFullt wmtUnReadedt pmiNewLettertpmiNullRttagPlayerMailInfotInfoTypeR¬RTRR9tstRoutetRouteServerIndexRSRøtdgPlayerMailStateRRRºt ERROR_NO_97R¼R½R    RURN(    RXRWRR-RTtdocCounttstateR RÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRús, 
0 )            " c
CsBytjƒ}|j|jƒƒ|t}tjƒ}|j|_|j|ƒ}|t    }tj
ƒ}|j|_|j |ƒsœt j d|jƒtStjƒ}tj|_|jƒ|_t|jƒ|_||_t|ƒ|_|j||jƒƒWn7tjdtjdtjƒƒ}    t j|    ƒtSXt S(sÈ¡µÃÍæ¼ÒÓʼþÏêÇés mail list not exist! mailid = %sRs$OnGetMailDetail throw a exception
%s(!RttagDBGetMailDetailReqR$RÔtUCN_DBMailItemListR RFtMailIDR‘RõRERèR    RRURttagDBMailDetailViewRÕt dgMailDetailRtMailDetailDataR‹tMailDetailDataLent MailItemDatatMailItemDataLenRRRRºt ERROR_NO_98R¼R½RN(
RXRWRR-RTtdbMailItemListR•t
dbMailListR RÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRû±s2 
 
        " c
Csoy1tjƒ}|j|jƒƒtjƒ}tj|_|t    }|j
i|j d6itj d6d6ƒ}x—|D]}tj ƒ}t|dƒ|_|d|_t|dƒ|_t|dƒ|_|d|_|d|_|d    |_|jj|ƒquWt|jƒ|_|j||jƒƒWn7tjd
tjd tj ƒƒ}    t!j|    ƒt"SXt#S( NRòs$ltt    ExistTimeRRót
SenderNametTitlet
LetterTypetTitleUseSysMessageRs$OnGetPlayerMail throw a exception
%s($RRôR$RÔRttagDBGetPlayerMailRÕt
dgMailListRRõR'RKt MailExistTimet tagDBMailInfoRRRóRRRRRtMailRRR‹t    MailCountRRRRºt ERROR_NO_99R¼R½R    RURN(
RXRWRR-R RTRARWtmainInfoRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRüÓs0   
*      " c Cs„t}tjƒ}ytjƒ}|j|jƒƒ|j|_|j|_xÕtr#tj    ƒ}d|j
|jƒkr¢t j dt j dƒ}tj |ƒPn|t}|jit|jƒd6dd6ƒ}    |    jƒdkrütjd|jƒPn|t}|ji|jd6ƒjƒdkrTt j dt jd    ƒ}tj |ƒPntjƒ}
|j|
_|    dd
|
_|j|
_|j|
_|j|
_|j|
_|j|
_|j|
_|j |
_ |j!|
_!t"|
j!ƒ|
_#|j$|
_$|j%|
_%|
j&|ƒrt}nPqOWWn6t j dt j'd t(j)ƒƒ}tj |ƒnXt*j+|_,|j-||j.ƒƒ|S( NiÿÿÿÿRs+tagDBMailList_SaveSysMail lack of pack dataRsiR†s"not exist player role , accid = %sRs+OnAddPlayerMailByAccID: exist a same mailidRKs+OnAddPlayerMailByAccID throw a exception
\s(/RURR{R$RÔRcRnRNR ttagDBMailList_SaveSysMailR¶RRºt ERROR_NO_100R    RqR'RRsR(R3RõRt ERROR_NO_101REtSenderIDRòRóRRRÝRRtContentR‹t
ContentLenRtContentUseSysMessageRyt ERROR_NO_102R¼R½RÕtdgAddPlayerMailByAccIDRRR( RXRWRR R R-tcurMailRÅRTRARW((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRýðs\          
&
%                     " cCs5y÷tjƒ}|j|jƒƒ|t}tjƒ}|j|_|j|ƒsŒt    j
dt    j dt |jƒƒƒ}t j    |ƒtS|t}tjƒ}|j|_|j|ƒsöt    j
dt    jdt |jƒƒƒ}t j    |ƒtSWn7t    j
dt    jdtjƒƒ}t j    |ƒtSXtS(NRsDeleteMail fail:data = %ss!OnDeleteMail throw a exception
%s(RttagDBDeleteMailR$RÔRõR RERReRRºt ERROR_NO_103R¿R    RURRFt ERROR_NO_104t ERROR_NO_105R¼R½RN(RXRWRR-RTRWRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRþ(s, 
  ( 
  ( " cCsÄy†tjƒ}|j|jƒƒ|t}tjƒ}|j|_|j|ƒsÊt    j
t j ƒdd|j ƒj|jf|jƒƒtjdtjd|j ƒj|jfƒ}tj|ƒtS|jrâ|j|_n|jrú|j|_n|jrd|_n|jrK|j|_d|_d|_d|_d|_n|j|ƒs×t    j
t j ƒdd|j ƒj|jft|jƒƒƒtjdtj d|j|j ƒjfƒ}tj|ƒtS|j!r…|t"}|j|_|j#|ƒs…t    j
t j ƒdd|j ƒj|jft|jƒƒƒtjdtj$d|j|j ƒjfƒ}tj|ƒtSnWn7tjdtj%dt&j'ƒƒ}tj|ƒtSXt(S(NsUserLogs\UpdateMailFailDumps
%d_%s.mdatRsDupdate mail fail, load tagDBMailList fail, session = %d, mailid = %sis,update mail fail, maiid = %s, sessionid = %ds!OnUpdateMail throw a exception
%s()RttagDBUpdateMailR$RÔRõR RERRèRRR RR¬R;RRºt ERROR_NO_106R    RUtUpdateMailTypeRótUpdateLetterTypeRt GetAllMoneyRÝt
ReturnMailR RòRR•R¿t ERROR_NO_107t
GetAllItemRRet ERROR_NO_108t ERROR_NO_109R¼R½RN(RXRWRR-RTRWRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRÿEsR 
  8.                                >.     
 >.  " c    Csmy/tjƒ}|j|jƒƒtjƒ}tj|_|j    |_    t
|j    ƒ|_ |t }|j it|j    ƒd6dd6ƒ}|jƒs©d|_d|_no|dd|_|t}|j i|jd6itjd6d6ƒjƒ}|tjkrd|_n    d|_|j||jƒƒWn7tjd    tjd
tjƒƒ}tj|ƒtSXtS( NRsiR†RKRòs$neRóiRs'OnQueryCanSendMail throw a exception
%s(RRšR$RÔRR›RÕtdgQueryCanSendMailR&RœR‹RžRqR'RR(RKR2RõRöR÷RRRRºt ERROR_NO_110R¼R½R    RURN(    RXRWRR-R RTRAR(RÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRzs0    
&      
0     " c Cstjƒ}tj|_t}xØtrøyŽtjƒ}|j|j    ƒƒ|t
}d}xÚtr5yW|j iit ƒd6d6t |jƒd6dd6iidd6d6ttttƒPWq\tjjk
r1tj|krî|d7}q\nt}tƒtjd    tjd
|j|fƒ}tj|ƒPq\Xq\W|s@Pn|jit |jƒd6dd6ƒjdƒ}    |    jƒr…|    d}
|
d } |
d |_|
d |_|
d|_d}x¹trwy6|j i| d 6iidd6d6ttttƒPWq¿tjjk
rstj|kr0|d7}q¿nt}tƒtjd    tj d
|j|fƒ}tj|ƒPq¿Xq¿W|s…Pq…n|jit |jƒd6dd6ƒjƒ|_!Wn<tjd    tj"dt#j$ƒƒ}tj|ƒt}nXPq!W|j%||j&ƒƒ|S(Nis$ltt ExpiredTimeRstIsAcceptis$setiRs6OnAccIDSendPrize!Update failed!AccID = %s, trycnt = %dt
CheckValuetPrizeIDtPrizeNumR²s%OnAccIDSendPrize throw a exception
%s('RttagDPlayerGetItemRÕtdgAccIDSendPrizeRRNRR†R$RÔtUCN_AccIDSendPrizeRBRPRR€RUR”RbRcR#RdRRRºt ERROR_NO_111R    R'RÏR(tItemIDRR²t ERROR_NO_112tRemainItemCountt ERROR_NO_113R¼R½RR( RXRWRR R~R-RTRmRÅRARWR9((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR›sn       
    R
%     / 
 
       1
%     3" 
c Csfy(tjƒ}|j|jƒƒddl}|jƒ}|t}|jit|j    ƒd6dd6ƒj
ƒ}|jƒ|}|t j dkr­t jd||fƒn|jƒ}tjƒ}    tj|    _||    _|j||    jƒƒ|jƒ|}|t j dkr't jd|ƒnWn7tjdtjd    tjƒƒ}
t j|
ƒtSXtS(
NiÿÿÿÿRsiR8g@@s4OnCheckItemPrize db process time = %s, PrizeCnt = %sssendString process time = %sRs%OnCheckItemPrize throw a exception
%s(RR†R$RÔttimeitt default_timerR>R'RR€R(R#tProfileThresholdR    RRRŠRÕtdgCheckItemPrizeResultRRŒRRRRºt ERROR_NO_114R¼R½RURN( RXRWRR-RDt    startTickRTtPrizeCntt processTimeR RÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRÛs.   
,       " cCsvy8tjƒ}|j|jƒƒ|t}tjƒ}|j|_t    j
t    j ƒƒ}|j |ƒsÀd|_ ||_|j|ƒsÀ|jtj|ƒtjd|j|j fƒtSn|j d7_ ||_|j|ƒs|jtj|ƒtjd|j|j fƒtS|jtj||jƒƒWn7tjdtjdtjƒƒ}tj|ƒtSXtS(Nis %s Update Error !doc.LogNum = %diRs#OnCheckLoadAcc throw a exception
%s( RR†R$RÔR÷R RøR€RùR
RWRTRúRHR|RµR—RÕR7R    R3RURIRüR‚tdgPlayerAccLoadRRºt ERROR_NO_115R¼R½RN(RXRWRR-RTRWtstrNowRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRús4 
               " c    Cs,yîtjƒ}|j|jƒƒtjƒ}|j|jƒtjd|j|j    |j
fƒ|t }t j ƒ}tjdƒ|_|j|_|j    |_|j
|_tƒd|_d|_d|_tƒ|_|j|_tjƒ}|j|ƒsŽtjd    |j|j|j    |j
fƒ|j|_|jjƒ|_|j    |_    |j
|_d|_ |j!|t"t#j$ƒ|j%ƒt&S|j|_|jjƒ|_|j    |_    |j
|_d
|_ |j!|t"t#j$ƒ|j%ƒWn7t'j(d t'j)d t*j+ƒƒ}tj'|ƒt&SXt,S(Ns<Type == gstAddAccItem, accid = %s, itemID = %d, itemCnt = %di imiii<RÇisbType == gstAddAccItem, transactionIDStr = %s, accid = %s, itemID = %d, itemCnt = %d, Insert Error!iRs!OnAddAccItem throw a exception
%siªiðgi@\iŸÕ!(-RR{R$RÔt tagIRAddItemRcR    RR€R@tItemCntR>R ttagAccIDSendPrizeR tGetTransactionIDStrR9RsR:R;RPR7t PrizeReasonR8t SendPrizeTimeR²RttagIAddItemResultRytLengthtAccLenRR2RR¦RÕtdgAddAccItemOKRRURRºt ERROR_NO_116R¼R½RN(    RXRWRR-trecvDataRTRWR RÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRsL  #
               )               $" c    CsyÄtjƒ}|j|jƒƒtjƒ}|j|jƒ|t}tj    ƒ}|j
|_ |j |ƒ}|j |_ |j|ƒsÃtjdtjd|j
|j fƒ}tj|ƒtSWnFtjdtjd|j
|j tjƒfƒ}tj|ƒtSXtS(NRs?OnUpdateTelLockState!Update failed!ACCID = %s,TelLockState = %ssHOnUpdateTelLockState ACCID = %s, TelLockState = %s, throw a exception
%s(RR{R$RÔR ttagDSAccount_UpdateTelLockStateR¶RcR÷RøRsRùRút TelLockStateRJRRºt ERROR_NO_117R    RUt ERROR_NO_118R¼R½RN(    RXRWRR-RZRTRWR~RÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR\s&  
   ( 1 c    CsyÄtjƒ}|j|jƒƒtjƒ}|j|jƒ|t}tj    ƒ}|j
|_ |j |ƒ}|j |_ |j|ƒsÃtjdtjd|j
|j fƒ}tj|ƒtSWn7tjdtjdtjƒƒ}tj|ƒtSXtS(NRs4OnUpdateAccAdult!Update failed!ACCID = %s,Adult = %ss%OnUpdateAccAdult throw a exception
%s(RR{R$RÔR ttagDSAccount_UpdateAdultR¶RcR÷RøRsRùRúR4RJRRºt ERROR_NO_121R    RUt ERROR_NO_122R¼R½RN(    RXRWRR-RZRTRWR~RÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR‚s&  
   ( " cCsyÝtjƒ}|j|jƒƒ|t}tjƒ}|j|jƒt    |ddt
j t
j ƒ|_ |j|ƒr„d|_n    d|_tjƒ}tj|_|jƒ|_t|jƒ|_|j||jƒƒWn7tjdtjdtjƒƒ}tj|ƒtSXtS(NRØR¨iiRs#OnAddExpiation throw a exception
%s(RR{R$RÔR£R RØR¶RcRR#t tagExpiation_ExpiationIndex_FEEDt tagExpiation_ExpiationIndex_STEPR¨Ryt    ADOResultRÕtdgAddExpiationOKRR‹RnRRRRºt ERROR_NO_123R¼R½R    RURN(RXRWRR-RTRWR RÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR¥s, 
         " cCsyÝtjƒ}|j|jƒƒ|t}tjƒ}|j|jƒt    |ddt
j t
j ƒ|_ |j|ƒr„d|_n    d|_tjƒ}tj|_|jƒ|_t|jƒ|_|j||jƒƒWn7tjdtjdtjƒƒ}tj|ƒtSXtS(NRßR¨iiRs&OnAddPetExpiation throw a exception
%s(RR{R$RÔR¦R RßR¶RcRR#t#tagPetExpiation_ExpiationIndex_FEEDt#tagPetExpiation_ExpiationIndex_STEPR¨RyRdRÕtdgAddPetExpiationOKRR‹RnRRRRºt ERROR_NO_124R¼R½R    RURN(RXRWRR-RTRWR RÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRÅs, 
         " c Cs7yùtjƒ}|j|jƒƒtjƒ}d|j|jƒkr‚|jt    j
|ƒt j dt j dƒ}tj |ƒtSd}xWtráyÈ|t}tjƒ}|j|_|j|ƒ}    d|_|j|ƒtjƒ}
|j|
_|
j|ƒ}    |j|
_|j|
_|j|
_|j|
_|j|
_|j|
_|
j|ƒPWq‹tj j!k
rÝt"j#|krŽ|d7}q‹nt j dt j$d|j|j|fƒ}tj |ƒ|jt    j
|ƒtSXq‹W|j%t    j
|dƒWn7t j dt j&dt'j(ƒƒ}tj |ƒtSXtS(    NiÿÿÿÿRs2tagDBPlayer_DeleteRoleUpdateRole:lack of pack dataiis[OnServerMergeDeleteRole!Update failed!DeletePlayerID = %s, UpdatePlayerID = %s, trycnt = %dRs,OnServerMergeDeleteRole throw a exception
%s()RR{R$RÔR t tagDBPlayer_DeleteRoleUpdateRoleR¶RcR—RÕtdgServerMergeDeleteRoleRRºt ERROR_NO_125R    RURNRqRptDeletePlayerIDRKRúR†RütUpdatePlayerIDRªR«R¬R­t WarehouseGoldtWarehouseSilverR”RbRcR#Rdt ERROR_NO_126R‚t ERROR_NO_127R¼R½( RXRWRR-RZRÅRmRTRWtRett    updatedoc((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR    äsV       
                
+      " c
Csty6tjƒ}|j|jƒƒtjƒ}|j|jƒd}xØtryO|t    }tj
ƒ}|j |_ |j |ƒ}|j |_ |j|ƒPWqGtjjk
rtj|krÑ|d7}qGntjdtjd|j |fƒ}    tj|    ƒ|jtj|ƒtSXqGW|jtj|dƒWn7tjdtjdtjƒƒ}    tj|    ƒtSXtS(NiiRsDOnServerMergeUpdateAccState!Update failed!PlayerID = %s, trycnt = %dRs0OnServerMergeUpdateAccState throw a exception
%s( RR{R$RÔR ttagDBPlayer_ChangeAccStateR¶RcRNRqRpRKRúR{RüR”RbRcR#RdRRºt ERROR_NO_128R    R—RÕtdgServerMergeUpdateAccStateRUR‚t ERROR_NO_129R¼R½(
RXRWRR-RZRmRTRWRtRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR
's:      
 
%     " c    CsÎystjƒ}|j|jƒƒtjƒ}|j|jƒtj    d|j
|j fƒd}xt rqy˜|t }|jit|j ƒd6ƒjƒr¨d|_n    d|_tjƒ}tj|_|jƒ|_t|jƒ|_|j||jƒƒPWqdtjjk
rmtj|kr7|d7}qdntjdtj d|j
|fƒ}tj|ƒt!SXqdWWn7tjdtj"dt#j$ƒƒ}tj|ƒt!SXtj    d|j
|j fƒt S(    Ns6OnServerMergeChangeName playerID = %s, newName = %s...iR¹iRs@OnServerMergeChangeName!Update failed!PlayerID = %s, trycnt = %ds,OnServerMergeChangeName throw a exception
%ss7OnServerMergeChangeName playerID = %s, newName = %s ok!(%RR{R$RÔR ttagDBPlayer_ChangeNameR¶RcR    R3RKR¹RNRqR'RR(RdRÕtdgServerMergeChangeNameRR‹RnRRR”RbRcR#RdRRºt ERROR_NO_131RUt ERROR_NO_132R¼R½(    RXRWRR-RZRmRTR RÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR Ls@      
% -      
%  " cCsày¢tjƒ}|j|jƒƒtjƒ}|j|jƒt|ddtj    tj
ƒ|_ |t }|j |ƒs¡tjdtjdƒ}tj|ƒtSWn7tjdtjdtjƒƒ}tj|ƒtSXtS(Nt tagDBImpeacht ImpeachIndexRs+OnInsertImpeach!insert tagDBImpeach failed!s,OnServerMergeChangeName throw a exception
%s(RR{R$RÔR R~RcRR#ttagDBImpeach_ImpeachIndex_FEEDttagDBImpeach_ImpeachIndex_STEPRt UCN_DBImpeachRyRRºt ERROR_NO_133R    RUt ERROR_NO_134R¼R½RN(RXRWRR-RWRTRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR žs$   
 " cCstS(N(RN(RXRWR((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyR ²sc CsÛtjdƒtjƒ}|jddƒ}d}d}|jƒ}tjƒ}d}    |j||    ƒt    j
ƒ}
t j |
_ |j|
_|j|
_|j|||t jtjtj|
jƒƒtjd|jƒtS(NsOnMergerChildToCenter int
CenterGateiiÿÿÿÿs0OnMergerChildToCenter sendString toGameServer %s(R    RŠt MongoDBServert getServerMgrtgetClientSessionIDByNameRÔRttagLPStringDataR$Rt tagDGMergerChildToGameStringDataRÕtdgMergerChildToCenterRRnRctpackSendBySessionIDRoRR9R:RRN( RXRWRt    ServerMgrtsendViaSessionIDRòt    PoolIndexR,R-RR ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRºs&          c Csütjdƒtjƒ}|jddƒ}d}d}|jƒ}tjƒ}d}    |j||    ƒt    j
ƒ}
t j |
_ t j|
_|j|
_|j|
_|j|
_|j|||t jtjtj|
jƒƒtjd|j|
jgƒtS(Ns!OnMergeChildToCenterPlayerData inR…iiÿÿÿÿs8OnMergeChildToCenterPlayerData sendString toMapServer %s(R    RŠR†R‡RˆRÔRttagLPPlayerDataR$RttagDMMergePlayerDataRÕRØRtgmMergePlayerDataRÚRnRcRKRŒRoRRþR:RRN( RXRWRRRŽRòRR,R-RR ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRÞØs*            c*CsŠtjd|ƒtjƒ}||_d|_|t}tƒ}tƒ}|j    |it
|jƒd6|jd6ƒ}|tƒks¤tjdt |j fƒdSi|j d6}|t }|j||tjtƒ}    tj|    dƒ}
|t}|j||tjƒ} tj| dƒ} |t}|j||tjƒ} tj| dƒ}|t}|j||tjƒ}tj|dƒ}|t}|j||tjƒ}tj|dƒ}|t}|j||tjƒ}tj|dƒ}|t}|j||tjƒ}tj|dƒ}|t}|j||tj ƒ}tj|dƒ}|t!}|j||tj"ƒ}tj|dƒ}|t#}|j||tj$ƒ}tj|dƒ}|t%}|j||tj&ƒ}tj|dƒ}|t'}|j||tj(ƒ}tj|dƒ} |t)}|j||tj*ƒ}!tj|!dƒ}"tj+ƒ}#|j,ƒ|#_|t-}|#j.|ƒ}$tj|$dƒ}%tj/d|%dƒ|j0ƒ|    | | ||||||$|||||!}&t1j2j3t4j5ƒdƒ}'t1j2j6|'ƒs7t1j7|'ƒnt8t1j2j3|'d    |ƒd
ƒ}(d dl9})|(j:|&ƒ|(j;ƒ|(j<ƒdS( Ns$DumpSinglePlayerDataByAcc accid = %siRsR†s=DumpSinglePlayerDataByAcc  Exception accid = %s,playerID = %sRKs gmIP cnt = %stDumpPlayerDatas    %s.pdsavetwbiÿÿÿÿ(=R    R3R RpRsR†RqRRRrRRäRKRtRuRvRNRR;RwRxRyRzR{R|R}R~RR€RR‚RƒR„R…R†R‡RˆR‰RŠR‹RŒRRŽRRORR‘RŠRÔR(R)R*R RRtmkdirR tstructtwritetflushR7(*RXRWRßR’R[RïR}R“R”R•RR–RR—RR˜RR™RRšRR›R    RœR
RR RžR RŸR R RR¡RR¢R£R=RÉtDumpDirR&R–((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pytDumpSinglePlayerDataByAcc÷s„         
        ,
 
 
 
 
 
 
 
 
 
 
 
 
 
D"  
cCstjjtjƒdƒ}tjj|ƒsDtj|ƒtdfStjj|d|ƒ}d}y)t|dƒ}|j    ƒ}|j
ƒWntdfSXt j ƒ}d}|j ||t|ƒƒ}    d|    kràtdfS||    7}tjd|jƒ|jdkrtdfS|jjƒ|_|t}
|j|
ƒsOt|jfS||j|j|tt j||tƒ7}||j|j|tt j||ƒ7}||j|j|tt j||ƒ7}||j|j|tt j||ƒ7}||j|j|t t j!||ƒ7}||j|j|t"t j#||ƒ7}||j|j|t$t j%||ƒ7}|j&|j|j||ƒ||j|j|t't j(||ƒ7}t)j*||ƒ\} }t j+ƒ} x3t,| ƒD]%} || j ||t|ƒƒ7}qèW||j|j|t-t j.||ƒ7}||j|j|t/t j0||ƒ7}||j|j|t1t j2||ƒ7}||j|j|t3t j4||ƒ7}||j|j|t5t j6||ƒ7}|t|ƒksöt7‚t|jfS(NR“is    %s.pdsaveRRiÿÿÿÿs$Saving player data,playerID = %s....(8R(R)R*R RRR•RUR R'R7R RpR¶R‹R    R3RKRsRORqRJRORtRvRNRwRxRyRzR{R|R}R~RR€RR‚R:RƒR„RR;RRQR…R†R‡RˆR‰RŠR‹RŒRRŽR<(RXRWRßR™tFileDirRR&RÂRRÃR[R=R>R?((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyt SaveSinglePlayerDataFromDumpFiledsZ 
 
 
 
 
 ,))))))) #)))))cCsjtjtjtjjtjƒtj    dƒƒ}|tjtj
tjjtjƒtj    dƒƒ7}|tjtj tjjtjƒtj    dƒƒ7}|tjtj tjjtjƒtj    dƒƒ7}|tjtj tjjtjƒtj    dƒƒ7}|tjtjtjjtjƒtj    dƒƒ7}|tjtjtjjtjƒtj    dƒƒ7}|tjtjtjjtjƒtj    dƒƒ7}|tjtjtjjtjƒtj    d    ƒƒ7}|tjtjtjjtjƒtj    d
ƒƒ7}|tjtjtjjtjƒtj    d ƒƒ7}|tjtjtjjtjƒtj    d ƒƒ7}|tjtjtjjtjƒtj    d ƒƒ7}|tjtjtjjtjƒtj    dƒƒ7}|tjtjtjjtjƒtj    dƒƒ7}|tjtjtjjtjƒtj    dƒƒ7}|tjtjtjjtjƒtj    dƒƒ7}|tjtjtjjtjƒtj    dƒƒ7}|tjtjtjjtjƒtj    dƒƒ7}|tjtjtjjtjƒtj    dƒƒ7}|tjtjtjjtjƒtj    dƒƒ7}|tjtjtjjtjƒtj    dƒƒ7}|tjtjtjjtjƒtj    dƒƒ7}y…t j!|dƒ}d}t"j#|tj$ƒ}t"j%|t&|ƒ|ƒ}t'j(dt&|ƒt&|ƒfƒt)j*|t&|ƒƒWn6t+j,dt+j-dt.j/ƒƒ}t'j0|ƒnXdS(NstagChinNPC.txtstagNPCRefresh.txtstagChinSkill.txtstagChinExp.txtstagChinItem.txtstagTransportRefresh.txtstagChinShopItem.txtstagBornRefresh.txtstagChinMixItem.txtstagBuildEquip.txtstagSuiteActivation.txtstagSuiteEffect.txtstagRepeatEvent.txtstagEffectRefresh.txtstagChinMap.txtstagDBStoreItem.txtstagOnMissionDelete.txts
tagPet.txtstagPetGrade.txtstagPetFriendliness.txts tagPetExp.txtstagNPC_Item_Pet.txtstagFlyObjBaseInfo.txti    Rs(Load game sys data for len = %s - %s ok!Rs)Compress game sys data failed!error = 
%s(1R tsysDBLoadFromFilet
tagChinNPCR(R)R*R R+RÕt
SYSDB_PATHt tagNPCRefresht tagChinSkillt
tagChinExpt tagChinItemttagTransportRefreshttagChinShopItemttagBornRefreshttagChinMixItemt tagBuildEquipttagSuiteActivationttagSuiteEffectttagRepeatEventttagEffectRefresht
tagChinMapttagDBStoreItemttagOnMissionDeletettagPett tagPetGradettagPetFriendlinesst    tagPetExpttagNPC_Item_PetttagFlyObjBaseInfoR!RôRR¹t
dgGameDatat WriteStringR‹R    R3RýRþRRºt ERROR_NO_53R¼R½R(RXtsysDatatcompressSysDataRCRÅ((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyt OnGetGameData±sÌ                        #"(qRft
__module__RwRƒRR‚R›RšRRbRØR>RÚRÛRaR^RÜRÝRáRàRßRâRëRRRéRêRR)RR R R:RUROR9R8RxRuRsRèR…RR”R›RžR£R¦RªRR•R’RuRáRæRâRïRSRîRR#RæR‚RyR—RRåRäRãRBRiRMRwRYRìRíRîRïRðRñRòRóRôRõRöRºRøRùRúRûRüRýRþRÿRRRRRRRRRR    R
R R R RRÞRšRœR»(((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyRuësä    l                    
    ÿ¨    
    '         ’    &        A    "    I    $    0    :    +        
             (    4    &        o    p     ^ K                             ,                 /    
             X      D    %    ÿL                                ÿN                    ÿZ    )    ÿ#    +    ;    !            '        B             
            Ï    +            "    !    "        8        5    !    @        %    =    &    #             C    %    R                    m    M(NR(R!RPRÌR¾RpRER”R„tDBCommon.CommonDefineRÕt MangoDBCommonRRRRRRtServerClientShareDefineR&t
__import__R#tctypesRR¼RgtCollections.CollectionDefinetCommonRR    R
R5RRºR<tjsonRGRmtsysthashlibt CollectionsR R RýtDBCommonR RRRtProtocolRRRRRR¼RùRvRzRgRlRmRkRƒRRˆR‡R    tMergeRegPInfoIndex_GroupIDRGtthreadt allocate_lockRLR_R\ReRtRu(((sk.\\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\LogicProcess\UserCtrlDB.pyt<module>sd  
 
    .
 
           "(                ,       &    .