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
x{[c@sëdZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZiae jZe jZe jZe jZdZdZdZdZdZdZeddRƒ\Z Z!Z"Z#ed    ƒ\Z$Z%Z&Z'Z(Z)ed
ƒ\Z*Z+Z,edƒ\Z-Z.Z/Z0d „Z1d „Z2d „Z3d„Z4d„Z5d„Z6d„Z7d„Z8d„Z9d„Z:d„Z;d„Z<d„Z=d„Z>d„Z?d„Z@d„ZAd„ZBd„ZCd„ZDd„ZEd „ZFd!„ZGd"„ZHd#„ZId$„ZJd%„ZKd&„ZLd'„ZMd(„ZNd)„ZOd*„ZPd+„ZQd,„ZRd-„ZSd.„ZTd/„ZUd0„ZVd1„ZWd2„ZXd3„ZYd4„ZZdd5d6„Z\d7„Z]d8„Z^d9„Z_d:„Z`d;„Zad<„Zbd=„Zcd>„Zddd?„Zed@„ZfdA„ZgdB„ZhdC„ZidD„ZjdE„ZkdF„ZldG„ZmdH„ZndI„ZodJdK„ZpdL„ZqdM„ZrdN„ZsdO„ZtdP„ZudQ„ZvdS(SsVersion = 2015-11-19 14:00iÿÿÿÿNi iiiiiiicCs
|jƒS(N(t    GetValue1(trecData((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytGetRecGroupTypeYscCs |j|ƒS(N(t    SetValue1(Rt    groupType((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytSetRecGroupTypeZscCs
|jƒS(N(t    GetValue2(R((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytGetRecBattleIndex[scCs |j|ƒS(N(t    SetValue2(Rt battleIndex((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytSetRecBattleIndex\scCs
|jƒS(N(t    GetValue3(R((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyt    GetRecJob]scCs |j|ƒS(N(t    SetValue3(Rtjob((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyt    SetRecJob^scCs
|jƒS(N(t    GetValue4(R((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytGetRecFightPower_scCs |j|ƒS(N(t    SetValue4(Rt
fightPower((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytSetRecFightPower`scCs|jƒdkS(Ni(t    GetValue5(R((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytGetRecIsBattleOverascCs'|jƒdkrdS|jdƒdS(Nii(Rt    SetValue5(R((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytSetRecBattleOverbs cCstd|jƒdƒS(Nii(tmaxR(R((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyt GetRecWinCntiscCs |j|ƒS(N(R(RtwinCnt((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyt SetRecWinCntjscCs
|jƒS(N(t GetStrValue1(R((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyt GetRecAccIDkscCs |j|ƒS(N(t SetStrValue1(RtaccID((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyt SetRecAccIDlscCs
|jƒS(N(t GetStrValue2(R((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytGetRecPlayerNamemscCs |j|ƒS(N(t SetStrValue2(Rt
playerName((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytSetRecPlayerNamenscCs
|jƒS(N(t GetStrValue3(R((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytGetRecMergeAccIDoscCs |j|ƒS(N(t SetStrValue3(Rt
mergeAccID((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytSetRecMergeAccIDpscCs
|jƒS(N(R(R((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytGetSptRecGroupTypetscCs |j|ƒS(N(R(RR((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytSetSptRecGroupTypeuscCs
|jƒS(N(R(R((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytGetSptRecBattleIndexvscCs |j|ƒS(N(R(RR    ((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytSetSptRecBattleIndexwscCs
|jƒS(N(R (R((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytGetSptRecMoneyTypexscCs |j|ƒS(N(R (Rt    moneyType((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytSetSptRecMoneyTypeyscCs
|jƒS(N(R(R((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytGetSptRecScorezscCs |j|ƒS(N(R(Rtscore((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytSetSptRecScore{scCs
|jƒS(N(R(R((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytGetSptRecResult}scCs |j|ƒS(N(R(Rtresult((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytSetSptRecResult~scCs
|jƒS(N(R(R((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytGetSptRecTagAccIDscCs |j|ƒS(N(R(RttagAccID((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytSetSptRecTagAccID€scCs
|jƒS(N(R"(R((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytGetSptRecAccIDscCs |j|ƒS(N(R$(RR ((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytSetSptRecAccID‚scCstjdƒtjƒjtjƒ}td|jƒƒ}g}xEt|ƒD]7}|j    |ƒ}|snqMn|j
t j |ƒƒqMW|sŸtjdƒdSt jt jii|d6d6idd6dd6dd    6tƒtjd
t|ƒt|ƒfƒdS( Ns===ÍõÕßÕù°Ô·Ö×é===i s    ÎÞÈ˲μÓÖÜÈü£¡s$intPlayerIDit
FightPowerit_ids4    ²éѯÊý¾Ý¿â²ÎÈüÍæ¼ÒÕ½Á¦£¡ÈËÊý=%s,findAccIDList=%s(t    GameWorldtLogt GetBillboardt FindBillboardt ShareDefinetDef_BT_MergePKWeektmintGetCounttrangetAttappendtGameWorldMergePKtGetBBMergePlayerIDt PlayerDBOpert
FindDBOpertTable_DBPlayert&DGDBOperResult_MergeKingBattleGroupingtlentstr(t weekBillBoardt    findDBCnttfindMergePlayerIDListtitbbData((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytDoMergeKingBattleGrouping32‡s   #cCs~tjdƒtjdt|ƒƒi}x |D]}|d||d<q1Wtjƒjtjƒ}|jƒ}tjƒ}|j    t
ƒt ƒ}tjdt|ƒƒg}|j t
ƒ}    t }
xyt|ƒD]k\} } | d} | dksÒ| |krqÒn|j| ƒ}|s!qÒn| d}|s7d    n tj|ƒ}|sRdn tj|ƒ}|smd    n tj|ƒ}|sˆdn tj|ƒ}|j|dƒ}d}t|ƒ}|    jƒ}t||
|||||||ƒ    tjd
| | |
|||||||f
ƒ|j|
|||||||gƒqÒWtjd ƒt|g}tjtjd|tƒtƒdS( Ns,ÍõÕßÕù°ÔÊÕµ½²éѯÊý¾Ý¿âÕ½Á¦½á¹û, ¿ªÊ¼½øÐзÖ×és    Õ½Á¦ÐÅÏ¢: %sR?R>s    ÅÅÃû·Ö×é˳Ðò: %siiitsx    addRec i=%s,order=%s,groupType=%s,battleIndex=%s,job=%s,fightPower=%s,winCnt=%s,accID=%s,playerName=%s,mergeAccID=%ss(    ·Ö×éÍê±Ï, ½«·Ö×é½á¹ûͬ²½¸ø×Ó·þÎñÆ÷£¡( RARBRSRCRDRERFRHtGetUniversalRecMgrtDeletetDef_MergeKingBattleRecordTypetGetGroupOrderListt GetTypeListtDef_Merge_King_16t    enumerateRJRLtGetBBPlayerAccIDtGetBBPlayerJobtGetBBPlayerNameRMtgettAddRect __SetRecDataRKtDef_SBCM_BattleGroupRecordtMergeBroadcasttSendBroadcastMergetChConfigtDef_MergePKKingtFalset__LogRecBattleRecordTData(t resultSetListtextendValueListtfightPowerDictt
resultDictRTtmaxBBCnttuniversalRecMgrtgroupOrderListtrecordInfoListt
recordListRtindextordertbbIndexRXR    R RR%t mergePlayerIDRRR*RtmsgList((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyRQŸsN         
 
  "    &)  c    Csetddƒ}tj|ƒddddddddg}x$|D]\}}|j||ƒqAW|S(Ni    i!iiiiii iiiiiiii(ii(ii(ii(i i(ii(ii(ii(ii(RItrandomtshuffletinsert(RutfixedIndexOrderListRxRy((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyR^Õs  cCsºtjƒsdStjd|ƒtjƒjƒ}|tkr_tjƒjƒtjdƒn|tkrutƒn|dkr‘t    ||ƒnt
|g}t j t jd|tƒdS(NsÍõÕßÕù°Ô״̬±ä¸ü: state=%ss&    16Ç¿½ú¼¶Èü¿ªÊ¼£¬Çå¿ÕËùÓжÔÕ½·¿¼ä£¡i(RAt IsMergeServerRBt GetGameWorldtGetTickR`tGetVSRoomManagertDeleteAllVsRoomst__ForceOverVsRoomt__DoLogic_StartMergeKingBattletDef_SBCM_KingStateRiRjRkRlRm(tstatettickR|((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytOnMergeKingStateChangeâs   
  cCsŸtjƒsdStjƒjtjƒs,dStjdƒ}|t}d}tjƒj|ƒ}|||krtdStjƒj    ||ƒt
|t |ƒdS(Nt    MergeKingtMergeKingLastTick( RARR‚t GetDictByKeyREtDef_Notify_WorldKey_Merge_Kingt ReadChConfigtGetEvalChConfigtDef_King_ProcessTicktSetDictt__ProcessOutTimeVsRoomtDef_King_RoomOutTimeTick(RŠtkingCfgt processTicktprocessTickKeytlastProcessTick((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytOnMergeKingProcessûs 
cCs³g}tjƒ}xpt|jƒƒD]\}|j|ƒ}|sFq%n||jƒ|krbq%n|jƒrtq%n|j|ƒq%W|r¯tjdt    |ƒƒt
|ƒndS(NsÇ¿ÖÆ½áÊøÕ½¶·³¬Ê±·¿¼ä(%s)( RAR„RItGetVsRoomCountt    GetVsRoomt GetOpenTickt GetRoomStateRKRBRRt__DoOverVsRoom(t outTimeTickRŠtoverVsRoomListt    vsRoomMgrt vsRoomIndextvsRoom((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyR”s   cCs…g}tjƒ}xBt|jƒƒD].}|j|ƒ}|sFq%n|j|ƒq%W|rtjdt|ƒƒt|ƒndS(NsÇ¿ÖÆ½áÊøÕ½¶·Òì³£·¿¼ä(%s)(    RAR„RIR›RœRKRBRRRŸ(R¡R¢R£R¤((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyR†*s  c Csìtjdt|ƒƒ|d}|d}tjƒj|ƒ}|s[tjd|ƒdS|dkr¡|d\}}|jdƒtjd|||fƒn|dkrè|d\}}}}    }
t|||||    |
ggƒndS(Ns%ÊÕµ½MapServer_¿ç·þÍõÕßÕù°Ô¸±±¾ÐÅÏ¢ %siis!ÕÒ²»µ½ÍõÕßÕù°Ô¶ÔÕ½·¿¼ä: roomID=%sisD    Íæ¼Ò½øÈ븱±¾, SetRoomState=1,roomID=%s,playerID=%s,playerName=%s(RARBRSR„t
FindVsRoomtErrLogt SetRoomStateRŸ( tinfoListtfbStatetroomIDR¤tplayerIDR%t winnerWincntt loserWincnttwinnerMergeAccIDtwinnerEquipViewListtloserEquipViewList((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytMapServer_MergeKingFB:s 
 
       "c
Csòt}i}tjdƒt}tjƒjtƒ}xb|D]Z}t|t    ƒrk|\}}}}    }
} n*||ddggf\}}}}    }
} |j
ƒ} tj ƒj | ƒ||krà|}tj d||fƒntj d| |||    fƒtj d|
ƒtj d| ƒt| ƒ\} }t| |ƒ}| sYt|ƒdkrltjd    ƒq;n|d}|d
}| sŽ| r¡tjd ƒq;n|    sút|ƒ|gt|ƒ|gg}|jd tƒ|dd
}|d
d
}n<t|ƒ|    kr|n|}t|ƒ|    kr0|n|}|
rO|
tt|ƒ<n| rh| tt|ƒ<nt||||||ƒ}|rtn|}q;W|rÞtj d ƒt||g}tjtjd|tƒtƒn|rîtƒndS(NRŒiRZs4    ¾ÀÕý»ñʤ·½»ñʤ³¡Êý: winnerWincnt=%s,maxWinCnt=%ssP    ½áÊøÕ½¶··¿¼ä: vaRoomID=%s,winnerWincnt=%s,loserWincnt=%s,winnerMergeAccID=%ss        winnerEquipViewList=%ss        loserEquipViewList=%sis        ½áÊøÕ½¶··¿¼äÒì³££¡is        ½áÊøÕ½¶··¿¼äÒì³££¡£¡treverses    ¹ã²¥×Ó·þ¶ÔÕ½¼Ç¼±ä¸üÐÅÏ¢£¡(RmRR‘tDef_King_MaxWinCntRAR[R_R]t
isinstancetlistt GetCreaterIDR„tDeleteVsRoomByIdRBt__GetMergeKingGroupByRoomIDtGetBattleRecDataRRR¦RtsorttTrueR(tg_playerEquipViewDictt__UpdBattleOvertDef_SBCM_UpdBattleRecordRiRjRkRlRnt__SaveTopPlayerEquipView(R¡t    isAllOvert
updRecDictt    maxWinCntRwt overRoomInfoR¤R¬R­R®R¯R°RªRR    t recDataListtaRecDatatbRecDatatsortListt winnerRecDatat loserRecDatatallOverR|((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyRŸSs` *       
 
 $ 
 
cCsrtjd|ƒi}i}g}tjƒ}|jtƒ}xÉt|jƒƒD]µ}|j|ƒ}t|ƒ}    |    |kr„qQnt    |ƒ}
d|    |
f} |j
| gƒ} | j |ƒ| || <t |    |
ƒ} | |krQt | ƒdkrQ|j | ƒqQqQWtjdƒt}tjdƒt}xW|jƒD]I} t | ƒdkr[q=nt||| d|ƒ}|r€tn|}q=W|rÏtjdƒt||g}tjtjd|tƒtƒntjd    |t |ƒt|ƒfƒtjƒ}xC|D];} |j| ƒ}|s)qn|j|ƒ|jdƒqWtjd
|j ƒƒ|rnt!ƒndS( Ns:===Ö´ÐпªÊ¼ÐÂÒ»ÂÖÍõÕßÕù°Ô½ú¼¶ÈüÂß¼­: battleGroupType=%s===s%s_%siRŒs=ÏÈ´¦Àí±¾ÂÖÂÖ¿ÕÍæ¼Ò, Ö±½Ó½ú¼¶£¡iis&    ¹ã²¥×Ó·þÂÖ¿ÕÍæ¼Ò¶ÔÕ½¼Ç¼±ä¸üÐÅÏ¢£¡sE    ´´½¨±¾ÂÖ¶ÔÕ½·¿¼ä! battleGroupType=%s,count=%s, creatVsRoomList=%ss    µ±Ç°×ܶÔÕ½·¿¼äÊý: %s("RARBR[R_R]RItCountRJRRReRKt__GetMergeKingBattleRoomIDRRRR‘R³RmtvaluesR½R»R¾RiRjRkRlRnRSR„t    AddVsRoomt SetOpenTickR§R›R¿(tbattleGroupTypeRŠRÁtgroupPlayerDicttcreatVsRoomListRtRwRWRRR    tkeyt
playerListtvsRoomIDRÂRÀRÊR|R¢tnewRoom((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyR‡—sZ     
 
       
ic
CsÐ|s
tSt|||ƒ|r3t|||ƒnt|ƒ}t|ƒ}t|ƒ}|scdn    t|ƒ}    |d}
|
dkr¼tjdt|ƒƒtj    dd|||    gƒt
S|    rátj    dd|||    gƒntj    dd||gƒ|d} t |ƒ} t |ƒ} t|ƒ}t|ƒ}t |ƒ}|jƒ}t||
| | | d|||ƒ    d|
| |f}|
| | | d|||g||<tjd    |
| | | d|||fƒtS(
NRZiis(        ×îºóÒ»ÂÖ»ñʤ£¬»ñµÃ¹Ú¾ü£¡accID=%stCampaign_liubo_213370tCampaign_liubo_466020tCampaign_liubo_825676s%s_%s_%ss}        ÐÂÔö½ú¼¶¼Ç¼; nextGroupType=%s,nextBattleIndex=%s,job=%s,fightPower=%s,winCnt=%s,accID=%s,playerName=%s,mergeAccID=%s(Rmt__UpdRecDataOverRRR#RARBRt PlayerControltMergeWorldNotifyR»R RR(RfRg(RwRÁRÈR¬RÉR­RR    t
winnerNamet    loserNamet nextGroupTypetnextBattleIndexRRR R%R*t
newRecDataRÓ((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyR½Øs<   
 
      ""     c
Csçt|ƒrdS|d}t||ƒt|ƒ}t|ƒ}t|ƒ}t|ƒ}t|ƒ}t|ƒ}    t|ƒ}
t    |ƒd|||f} |||||||    |
g|| <t
j d|||||||    |
fƒdS(Nis%s_%s_%ssu    ¸üÐÂÍæ¼ÒÕ½¶·¼Ç¼; groupType=%s,battleIndex=%s,job=%s,fightPower=%s,winCnt=%s,accID=%s,playerName=%s,mergeAccID=%s( RRRRR RRR#R(RRARB( RRRÁt winCntValueRR    RRR R%R*RÓ((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyRÚs" 
 
"     c    CsÍtjdƒtjdƒt}tjƒjtƒ}i}xšt|j    ƒƒD]†}|j
|ƒ}t |ƒ}t |ƒ}||k}t |ƒ}|j|ddgƒd}    |rN||    krN||g||<qNqNWi}
x¶|jƒD]¨\}} | \}}|dkrqënt|ƒ} t |ƒ} t|ƒ}t|ƒ}tj|gƒ}||| | g|
|<tjd|| | |t|ƒfƒqëWtjdƒt|
g}tjtjd|tƒdS(Ns'¿ªÊ¼±£´æÍõÕßÕù°Ô¸ßÊÖÍæ¼ÒÄ£ÐÍÔ¤ÀÀÐÅÏ¢...RŒidiisM    ¸ßÊÖ×°±¸ÐÅÏ¢: accID=%s,job=%s,order=%s,playerName=%s,equipViewInfoList=%ss+    ¹ã²¥×Ó·þÍõÕßÕù°Ô¸ßÊÖ°ñÍæ¼ÒÄ£ÐÍÔ¤ÀÀÐÅÏ¢!(RARBRR‘R³R[R_R]RIRËRJRRR(RetNonetitemsR RR#R¼RStDef_SBCM_TopPlayerEquipViewRiRjRkRlRm(RÂRwtmergeAccIDRankDictRWRRRtisWinR*tcurRanktsyncClientServerInfotrecInfoRRyR R%tequipViewInfoListR|((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyR¿s<               !  cCsT|j||ƒ|r)tj||ƒntj||ƒtjd||fƒdS(Ns*    ¿ç·þÍõÕßÕù°Ô״̬ID±ä¸ü key=%s,value=%s(R“tPlayerDBGSEventtSetDBGSTrig_ByKeyRAtSendMapServerMsgExRB(t    gameWorldRÓtvaluetisSaveDB((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyt__SetMergeKingActionKeyValueKs cCs¢tjƒ}tj}tj||j|ƒƒxmtjtjtjgD]S}|j|ƒ}|dkrŠt    j
|ƒ}|j ||ƒntj||ƒqGWdS(Ni( RAR‚RERRîRŽt%Def_Notify_WorldKey_Merge_KingStartIDt$Def_Notify_WorldKey_Merge_KingOverIDt*Def_Notify_WorldKey_Merge_KingServerHonourRìtGetDBGSTrig_ByKeyR“(Rït kingStateKeytidKeytactionID((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytOnMapServerInitOKSs          cCsø|jƒ}tjd|ƒtjƒr9tjdƒdStj|tƒtj|tƒtjƒ}|j    t
j ƒ}tjd|ƒ|r®t j |dƒt||ƒntjdƒ}tƒ}|jƒ}|j|dƒ}|t}    |t}
||    krŸd|jƒ} |j    | ƒ} || |
dkr‚|    |} t j||jƒƒ}t jd| |gƒ|j| |ƒqŸtjd||jƒƒn|t j|ƒkrôd    |}|jddd
|t|ƒƒtjd ||ƒndS( NsÍõÕßÕù°ÔOnPlayerLogins    ¿ç·þ·þÎñÆ÷²»´¦Àís    mergeKingState=%siRŒsMergeKingNotifyTime_%siès%sÇ¿Íæ¼ÒÉÏÏßÈ«·þÌáÐÑCDÖÐ...s%st MergeWarRanks ÉÏÏ߸üÐÂÍæ¼Ò¿ç·þÍõÕßÕù°ÔÅÅλ: %s(t GetPlayerIDRAtDebugLogRtPlayerUniversalGameRectSendUniversalGameRecInfoR]tDef_MergeKingSupportRecordTypeR‚RŽRERRÛt SetVsRoomIdt$__ClientServer_PrepareEnterMergeKingRR‘t__GetMergeKingRecRecordRankDicttGetAccIDRetDef_King_LoginNotifytDef_King_LoginNotifyCDtGetMergePlayerNametGetNameRÜR“RBtGetMergeWarRanktMapServer_QueryPlayerResultRR(t    curPlayerRŠR«RïtmergeKingStateR–trankDictR t playerRecRanktloginNotifyDicttnotifyCDt notifyTimeKeytlastNotifyTimetmarkt    mergeName((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyt OnPlayerLoginisB         
 
 
 
cCs|d|dS(Nidi((RR    ((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyR̕scCs|d|ddfS(Nidi((Rª((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyR¸˜scCsât|ƒdkrdS|d}|d}tjƒ}tjd|ƒ|tkrdt|dƒnz|tkrˆt|d|dƒnV|tkrÁ|d}t    |t
j |t ƒt |ƒn|tkrÞt|dƒndS(Niis"OnRecvMergeServerPKKing msgType=%s(RRRAR‚RBRht$__ClientServer_SaveBattleGroupRecordR¾t__ClientServer_UpdBattleRecordRˆRòRERRmRRåt%__ClientServer_SaveTopPlayerEquipView(t broadcastMsgtmsgTypeR|RïR‰((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytOnRecvMergeServerPKKingœs"
 
 
  c Cs0|dkrdS|sdn    |jƒ}tjd||ƒtj}tj}tj\}}tjƒ}|j    t
ƒ}x±t |j ƒƒD]}    |j |    ƒ}
t|
ƒ} t|
ƒ} t|
ƒ} |râ| |jƒkrâq‹n| |dkrk| rk|r|ntjƒj| ƒ}|r9tj|d|gƒn|sEdn    |jƒ}tjd| |ƒq‹n| |kr}q‹nt|
ƒr²tjd| | | |
jƒfƒq‹ntjƒj| ƒ}|sätjd| ƒq‹nt| | ƒ}tj||tƒtj||||d||gƒq‹WdS(Nis6===×Ó·þ¼ì²éÍæ¼Ò½øÈë¿ç·þÍõÕßÕù°ÔÉÏ´«Êý¾Ý===groupType=%sitCampaign_liubo_329496s    Íæ¼ÒÂÖ¿ÕÖ±½Ó½ú¼¶: accID=%ssD    ¸Ã³¡Õ½¶·ÒѾ­½áÊø: groupType=%s,battleIndex=%s,accID=%s,value5=%ss%    Íæ¼Ò²»ÔÚÏß»ò²»ÊDZ¾·þÍæ¼Ò!accID=%s(RüRARBREtDef_MergeAction_MergeKingRktDef_MergeTransMapIDtDef_MergeTransMapPosR[R_R]RIRËRJRRRRtGetPlayerManagertFindPlayerByAccIDRÛt
NotifyCodeRRýRRÌRR»tPlayerMergeRegistertSendMergeActionReg(tcurBattleGroupTypeR R«t
actionTypetmapIDtposXtposYRtRwRWRRR    R t notifyPlayertnotifyPlayerIDtplayerRª((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyR¸sJ             !      &cCstjƒjtjƒ}|dkr(dStjƒ}|jƒ||_t    j
||ƒtj d||j ƒf|j ƒƒdS(Nis=    Í¨ÖªÍæ¼Ò½øÈë¿ç·þÍõÕßÕù°Ô¶ÔÕ½·¿¼ä!groupType=%s,vsRoomID=%s(RAR‚RŽRERtChPyNetSendPackttagCanEnterMergeKingtCleart    GroupTypet NetPackCommont SendFakePackRBt GetVsRoomIdRü(R Rt    enterPack((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytNotify_PlayerEnterMergeKingîs  
        c CsÅtjdƒtjƒ}|jtƒ|jtƒ|jtƒ}g}xÉt|ƒD]»\}}|\}}}}    }
} } } |jƒ}t    |||||    |
| | | ƒ    tjd|||||    |
| | | f    ƒt
j | ƒ}|dkrU||krU|j |ƒqUqUW|rIt jdƒt}tjd|d|gƒntjdƒtƒtjdtƒtjdtƒtjddƒtjƒ}|jtjƒ}t|tj|tƒdS(    Ns"===×Ó·þ±£´æÍõÕßÕù°Ô¶ÔÕ½·Ö×éÐÅÏ¢===sp    saveRec i=%s,groupType=%s,battleIndex=%s,job=%s,fightPower=%s,winCnt=%s,accID=%s,playerName=%s,mergeAccID=%siRŒRZis ×Ó·þ±£´æÍõÕßÕù°Ô¶ÔÕ½·Ö×éÐÅÏ¢ OK!tCampaign_liubo_521297(RARBR[R\R]RR_RaRfRgR#tGetRegisterPlayerIDRKRR‘tDef_King_JoinMailContenttPlayerCompensationtSendPersonalItemMailExRnRþRÿRãRÛt WorldNotifyR‚RŽREt!Def_Notify_WorldKey_MergePKWeekIDRòRóR»(R|RtRwtmailPlayerIDListRWtdataListRR    RRRR R%R*RR«tcontentRïtstartID((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyRþs6     "    #  c CsGtjd|ƒtjdƒt}g}g}tjƒ}|jtƒ}xt|j    ƒƒD]ô}|snPn|j
|ƒ}dt |ƒt |ƒt |ƒf}    |    |kr´q^n|j|    ƒ\}
} } } }}}}t||
| | | ||||ƒ    tjd|    |
| | | ||||f    ƒ||krE|j|    ƒq^|j|    ƒq^Wtjdt|ƒƒx’|jƒD]„\}    }|\}
} } } }}}}|jƒ}t||
| | | ||||ƒ    tjd|    |
| | | ||||f    ƒqzWtjdƒtƒtjdtƒt||ƒ|rCtƒndS(Ns*===×Ó·þ¸üÐÂÍõÕßÕù°Ô¶ÔÕ½ÐÅÏ¢===isAllOver=%sRŒs%s_%s_%ssq    updRec key=%s,groupType=%s,battleIndex=%s,job=%s,fightPower=%s,winCnt=%s,accID=%s,playerName=%s,mergeAccID=%ss$    ×Ó·þ¸üÐÂÌí¼ÓÍõÕßÕù°Ô¶ÔÕ½ÐÅÏ¢(%s)sq    addRec key=%s,groupType=%s,battleIndex=%s,job=%s,fightPower=%s,winCnt=%s,accID=%s,playerName=%s,mergeAccID=%ss×Ó·þ¸üÐÂÍõÕßÕù°Ô¶ÔÕ½ÐÅÏ¢ OK!(RARBRR‘R³R[R_R]RIRËRJRRRtpopRgRKRRRäRfRnRþRÿRãt__UpdSupportResultt__ClientServer_DoLogicOnAllOver(RÀtmsgDictRÂtwinBattleKeyListtloseBattleKeyListRtRwRWRRÓRR    RRRR R%R*tdataInfo((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyR'sD % '"    #  "    '  
c    CsJ| r| rdStjdƒtjdt|ƒƒtjdt|ƒƒtjƒ}|jtƒ}xÛt|jƒƒD]Ç}|j|ƒ}t    |ƒt
kr¨q{ndt |ƒt |ƒt |ƒf}||krét|tƒn||kr{t|tƒnq{t|ƒ}tjƒj|ƒ}|r{tj||ƒq{q{WdS(Ns×Ó·þ¸üÐÂÍõÕßÕù°ÔѺע½á¹û...s    winBattleKeyList =%ss    loseBattleKeyList=%ss%s_%s_%s(RARBRSR[R_RRIRËRJR6tSptResult_UnknownR,R.R9R8tSptResult_CorrecttSptResult_InaccuracyR<R R!RþtSendUniversalGameRecSingle(    RERFRtRwRWRRÓR R,((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyRB\s,  %   c        Cs\tjdƒtjttƒtjdƒtƒ}tjƒ}xÊt|j    ƒƒD]¶}|j
|ƒ}|dksR|j ƒ r†qRn|j ƒ}|j|dƒ}tj|ƒ}||krÅqRnd|}|jddd|t|ƒƒtjd|||fƒqRWtƒtjƒ}|jtjƒ}t|tj|tƒtjd|ƒdS(Ns×Ó·þËùÓбÈÈüÍê½áºó´¦Àí...s    ×Ó·þ¿½±´×îÐÂÒ»ÆÚ½á¹û¼Ç¼...is%sRûs7    ¸üÐÂÍæ¼ÒÅÅλ:accID=%s,lastRank=%s, playerRecRank=%ss    ¸üÐÂÍõÕßÕù°Ô»î¶¯½áÊøID=%s(RARBRþt CopyRecDatat!Def_MergeKingBattleRecordLastTypeR]RR RItGetPlayerCounttGetPlayerByIndexRãt    GetInitOKRReRÛR    R
RRt__UpdMergeKingServerHonourRankR‚RŽRER<RòRôR»(    R t playerManagerRWR,R RtlastRankRïtoverID((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyRCs.         
 c        Cslt||ƒt||ƒt||ƒt||ƒt||ƒt||ƒt||ƒt||ƒdS(N(RR
RRRR!R&R+(    RRR    RRRR R%R*((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyRg¥s        c Csbd}ttttttg}tjdƒt}t    j
ƒ}|j t ƒ}xÄt |jƒƒD]°}|j|ƒ}|s€q_nt|ƒ}||kržq_nt|ƒ}tj|ƒ}    |    dkrÜt    jd|ƒq_nt|ƒ}
|
|k} | r_||kr_|}q_q_W|dkr%dn|}t    jƒ} t| tj|tƒt    jd|ƒdS(NidRŒis²»ÊDZ¾·þÍæ¼Ò mergeAccID=%ss    ¸üÐÂÈ«·þÈÙÒ«ÅÅλֵ=%s(tDef_Merge_King_32R`tDef_Merge_King_8tDef_Merge_King_4tDef_Merge_King_2tDef_Merge_King_1RR‘R³RAR[R_RMRIRËRJRR(R#R7RýRR‚RòRERõR»RB( t serverHonourt rankOrderListRÂRtRwRWRRR*R«RRçRï((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyRQ°s6             c Csi}ttttttg}tjdƒt}t    j
ƒ}|j t ƒ}x¹t |jƒƒD]¥}|j|ƒ}|s€q_nt|ƒ}||kržq_nt|ƒ}||krÃt||<n||}    t|ƒ}
|
|k} | r_||    kr_|||<q_q_Wt    jd|ƒ|S(NRŒs"__GetMergeKingRecRecordRankDict %s(RUR`RVRWRXRYRR‘R³RAR[R_RMRIRËRJRRRRý( R R[RÂRtRwRWRRR RèRRç((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyRØs.          
  cCsàtjƒjƒsdStjdƒtjƒ}|jtƒ}xŽt|jƒƒD]z}|j    |ƒ}tjd|t
|ƒt |ƒt |ƒt |ƒt|ƒ|jƒt|ƒt|ƒt|ƒf
ƒqQWtjdƒdS(Ns===__LogRecBattleRecordTData===sni=%s,groupType=%s,battleIndex=%s,job=%s,fightPower=%s,winCnt=%s,value5=%s,accID=%s,playerName=%s,mergeAccID=%ss"===__LogRecBattleRecordTData===End(RAR‚t GetDebugLevelRBR[R_R]RIRËRJRRR RRRRR#R((RtRwRWR((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyRnûs      '9 c    Csitjƒ}|jtƒtjdƒ|jtƒ}x¶|jƒD]¨\}}|\}}}}x‡|D]}    |jƒ}
t|    ƒ}    |
j    |ƒ|
j
|ƒ|
j |ƒ|
j |ƒ|
j |    ƒtjd|||||    fƒqgWqBWtjƒ} x[td| jƒƒD]D} | j| ƒ} | dks| jƒ rDqntj| tƒqWtjdƒdS(Ns(×Ó·þ¸üпç·þÍõÕßÕù°Ô¸ßÊÖ°ñÔ¤ÀÀÐÅÏ¢¡£¡£¡£s>    ±£´æ¼Í¼ job=%s,order=%s,accID=%s,name=%s,equipViewInfo=%sis)    ×Ó·þ¸üпç·þÍõÕßÕù°Ô¸ßÊÖ°ñÔ¤ÀÀÐÅÏ¢OK!(RAR[R\t%Def_MergeKingTopPlayerEquipRecordTypeRBR_RäRfRSRR RR$R)R RIRNRORãRPRþRÿ(t viewInfoDictRtRwR tviewInfoR%RëRRyt equipViewInfoRRRRxR,((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyR s0                 RZcCs°g}tjƒ}|jtƒ}xˆt|jƒƒD]t}|j|ƒ}t|ƒ|ks4t|ƒ|ks4|r‹t    |ƒ|kr‹q4n|dkr›|S|j
|ƒq4W|S(NRZ( RAR[R_R]RIRËRJRRRRK(RR    R RÄRtRwRWR((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyR¹+s $ cCsˆtjƒ}|jtƒ}xft|jƒƒD]R}|j|ƒ}t|ƒ|ks.t|ƒ|ks.t    |ƒ|krq.n|SWdS(N(
RAR[R_RRIRËRJR,R.R<(RR    R RtRwRWR((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytGetSupportRecData?s $cCsl|d}|d}|tkr0t|||ƒS|tkrLt|||ƒS|tkrht|||ƒSdS(NiiRZ(tMergeKing_GSQType_Supportt__DoLogic_GSQType_SupporttMergeKing_GSQType_Bribet__DoLogic_GSQType_BribetMergeKing_GSQType_SupportAwardt__DoLogic_GSQType_SupportAward(R t    queryInfot    queryTypetqueryParamList((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pytMapServer_MergeKingQueryOs
 
   c    Cs’|jƒ}|\}}}}}}    }
tjd||||||    |
f|ƒt||ƒ} | sƒtjd||f|ƒdSt} t} x>| D]6}t|ƒ|kr·|} nt|ƒr–t} q–q–W| s÷tjd|||f|ƒdS| rtjd||f|ƒdS|jƒ}t    |||ƒ}|rftjd||t
|ƒf|ƒdSt |d|||||    t ƒ|||gS(NsjÍõÕßÕù°ÔѺע: groupType=%s,battleIndex=%s,moneyType=%s,costMoney=%s,tagAccID=%s,score=%s,unSupportScore=%ss>    ÕÒ²»µ½ÍõÕßÕù°Ô¶ÔÕ½Íæ¼Ò×éÐÅÏ¢£¬GroupType=%s, BattleIndex=%sRZsI    ÕÒ²»µ½ÍõÕßÕù°Ô¶ÔÕ½Íæ¼ÒÐÅÏ¢£¬GroupType=%s, BattleIndex=%s, tagAccID=%ssF    ¸Ã×éÍõÕßÕù°Ô¶ÔÕ½ÒѾ­½áÊø£¬²»¿ÉѺע£¡£¬GroupType=%s, BattleIndex=%ssA    ÒѾ­Ñº×¢¹ý¸Ã×éÍæ¼Ò£¬GroupType=%s, BattleIndex=%s, TagAccID=%s(RüRARBR¹RmRRR»RRaR9t__UpdSupportRecDataRãRH(R RiRjR«RR    R1t    costMoneyR:R4tunSupportScoreRÄtisOvert findTagAccIDRR t
sptRecData((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyRc^s@                              c    CsÁ|jƒ}|\}}}}}}    }
tjd||||||    |
f|ƒt||ƒ} | sƒtjd||f|ƒdSd} d} xP| D]H}t|ƒ}t|ƒ}t|ƒr–|| krÞ|} |} qÞq–q–W| s    tjd||| f|ƒdS|    }|jƒ}t|||ƒ}|sYtjd|||
f|ƒ|
}n<t    |ƒ}|| kr•tjd||| |f|ƒdSt
|||||| |t ƒ|||gS(NsjÍõÕßÕù°Ô»ß¸: groupType=%s,battleIndex=%s,moneyType=%s,costMoney=%s,tagAccID=%s,score=%s,unSupportScore=%ss>    ÕÒ²»µ½ÍõÕßÕù°Ô¶ÔÕ½Íæ¼Ò×éÐÅÏ¢£¬GroupType=%s, BattleIndex=%sRZisP    ÕÒ²»µ½ÍõÕßÕù°Ô¶ÔÕ½»ñÊ¤Íæ¼ÒÐÅÏ¢£¬GroupType=%s, BattleIndex=%s, winnerAccID=%ssO    Î´Ñº×¢¹ý¸Ã×飬»ß¸»ý·Ö¼õÉÙ! GroupType=%s, BattleIndex=%s, unSupportScore=%ssZ    ÒѾ­Ñº×¢ÕýÈ·£¬²»ÐèÒª»ß¸£¡GroupType=%s,BattleIndex=%s,winnerAccID=%s,sptRecTagAccID=%s( RüRARBR¹RRRRRaR9RltSptResult_Bribe(R RiRjR«RR    R1RmR:R4RnRÄt winnerAccIDt winnerWinCntRRtrecAccIDt
bribeScoreR RqtsptRecTagAccID((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyReˆsH                                  c CsÛ|jƒ}|sItjƒ}    |    jtƒ}
|
jƒ}tjdƒnt||ƒt||ƒt    ||ƒt
||ƒt ||ƒt ||ƒt ||ƒtj||ƒtjd||||||fƒdS(Ns    Ôö¼ÓѺע¼Ç¼£¡sY    ±£´æÑº×¢¼Ç¼£¡groupType=%s,battleIndex=%s,moneyType=%s,tagAccID=%s,score=%s,result=%s(RRAR[R_RRfRýR-R/R2R8R;R=R5RþRK( R RqRR    R1R:R4R7R RtRw((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyRl·s"              c
Cs¶|d}d}|jƒ}tjƒ}|jtƒ}xot|jƒƒD][}|j|ƒ}    t|    ƒ|krwqJnt    |    ƒt
t gkr•qJn|t |    ƒ7}qJW|||gS(Ni( RRAR[R_RRIRËRJR<R6RIRrR3(
R RiRjRxt
totalScoreR RtRwRWR((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyRgÌs
  i(wt__doc__RRÛR1R-R9RþR#RLRìRiRNRERARkR}R¼t.Def_UniversalGameRecType_MergeKingBattleRecordR]t2Def_UniversalGameRecType_MergeKingBattleRecordLastRMt/Def_UniversalGameRecType_MergeKingSupportRecordRt0Def_UniversalGameRecType_MergeKingTopPlayerEquipR]RUR`RVRWRXRYRIRhR¾RˆRåR³R’R•R8RRRbRdRfRHRIRJRrRRRR
R RRRRRRRRR!R#R&R(R+R,R-R.R/R0R2R3R5R6R8R9R;R<R=RYRQR^R‹RšR”R†R±RŸR‡RãR½RÚR¿RòRúRRÌR¸RRR5RRRBRCRgRQRRnRR¹RaRkRcReRlRg(((sU.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldMergeKing.pyt<module>sÆ                               
                                                                                                                                        6                             D    A-        0            ,             6        )    5    #    &         (    #                      *    /