lcy
昨天 a2f909bdd85f6f8894bcb9aa7df6d5f8d84bbcff
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
U(®jc @sÓddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl mZddlZddlZddlZddlZddlZddlZddlZejdƒdZdad„Zd„Zd„Zd    „Zd
„Zd „Zd „Zd d„Z d„Z!d„Z"d„Z#d„Z$d„Z%d„Z&d„Z'dd„Z(dd„Z)d„Z*d„Z+d„Z,dd„Z.d„Z/d„Z0e1d„Z2e j3d„Z4d „Z5d!„Z6d"„Z7d#„Z8d$„Z9d%„Z:d&„Z;d'„Z<d(„Z=ddd)„Z>d*„Z?dd+„Z@d,„ZAd-„ZBd.„ZCd/„ZDd0„ZEd1„ZFd2„ZGd3„ZHd4„ZId5„ZJd6„ZKd7„ZLdd8„ZMd9„ZNeOd:„ZPd;„ZQd<„ZRd=„ZSe    jTd>„ZUd?„ZVd@„ZWdA„ZXdB„ZYdC„ZZdD„Z[dE„Z\dF„Z]dG„Z^dH„Z_dI„Z`dJ„ZadK„ZbdL„ZcejƒZdejeƒZfejgƒZhdM„ZidN„ZjdO„ZkdP„ZldQ„ZmdR„ZndS„ZodT„ZpdU„ZqdV„ZrdW„ZsdX„ZtdY„ZudZ„Zvd[„Zwd\„Zxd]„Zyd^„Zzd_„Zed`„Z{ddda„Z|dddb„Z}dddc„Z~dd„Zde„Z€df„Zdg„Z‚dh„Zƒdi„Z„dj„Z…dk„Z†dl„Z‡dm„Zˆdn„Z‰do„ZŠdp„Z‹dq„ZŒdr„ZdsZŽdt„Zdu„Zdv„Z‘dw„Z’dx„Z“dy„Z”dz„Z•d{„Z–d|„Z—d}„Z˜d~Z™d„Zšd€„Z›d„Zœddddddddddd‚„
Zdƒ„ZždeOd„„ZŸd…„Z d†„Z¡d‡„Z¢dˆ„Z£d‰„Z¤dddŠ„Z¥d‹„Z¦dŒ„Z§dd„Z¨ddŽ„Z©dd„Zªe1d„Z«d‘„Z¬e1d’„Z­d“„Z®d”„Z¯d•„Z°d–„Z±d—„Z²d˜„Z³d™„Z´dš„Zµd›„Z¶dœ„Z·e    jTd„Z¸e    jTdž„Z¹e    jTdŸ„Zºe    jTd „Z»e    jTeOd¡„Z¼d¢„Z½d£„Z¾d¤„Z¿d¥d¦„ZÀd¥d§„ZÁdd¨„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µ„ZÏdd¶„ZÐe1d·„ZÑe1gd¸„ZÒe1gd¹„ZÓe1gdº„ZÔe1d»„ZÕdddd¼„ZÖdddd½„Z×dddd¾„ZØe1dd¿„ZÙdÀ„ZÚdÁ„ZÛd„ZÜddÄZÝddeOdĄZÞddńZßdS(ÆiÿÿÿÿN(tDecimaliÐticCsftjƒ||}t|ƒ}x?|D]7}t||ƒ}tjj|ƒrTq'nt|ƒq'WdS(N(tChConfigt
GetAppPatht__GetFuncFileNameListt__GetSysModulesScriptPathtsystmodulesthas_keyt
__import__(tpathDirt    importDirt
scriptPatht fileNameListtfileNamet
importPath((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt    ImportAllLs  cCsdS(N((R R ((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt ReloadScriptbscCsÊtdƒxŒtjjƒD]{\}}yXt|ƒ}d|ksMd|krSwn|d    krstd|ƒwnt|ƒWqtk
r”qqXqWddl}|j    dƒtdƒt
j ƒdS(
NsR=============================== ReloadScript Begin ===============================s\Lib\s\DLLs\t
PyGameDatas%s Ä£¿é²»ÖضÁ!iÿÿÿÿtscriptsP=============================== ReloadScript End ===============================(s
PyGameData( tLogRRtitemststrtDebugLogtreloadt    ExceptiontDataRecordPackt    DR_Reloadt ReadChConfigtOnReloadConfig(tnamet
reloadPathtpathStrR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt__ReloadScript{s"
 
 
cCs¾g}tjj|ƒs*td|ƒ|Stj|ƒ}x~|D]v}|jdƒ}t|ƒdkrmq@n|\}}|jdƒdkr”q@n|tj    kr©q@n|j
|ƒq@W|S(Ns&ReloadScript Err, path = %s is not dirs.it__init__i( tostpathtisdirtErrLogtlistdirtsplittlentfindRtTYPE_Load_Module_Exttappend(R R t    filesListtfilet
fileStructRtfileExt((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR–s   cCs'|}|dkr#|d|}n|S(NRs.((R RtsysModulesPath((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR¸s cCsttj|t|ƒƒƒS(N(tinttmathtceiltfloat(txtdiv((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetIntUpperÅscCsttj|ƒƒS(N(R2R3R4(R6((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetFloatUpperÍsicCs;td|ƒ}tj|d||dƒ}|t|ƒS(Ni
i(tpowtrandomtrandintR5(tminXtmaxXtprecistmultipletran((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetFloatRanâscCsh||kr||krdStj||||ƒ}ttj|ƒƒ}|dkrd|d}n|S(Niih(R3tatan2R2tdegrees(tStartXtStartYtEndXtEndYtradtth((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetAngleðs  c CsZtƒ}tjtj||dƒtj||dƒƒ}d}d}|dkrs|||}|||}nx¯tdt|ƒƒD]˜}    t||    d|||    d|ƒ}
t||    d|||    d|ƒ} x?t|
| ƒD].} |j| ƒdkrqïn|j    | ƒqïWq‰Wddg|krVd|krV|j
ddƒn|S(Nigð?gii(ii(ii( tlistR3tsqrtR:trangeR)tFiveInOtherOutt    GetAllPostcountR,tinsert( tmatrixtplayerXtplayerYtdestXtdestYtresulttdisttcostsintitxlisttylisttcurPos((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt MatrixCircle8s"    3 ((c
Csœtjtj||dƒtj||dƒƒ}d}d}|dkrj|||}|||}nt|||ƒ}t|||ƒ}    ||    fS(Nigð?gi(R3RMR:R2(
tposDistRVRWtposXtposYRYRZR[tresultXtresultY((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytPosInLineByDistRs3 c
Csœtjtj||dƒtj||dƒƒ}d}d}|dkrj|||}|||}nt|||ƒ}t|||ƒ}    ||    fS(Nigð?gi(R3RMR:R2(
RaRVRWRbRcRYRZR[RdRe((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytPosInLineByDistExas3 cCs;t|ƒ}tt|ƒƒ}||kr1|gS||gS(N(R2tMyRound(tnumtnum1tnum2((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyROus
  cCs?g}x2|D]*}x!|D]}|j||fƒqWq W|S(N(R,(R]R^tposlistR6ty((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRP€s
  cCs ||dS(Nid((tvaluetpercent((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt
GetPercentscCs-yt|ƒ}|SWntk
r(|SXdS(N(R2t
ValueError(tinputtdefValueRX((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytToIntDef˜s
  cCsƒyjt|ƒttgkr|S|jƒsJ|jdƒrY|djƒrYt|ƒ}n t|ƒ}|SWntk
r~|SXdS(Ns-i(ttypeR2R5tisdigitt
startswithRq(tinputStrRsRX((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytToNumDefŸs+  cCsttt||ƒ|ƒƒS(N(R2tmintmax(RrtminNumtmaxNum((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt    ToIntArea²scCsb|jdƒ}t|ƒdkr%dSx6|D].}t||ƒtkrKdSt||ƒ}q,W|S(Ns.i(R(R)tNonethasattrtTruetgetattr(t
curCallObjtcallNametcallListt curCallName((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytParseNameGetObj»s cCs9t||ƒ}|dkrdSt|ƒtkr5dS|S(N(R‡RtcallableR(RƒR„((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetExecFuncÏs  c    CsÏd}d|kr‡|jdƒ}t|ƒdkrË|\}}t|ƒ}t||ƒr„t||ƒ}t|ƒr|}qq„qËnD|dk    r™|ntƒ}||krËt||ƒrË||}n|S(s›»ñÈ¡µ÷Óú¯Êý
    @param funcName: Ö§³Ö¿çÄ£¿é»ñÈ¡£¬Èç Ä£¿é.º¯Êý£¬»ò±¾Ä£¿éʱֱ½Ó´«È뺯ÊýÃû¼´¿É
    @param caller_globals: Èç¹ûÊDZ¾Ä£¿é£¬Ðè´«Èë globals()
    s.iN(RR(R)R    R€R‚Rˆtglobals(    tfuncNametcaller_globalstcallFunctpartst
moduleNamet    func_nametmoduletfunctgDict((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetCallFuncÚs     cCstS(N(R(tcurItem((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytCheckItemIsMaxEndureøscCs!tt||ƒt||ƒƒS(N(R{tabs(RbRcttagXttagY((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetDistscCsAtjt||dƒt||dƒƒ}|s7|St|ƒS(Ni(R3RMR:R9(RbRcR˜R™ttoIntRY((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt    GetDistExs-cCs@|dkrdS||ks8tjd|dƒ|kr<dSdS(Nii(R;R<(tratetmaxRate((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt    CanHappens
 (cCsH|jƒtjd|dƒ}x!|D]}||kr?q'n|SWdS(Nii(tsortR;R<R(trateListRžt    ranNumbertnumber((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytWhichCanHappen,s
  cCsJ| s| rtS|jƒ|jƒkrF|jƒ|jƒkrFtStS(N(tFalsetGetIDtGetGameObjTypeR(tsrcObjtdesObj((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt    IsSameObj=s
0cCst|jƒ|jƒƒS(N(tIsSameCountry_Namet
GetCountry(R¨R©((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt IsSameCountryMscCs6||krtS|tjks.|tjkr2tStS(N(Rt IPY_GameWorldttcNewR¥(tsrcNametdesName((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR«Vs
 cCs>|jƒ}|jƒ}|dks0|dkr4tS||kS(Ni(t GetFamilyIDR¥(R¨R©t    srcFamilyt    desFamily((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt IsSameFamilyfs
  cCs#|jƒdtjgkrdStS(Ni(t
GetGMLevelRt Def_GM_LV_GodR(t    curPlayer((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytIsGMsscCs|jƒdkrtStS(Ni(tGetRealPlayerIDRR¥(R¸((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytIsMirrorPlayerzscCs-| s%|jƒdks%|jƒr)tStS(s€ÊÇ·ñÕý³£¿ÉÓõij£¹æÍæ¼Ò£¬Ò»°ãÓÃÓÚÅжÏÊÇ·ñÊÇÒ»¸öÕý³£µÄÍæ¼Ò
    ¿ÉÓÃÓÚ·â°ü֪ͨÅжϡ¢»î¶¯Íæ¼ÒÅжϵÈÒ»Çнö´¦ÀíÕæÊµ³£¹æÍæ¼ÒµÄÑéÖ¤
    i(R¦tIsEmptyR¥R(R¸((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytIsNormalPlayer€s%cCs,tƒ}t|ƒ}|jdƒd}|S(Ns.i(tGetCurrentTimeRR((tcurTimet
curTimeStr((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetCurrentDataTimeStr‘s     c
Csrg}|s|Stjd|ƒ}|sLtd|||||f|ƒ|Sxÿ|D]÷}|jƒ}    |jƒ}
||    ksS||
krqSn|jƒ} | r¿|dkr¿|| kr¿qSn|jƒ} |jƒ} |j    ƒ}|dkr|t
j kr| r|| 7}n8|dkr?|t
j kr?|r?||7}n
|| 7}|SWtd|||||f|ƒ|S(s»ñÈ¡Íæ¼Ò»î¶¯°ñµ¥Áì½±½±Àø
    @param playerID: Áì½±Íæ¼ÒID
    @param billID: ÉϰñID£¬²»Ò»¶¨ÊÇÍæ¼ÒID£¬±ÈÈ繫»áID
    @param billRank: ÉϰñÃû´Î
    @param awardTemplateID: »î¶¯½±ÀøÄ£°æID
    @param billValue: °ñµ¥ÉϰñÖµ£¬Noneʱ²»´¦Àí
    @param fmLV: »î¶¯Ê±µÄ¹«»á³ÉÔ±µÈ¼¶£¬Noneʱ²»´¦Àí
    tActBillboardAwardsY»î¶¯°ñµ¥½±ÀøÄ£°æÕÒ²»µ½Ä£°æ! billID=%s,billRank=%s,awardTemplateID=%s,billValue=%s,fmLV=%ssY»î¶¯°ñµ¥½±ÀøÄ£°æÕÒ²»µ½½±Àø! billID=%s,billRank=%s,awardTemplateID=%s,billValue=%s,fmLV=%sN( t IpyGameDataPYtGetIpyGameDataListR&tGetRankAtGetRankBt GetNeedValueRtGetAwardItemListtGetLeaderAwardItemListtGetEliteAwardItemListtIPY_PlayerDefinet    fmlLeadert    fmlMember(tplayerIDtbillIDtbillRanktawardTemplateIDt    billValuetfmLVtplayerAwardItemListt ipyDataListtipyDatatRankAtRankBt    needValuet awardItemListtleaderAwardItemListteliteAwardItemList((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetActBillboardTempAward™s8           ! ! 
cCs^i}tjd|ƒ}|rZx9|D].}|jƒ}|jƒ}||t|ƒ<q%Wn|S(NtActGuess(RÃRÄt
GetAwardIDtGetRightRankListttuple(tguessTemplateIDtrightRankAwardIDDicttguessIpyDataListRÖtawardIDt rightRankList((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetActGuessRightRankAwardIDDictÐs   cCsïg}xbt|ƒD]T\}}|d}    t|ƒ|krE||nd}
|
|kr|j|    ƒqqWt|ƒ} |j| dƒ} | |kr¢g|| <n|| } || krÈ| j|ƒntd||| | t| ƒfƒdS(sgͳ¼Æ»î¶¯¾º²Â½á¹û
    @param playerID: ²ÎÓ뾺²ÂµÄÍæ¼ÒID
    @param playerGuessIDList: Íæ¼Ò¾º²ÂÑ¡ÔñµÄID˳ÐòÁбí
    @param finalRankIDList: »î¶¯×îÖÕÅÅÃû˳ÐòÁбí
    @param rightRankAwardIDDict: GetActGuessRightRankAwardIDDict ·µ»ØÖµ
    @param statGuessRetDict: Í³¼Æ½á¹û {awardID:[²ÂÖеÄÍæ¼ÒID, ...], ...}
    @param actName: »î¶¯Ãû³Æ£¬¿ÉÑ¡²ÎÊý£¬Êä³öÈÕÖ¾ÓÃ
    iisC    %sͳ¼ÆÍæ¼Ò¾º²Â½á¹û: playerID=%s,rightRankTuple=%s,awardID=%s,%sN(t    enumerateR)R,RátgetR(RÎtplayerGuessIDListtfinalRankIDListRãtstatGuessRetDicttactNameRætindextfinalIDtranktguessIDtrightRankTupleRåtrightPlayerIDList((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytStatActGuessRetÜs     
"    
 cCstjd|ƒS(NtActTime(RÃtGetIpyGameData(tcfgID((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetActIpyData÷scCstt|ƒƒS(N(tGetActTypeIpyDataRø(R÷((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetActTypeIpyDataByCfgIDùscCs)|s
dStjd|jƒ|jƒƒS(NtActType(RÃRötGetActFuncTypet GetActTempID(t
actIpyData((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRùýscCsct|ƒ}|sdStjdt|ƒƒ}|s8dSx$|D]}|jƒ|kr?|Sq?WdS(NtActZone(RøRÃRÄtGetActZoneSignt    GetZoneID(R÷tzoneIDRþtzoneIpyDataListt zoneIpyData((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetActZoneIpyDataByZoneIDs  cCsZ|s
dStjdt|ƒƒ}|s,dSx'|D]}t||jƒƒr3|Sq3WdS(NRÿ(RÃRÄRtCheckServerIDInListtGetServerIDList(Rþt actServerIDRR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetActZoneIpyDatas cCs£|s
dS|jƒ}|jƒ}| r7|r7|dStƒ}||krPdS|j|ƒ}|dks}|t|ƒkr›td|jƒ|fƒdS||S(NRis)GetActZoneSignError: cfgID=%s,platform=%s(tGetPlatformListtGetZoneSignListtGetAppIDRîR)R&tGetCfgID(Rþt platformListt zoneSignListtplatformRî((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRs        cCs8|tjkriStj|}||kr0iS||S(N(Rt g_actionDict(RítactNumt
actNumDict((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt __GetActInfo,s   cCs8|tjkriStj|}||kr0iS||S(N(Rtg_crossActionDict(RíRR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt__GetCrossActInfo5s   cCsit||ƒ}|s't||ƒ}n|r1|S|tjkrDiStj|}||kraiS||S(N(RRRtg_operationActionDict(RíRtactInfoR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt
GetActInfo>s  cCsc|dks|dks| r#dS|jƒ}|s9dS|t|ƒkrU|dn||}|S(Niiÿÿÿÿ(RtGetTemplateIDListR)(RÖR÷tdayIndexttemplateIDListt
templateID((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetTemplateIDKs &cCsD|dkrdS|sdS|t|ƒkr6|dn||}|S(Niiÿÿÿÿ(RR)(RRR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetTemplateIDByListTs  &cCs|jdƒ}t|ddƒ}|d}t|tjƒ}|jdƒ}t|ƒdkrj|dn|d}t|tjƒ}    ||krÔ||j}
|
|d} |    |j|d} t| | ƒ} nd} |tj    | d|ƒ} | tj    d|dƒ}| || fS(Nt_iitdays(
R(R2tChangeStrToDatetimeRtTYPE_Time_Format_DayR)R!Rztdatetimet    timedelta(t startDateStrt
endDateStrt curDateTimetstartSplitListtloopDayststartLoopDateStrtstartLoopDateTimet endSplitListtendLoopDateStrtendLoopDateTimetpassDayst    loopTimest loopTimeMaxt startDateTimet endDateTime((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetOperationActionLoopDate\s 
&  cCsì|stjjƒ}n|jƒ}|jƒ}|sUd|j|j|jf}n|szd|j|j|jf}n|jdƒdkrµd|krµ|jdƒ rµ||fSddl    }|j
ƒr,|j ƒj t jƒd}|tjdt|ƒ|ƒ}|tjdt|ƒ|ƒ}n~|jd    ƒr¢|j ƒj t jƒd}|tjdt|dƒ|ƒ}|tjdt|dƒ|ƒ}n|jd
ƒr|j ƒj t jƒd}|tjdt|d ƒ|ƒ}|tjdt|d ƒ|ƒ}n’|jdƒrq|jƒd}|jd ƒ}    |    d }
t|
dƒ} |tjd| |ƒ}t|    ƒdkrÀ|    d} t| tjƒ} | |krÀ| }qÀn|jƒd}|jd ƒ}|d }t|dƒ}|tjd||ƒ}t|ƒdkrª|d}t|tjƒ}||krV|}n||krn|}qnqªn9|jdƒržt|||ƒ\}}}n |}|}d|j|j|jf}d|j|j|jf}||fS(Ns%d-%d-%ds-itWtLiÿÿÿÿiR!tKtMixis|i(R$ttodayt GetStartDatet
GetEndDatetyeartmonthtdayRQRwt    DBDataMgrRvtGetEventTrigMgrtGetValuet ShareDefinet Def_ServerDayR%R2RttDef_MixServerDaytweekdayR(R)R"RR#R5(RÖR(R&R'R@tdiffDayR3R4t
curWeekdaytstartWeekDateInfot startWeekInfot startWeekdayR+R,t startWeekDaytendWeekDateInfot endWeekInfot
endWeekdayR.R/R ((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetOperationActionDateStrtsj  1
   #$'$'
 
 
 
      c
Cs_|jtjƒ}|sdStj||ƒ}|s8dSt|dƒsKdS|jƒ}|sadS|jƒ}|jƒ}|j    ƒ}    t
}
|} |jtj dƒs°|
| fSt |t j|tƒ} | sòtd|||f|    ƒ|
| fSt|dƒsdn    |jƒ} |jtjƒ}tƒ}t
}| r]t}td|||f|    ƒn$|s†t}td|||f|    ƒnû|rat||ƒ\}}||ko¸|knrãt}
td||||f|    ƒq||kr;|rt}td||||f|    ƒq^td    ||||f|    ƒqtd
||||f|    ƒt}n t}
td |||f|    ƒ|r/t}
t|d ƒs¢dn    |jƒ}d |j|j|jf}|dkrõtjjd|t jƒ}ntjjd|t jƒ}ttj|jƒƒƒ} ntd|||||| |
f|    ƒ|
| fS(NtGetRelateFuncIDis?¹ØÁª¹¦ÄÜ먦ÆôĬÈϲ»¿ª»î¶¯! actName=%s,cfgID=%s,relateFuncID=%st GetIsDayResetsA¹ØÁª¹¦Äܻ£¬Ã¿ÈÕÖØÖõĻ! actName=%s,cfgID=%s,relateFuncID=%ssC¹ØÁª¹¦Äܻ£¬Íæ¼ÒÊ״οªÆô»î¶¯! actName=%s,cfgID=%s,relateFuncID=%ss3¹ØÁª¹¦Äܻ£¬Õý³£»î¶¯ÖÐ! actName=%s,cfgID=%s,%s~%ssE¹ØÁª¹¦Äܻ£¬»î¶¯½áÊø£¬ÖØÐ¿ªÊ¼Ñ­»·Ð»! actName=%s,cfgID=%s,%s~%ss9¹ØÁª¹¦Äܻ£¬»î¶¯½áÊø£¬²»Ñ­»·! actName=%s,cfgID=%s,%s~%sse¹ØÁª¹¦Äܻ£¬Íæ¼Ò»î¶¯ID³¬¹ýµ±Ç°Ê±¼ä£¬¿ÉÄÜÊǵ÷ʱ¼äÒýÆð£¬ÖØÐ¿ªÊ¼Ñ­»·Ð»! actName=%s,cfgID=%s,%s~%ssA¹ØÁª¹¦Äܻ£¬ÓÀ¾Ã¿ª·ÅµÄ»î¶¯! actName=%s,cfgID=%s,relateFuncID=%st GetResetTypes%d-%d-%dis %s 05:00:00s %s 00:00:00s^¹ØÁª¹¦Äܻ! actName=%s,cfgID=%s,actNum=%s,relateFuncID=%s,playerActID=%s,actID=%s,isInAct=%s( RéRCt ActKey_CfgIDRÃtGetIpyGameDataNotLogR€RQtGetFuncActDayst GetFuncLoopt GetPlayerIDR¥t ActKey_StatetGetDictValueByBitRt"Def_Player_Dict_GameFuncFirstTouchRRRRt ActKey_ActNumR¾tGetActRelateFuncDateRSR=R>R?R$tstrptimetTYPE_Time_FormatR2ttimetmktimet    timetuple(R¸RíRt playerActIDR÷RÖt relateFuncIDt funcActDaystfuncLoopRÎtisInActtactIDtisOpent    isDayRestRt
serverTimetnewActt startDayDatet
endDayDatet    resetTypeR&((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetActRelateFuncInfoÃsr    
 
!            !  c Cs|jƒ}t|dƒs!dn    |jƒ}t|dƒsBdn    |jƒ}|r]d}nt|tjƒ}|r2t|ƒd }|dkrÀtjj    d|tjƒtj
d|ƒ}q°|dkrÿtjj    d    |tjƒtj
d|dƒ}q°tjj    d    |tjƒtj
d|dƒ}n~|j ƒ}    |dkritjj    d|    tjƒ}nG|dkr”tjj    d    |    tjƒ}ntjj    d    |    tjƒ}|rød
|j |j |jf}
d
|j |j |jf}    |
|    fS||fS( NRRiRSii
s %s 04:59:59R!is %s 23:59:59s%d-%d-%d(RVR€RRRStChangeTimeNumToDatetimeRR_RR$R^R%R<R=R>R?( RÖt    startTimet returnYmdStrReRjRoRmt startDayStrRnR'R&((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR]s0 !!     / 33   
cCs tjjƒS(N(R$R:(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR¾1scCs tjjƒS(N(R$R:(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetServerTime3scCstjjtjjƒƒdS(Ni(R$t isocalendarR:(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetWeekOfYearAscCs_|jƒjdƒd}ytjj||ƒSWn(tk
rZ}td||fƒdSXdS(Ns.is%s : %s(tstripR(R$R^t BaseExceptionR&(ttimeStrt    timeFomatte((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetDateTimeByStrJscCs_|jƒjdƒd}ytjj||ƒSWn(tk
rZ}td||fƒdSXdS(Ns.is%s : %s(RxR(R$R^RyR(Rzt
timeFormatR|((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetDateTimeByFormatStrZscCs@t|ƒ}|dkr*td|ƒdS|jd|jdS(Ns GetPastHour Err dateTimeStr = %siii(t__GetPastTimeDeltaRR&R!tseconds(t dateTimeStrt pastTimeDelta((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetPastHouris
  cCsDt|ƒ}|dkr*td|ƒdS|jdd|jdS(Ns"GetPastMinute Err dateTimeStr = %siii<(R€RR&R!R(R‚Rƒ((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetPastMinutevs
  cCsDt|ƒ}|dkr*td|ƒdS|jddd|jS(Ns"GetPastMinute Err dateTimeStr = %siii<(R€RR&R!R(R‚Rƒ((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetPastSeconds„s
  cCs9tƒ}t|ƒ}|dks-|dkr1dS||S(N(R¾R}R(tcompareTimeStrt curDataTimetcompareDataTime((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR€’s
     cCs$||}|jdd|jdS(Nii<(R!R(R¿ttagTimet    diff_Time((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetDiff_Minute¢s
cCsqt|ƒ}tj|j|j|jdddƒ}t|ƒ}tj|j|j|jdddƒ}||jS(Ni(RqR$R=R>R?R!(ttimeAttimeBt    dateTimeAt    dateTimeB((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetDiff_Day§s
 ' 'cCsyt|ƒ}tj|j|j|jdddƒ}ttj|jƒƒƒ}|||t    |ddƒdd}|S(Nii;iiii(
RqR$R=R>R?R2R`RaRbR{(RrtaddDayst    startDatet startZeroDatet startZeroTimetendTime((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetEndTimeByZeroTime¯s
 ''cCstƒtjd|ƒS(NR!(R¾R$R%(tdiffDays((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetDatetimeByDiffDays¾scCstƒj|ƒ}t|ƒS(N(t GetNPCManagert FindNPCByIDt__GetSummonTagNPC(tnpcIDtcurTag((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR›ÅscCs;tƒ}|j|ƒ}|s-t|ƒ}n|r7|SdS(N(RštFindGameNPCByNPCIDtFindSummerNPCByNPCID(RtnpcMgrtfindNPC((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytFindNPCByNPCIDÉs    cCsgtƒ}xWt|jƒƒD]C}|j|ƒ}|jƒdkrIqn|jƒ|kr|SqWdS(Ni(RštxrangetGetSummonNPCCounttGetSummonNPCAtR¦tGetNPCID(RR¡RîtcurNPC((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR Òs    cCsstƒ}xct|j|ƒƒD]L}|j||ƒ}|jƒ}|dkrUqn||jƒkr|SqWdS(Ni(RšR¤tGetNPCCountByGWIndextGetNPCByIndexByGWIndexR¦R§(t    copyMapIDRtgameNPCManagerRîR¨tcurID((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytFindNPCByNPCIDExÜs      cCstƒj|ƒ}t|ƒS(N(Ršt GetNPCByIndexRœ(tnpcIndexRž((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR¯ìscCstS(N(t __GameWorld(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetGameWorldûscCs
tjƒS(N(R±Rš(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRšscCs
tjƒS(N(R±tGetTeamManager(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR³ scCs
tjƒS(N(R±tGetPlayerManager(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR´scCs
tjƒS(N(R±tGetMapItemManager(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRµscCs
tjƒS(N(R±tGetMapCopyPlayerManager(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR¶#scCs
tjƒS(N(R±tGetMap(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR·+scCs9tƒ}||kr|S||}|jd|ƒ}|S(Nt    DataMapID(tGetMapIDTxtInfoRé(tmapIDt mapIDTxtInfotmapInfot    dataMapID((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetMapDataMapID.s      
cCsÚtjrtjSit_tjƒ}|d}t|ƒ}xv|jƒD]h}|jdƒ}| sHt|ƒdkr|qHnt|dƒ}t|dƒ}i|d6tj|<qHWt    d|ƒt    dtjƒtjS(    Ns>\ZoneServerGroup\map1_8G\MapServer\MapServerData\Map\MapID.txts    i    iiR¸sLoad %ssg_mapIDTxtInfo=%s(
Rtg_mapIDTxtInfoRtGetServerRootPathtopent    readlinesR(R)R2R(trootPathtmapIDTxttftlinetlineListttMapIDt
dDataMapID((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR¹7s          
 cCs
tjƒS(N(R±tGetMail(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRÊNscCs
tjƒS(N(R±t    GetScript(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRËVscCs
tjƒS(N(R±t    GetGameFB(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRÌ^scCs
tjƒS(N(R±tGetAllFbNPCManager(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRÍfscCsj|dkrdS|jƒ}|tjkrAtƒj|jƒƒS|tjkrftƒj|jƒƒS|S(N(    RtGetGameNPCObjTypeR®t
gnotSummonRštFindSummonNPCByIDR¦tgnotPett FindPetByID(t    curTagNPCtnpcObj((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRœns  cCsA|jƒtjkr=|jƒtjtjtjgkr=tSdS(N(R§R®tgotNPCtGetTypetntWalltntDeert ntDefenceMaxR(tcurObj((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetNPC_Is_Gates9cCs‡|jƒ}|jƒ}|tjkr7tƒj|ƒS|tjkrPt|ƒS|tjkrot    ƒj
|ƒSt d||fƒdS(Ns*»ñµÃobjÀàʧ°Ü objType = %s , objIndex = %s( R§tGetIndexR®t    gotPlayerR´tGetPlayerByIndexRÕR¯tgotItemRµtGetPoolItemByIndexR&R(tobjtobjTypetobjIndex((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetObjDetailŠs  
cCs[|tjkrtƒj|ƒS|tjkr8t|ƒS|tjkrWtƒj|ƒSdS(N(
R®RÝR¶tFindPlayerByIDRÕR›RßRµt GetItemByIDR(tobjIDRâ((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetObjŸs
cCstS(N(t ItemFactory(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetItemFactory°scCstS(N(tGameData(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetGameData¸scCs*|jƒtjkrdSt||ƒdS(N(R¶RR·t DebugAnswer(R¸tmsg((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGodLogÁs cCstjd|||fƒdS(Ns%s    %s    %s(tLogUItMsg(RîRÎtpar((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRÏscCstjd|||fƒdS(Ns%s    %s    ###Error:%s(RðRñ(RîRÎRò((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR&ÚscCs1tƒjƒsdStjd|||fƒdS(Ns%s    %s    PyDebug:%s(R²t GetDebugLevelRðRñ(RîRÎRò((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRãscGsjtjƒsdSd}d}y||}Wn||d }|d}nXtjd|||fƒtS(Niiÿÿÿÿs%s    %s    PyDebug:%s(R±RóRðRñR(t    logFormattargsRòRÎRî((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt
DebugLogExês cCsÎtsÊtjƒ}|d}tjj|ƒsOtd|ƒtd|ƒ‚ntjƒ}|j    |ƒd\}}|j
||ƒs¡td|||fƒdSt |j ||ƒƒat dtƒntS(    NsT\ZoneServerGroup\rungate\InterfaceServer\MultiServerWarProxyServer\Config\config.inisÎÞ·¨ÕÒµ½Îļþ = %stConfigtServerIDs#%s ÕÒ²»µ½ÅäÖÃ: section=%s,option=%sis¶ÁÈ¡ MergeServerID=%s(R÷Rø(t MergeServerIDRRÀR#R$tisfileR&Rt ConfigParsertreadt
has_optionRtRéR(RÃtmergeServerIniFiletmergeServerInitsectiontoption((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetMergeServerIDþs 
   cCs tƒjƒS(N(R²tGetServerVersion(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRscCstƒtjkS(N(t GetServerTypeRCtserverType_Cross(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt IsCrossServerscCstƒtjkS(N(RRCtserverType_CrossCenter(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt IsCrossCenter scCs™tƒs dStƒdkr dSd}tjƒ}x`|jƒD]R}|tj}|tjkr?|d7}|dkr‘tdddt    ƒdSq?q?WdS(NttestiitCrossCenterUniquenessErrs¿ç·þÖÐÐÄÖ»ÔÊÐíÅäÖÃһ̨t
isRaiseErr(
RR RtGetServerConfigDicttvaluesRCtserverCfgIndex_ServerTypeRtSendGameErrorExR(t    serverCntt
serverDictt
serverInfot
serverType((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytCheckCrossCenterUniquenessErr$s      
  cCstƒtjkS(N(RRCtserverType_Main(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt IsMainServer7scCstƒtjkS(N(RRCtserverType_Battle(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytIsBattleServer;scCstjdƒ}|dkrŒd}tjƒ}tƒjƒ}||kry||}|tj}t    d|||fƒntj
d|ƒn|S(Nt
ServerTypeis;¼ÓÔØ±¾·þ·þÎñÆ÷ÀàÐÍ: serverID=%s,ServerType=%s,serverInfo=%s( RÃt GetConfigExRRR R²t GetServerIDRCRRt SetConfigEx(RRtserverIDR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR?s   
 cCstjddƒS(NRt    GroupName(RtGetServersRouteConfig(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetServerGroupNameMscCsdS(N((((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetMixServerDictQscCs|S(N((R((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetMainServerIDcscCstjddƒS(NRtAppID(RtGetPyMongoConfig(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR lscCs
|dkS(NR    tyun(stestR%((R((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytIsTestPlatformpscCs=|jƒ}tƒt|jdƒdtjƒ}|jdS(Ns ii(tGetCreateRoleTimeR¾R}R(RR#R!(R¸tcreateRoleTimetdiffTime((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetCreateRoleDaysrs &s@cCst|jƒƒS(N(tGetAccIDServerIDtGetAccID(R¸((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetPlayerServerID~scCs7|jtƒ}t|ƒdkr%dSt|ddƒS(Niiiÿÿÿÿi(R(tDef_AccID_Split_SignR)Rt(taccIDtinfoList((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR+scCs9|jƒ}|jtƒ}t|ƒdkr1dS|dS(NiRiÿÿÿÿ(R,R(R.R)(R¸R/R0((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetPlayerServerSIDƒs cCstjj|dƒS(NR(Rtg_dbPlayerIDMapRé(RÎ((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetDBPlayerAccIDByID‰scCs™|dkrtS|stSxx|D]p}t|ttfƒrrt|ƒdkrr|d|kom|dknst|tƒr!||kr!tSq!WtS(Niii(RR¥Rt
isinstanceRLRáR)R2(Rt serverIDListt serverIDInfo((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRs  KcCs1|jƒjƒ}|s-t|jƒƒ}n|S(N(tGetAccountDatat GetOperatortGetAppIDByAccIDR,(R¸tappID((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetPlayerPlatform©scCs,|jtƒ}|d }tj|ƒ}|S(Niþÿÿÿ(R(R.tjoin(t    gameAccIDR0t
paInfoListt platformAccID((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetPlatformAccID°s
cCs-|jtƒ}t|ƒdkr)|dSdS(NiiþÿÿÿR(R(R.R)(R=R0((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR9µscCs-tj|jƒ|jƒjƒdƒjƒS(Ntmobile(tmd5R,R7tGetLastLoginTimet    hexdigest(R¸((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetSessionIDºscCs|jtjƒS(N(tNomalDictGetPropertyRtDef_Player_Dict_Account_Type(R¸((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetAccountType½stPDict_ChannelCodeNumcCs·tjdƒ}|s&|jtƒdS|jƒ}||krYtd||jƒƒdSxW|jƒD]I\}}||krf|jt|ƒt    d||f|jƒƒPqfqfWdS(Nt ChannelCodes?Can not find channel code(%s) in ChannelCode.txt, please check!s#SetPlayerChannelCode code=%s,num=%s(
RtGetEvalChConfigtNomalDictDelPropertyRIR R&RXRtNomalDictAddPropertyR(R¸t channelCodetChannelCodeDicttcodeListtcodeNumtcode((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytSetPlayerChannelCodeÅs    cCs>|jtƒ}|dkrdStjdƒ}|j|dƒS(NiRRJ(RFRIRRKRé(R¸RQRO((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetPlayerChannelCodeÞs
 cCsttjƒƒS(N(Rtuuidtuuid1(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetGUIDæsc
 
Cs/tƒj||||||||||    ƒ
dS(N(R²tDataServer_HugeTradeRec(
t    tradeGoldt tradeSilvert tradeItemIDttradeItemCounttsenderIDt
senderGoldt senderSilvert
receiverIDt receiverGoldtreceiverSilver((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytNoteDownLargeTradeös    cCsZ|tjkr+|j||||dƒn+|tjkrV|j|||d|ƒndS(Ni(R®tTYPE_Price_Gold_MoneytInterface_GoldRectTYPE_Price_Gold_Paper(R¸ttypeIDt    typeCountttypeNamet    moneyTypet
moneyCount((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytLogin_Interface_GoldRecs
cCsÇtƒj||ƒs6td||f|jƒƒdS|j|||ƒt|ƒ|rÃ|jƒjƒ}|rÃddl}|j    |ƒj
|j ƒ|j ƒdƒ\}}|j||ƒqÃndS(Ns5ResetPlayerPos ³¢ÊÔÒÆ¶¯µ½Õϰ­µã, posX = %s, posY = %siÿÿÿÿi( R·tCanMoveR&R¦tResetPostClearPlayerPosCountt    GetPetMgrt GetFightPett    NPCCommont
NPCControltGetMoveNearPostGetPosXtGetPosY(R¸RbRctreasont
isResetPettrolePetRr((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytResetPlayerPos!s
 0cCs|jdƒ|jdƒdS(Ni(t SetMoveCounttSetMoveDistDiff(R¸((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRo7s  cCsB|s
tSt|dƒ|ko5t|dƒknr>tSdS(Nii(RR}(R¿tactSect((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt IsAtActTimeBs
0cCsdS(Ni((tcurLV((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt
GetReMoneyQscCs8||j|ƒtj|kr$tS|j||ƒtS(N(t GetTickByTypeRtTYPE_Player_Tick_TimeR¥t SetTickByTypeR(R¸tfuncKeyttick((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytSetPlayerTickTime[s cCsöi}x‚|D]z}t|ƒdkr7|\}}}n*t|ƒdkr |\}}d}nq ||f}|j|dƒ|||<q Wg}x^|jƒD]P\}}|\}}|dkrØ|j||gƒqž|j|||gƒqžW|S(Niii(R)RRéRR,(titemListtitemDicttitemInfotitemIDt    itemCountt isAuctionItemtkeyt    mItemList((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt MergeItemListcs"         c Cs2|dkr|Sg}t|ƒ}||kr2|S||krox|D]}|j|dƒqEW|rk|SgStj|ƒ}|rŠ|n |dd}xˆt|ƒD]z}tjd|ƒ}    x_t|ƒD]Q\}
}|    |dkrìqÊn|j|dƒt||
ƒ}|dd}PqÊWq¥W|r.|SgS(Niiiÿÿÿÿ(    R)R,tcopytdeepcopyRNR;R<Rèt ResetRiseList( triseListt    randomNumRsRžtdataInfotlistLentdatat tempRiseListR\Rtj((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetResultByRandomListEx€s,         cCs½t|ƒ}|dkrgS||kr-|Stj|ƒ}|dkrZ||ddnd}||d}||d|!}x"|D]}|dc||8<q†Wtj|d|!|ƒS(Nii(R)RR‘(R“tdelIndext riseListLenR˜t lastBaseRetetbaseRatettempListtriseInfo((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR’§s   $ c
Cs°g}x£t|ƒD]•\}}|\}}|dkr=|n|||dd}|s_|n|t||dƒ}|sƒ|n|dd|}    |j|    |fƒqW|S(NiigˆÃ@iÿÿÿÿ(RèR2R,(
t
srcPieListtplusRatet plusPieListR\trateInfoRtinfotsrcRatetnewRatetspecRate((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetPlusPieList¹s ($cCs4|s
|Stjd|ddƒ}t|||ƒS(Niiÿÿÿÿ(R;R<tGetResultByRiseList(trandListRsR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetResultByRandomListÇscCs0x)|D]!}||dkr#qn|dSW|S(Nii((R“tpointRst    smallList((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRªÒs
     cCs¢g}d}x_|D]W}|ds)qn||d7}|j|t|ƒdkr\|dn|dgƒqW|sx|Stjd|ddƒ}t|||ƒS(Niiiiÿÿÿÿ(R,R)R;R<Rª(t
weightListRsR«tweightR¥R((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetResultByWeightListÝs 
7cCsmxDtt|ƒƒD]0}|dkr+qn||c||d7<qWtjd|dƒ}t|||ƒS(Niiiÿÿÿÿ(RNR)R;R<tGetResultByRiseIndex(R«tisCriticalDownwardR\R­((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetIndexByIndependRateðs  cCs"tjdtjƒ}t||ƒS(Ni(R;R<RtDef_NPCMapDropRateR²(R«R((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetResultByRandomIndexscCs~xwtdt|ƒƒD]`}||}t|tƒr>|}n
|d}|rc||kruqqun||kruqn|SWdS(Niiÿÿÿÿ(RNR)R4R2(R“R­R³RîtelementtcmpPoint((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR²
s
    
      cCs|S(N((R’((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetPsycoFunc#scCs tjdƒS(Nt PsycoSwitch(RRK(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt__GetPsycoIsOpen0scCshtdtƒƒg}x7tjjƒD]&}|j||jdƒdgƒq'Wttj    d|ƒdS(NsPsycoReload Begin : time = %ss.iÿÿÿÿR(
RRÁRRtkeysR,R(t
TravelFileRt
ScriptPath(R…tmoduleNameListR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt PsycoReload7s $cCsØxÑtj||ƒD]¼}|jdƒr/qn|jdƒd}xN|D]F\}}||krgqIntjj|ƒ}|s…qInt|ƒqIWtjj    ||d|ƒrt
||d|d|ƒqqWdS(Ns.is\( R#R'RwR(RRRéRR$R%R½(R tfilePathR¿Rt curModuleNamet
reloadNameRR‘((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR½Fs #cCsMt|dƒd}t|dƒdd}t|dƒd}|||fS(Nièii<(R2(t    inputTimet curTimeHourt curTimeMinutet curTimeSecond((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytChangeInputTimedscCs/|jƒ}tjdƒ}||kr+tStS(NtDef_Mission_DR_MinLV(tGetLVRRKR¥R(R¸tplayerLVtminDRLV((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt
IsMissonDRns
  cCsBtjddƒrtSyt|tjddƒƒWntSXtS(Nt EncodingTexii(RÃt
GetFuncCfgRtunicodeR¥(t    inputText((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytEncodingToUnicode}scCstjddƒS(NRÎi(RÃRÏ(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetCharacterEncoding‹scCs/y |jtjƒjtƒƒSWn|SX|S(N(tdecodeRCtDef_Game_Character_EncodingtencodeRÓ(RÑ((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt    GbkToCodeŽs
 cCs/y |jtƒƒjtjƒSWn|SX|S(N(RÔRÓRÖRCRÕ(RÑ((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt    CodeToGbk–s
 cCs.tjj||ƒjƒ}ttj|ƒƒS(N(R$R^RbR2R`Ra(RzR~((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytChangeTimeStrToNum¡scCstj|tj|ƒƒS(N(R`tstrftimet    localtime(ttimeNumR~((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytChangeTimeNumToStr¨scCs.tj|tj|ƒƒ}tjj||ƒS(N(R`RÚRÛR$R^(RÜR~Rz((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRq®scCs>ytjj||ƒSWn tjddddddƒSXdS(Ni²iii(R$R^(RzR~((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR"²scCs/|j|ƒ}|r+d||jf}n|S(Ns%s.%s(RÚt microsecond(tdateTR~tisMstdate_str((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytChangeDatetimeToStr¹scCsttj|jƒƒƒS(N(R2R`RaRb(Rß((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytChangeDatetimeToNumÂscCs:|s
tS|r ||kr tS|r6||kr6tStS(N(R¥R(R“tendDatet    checkDate((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt CheckDateInÄscCstttƒƒd tjƒS(Ni
(RÙRR¾RR#(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetTodayTimeÒsicCs3|j|kr)|jƒtjddƒS|jƒS(NR!i(thourtdateR$R%(tdtt    eventHour((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt
GetGameDayÚscCs.| s| rtSt||ƒt||ƒkS(sÂÅжÏÖ¸¶¨timeÖµÓëµ±Ììʱ¼ä¶Ô±ÈÊÇ·ñΪÓÎÏ·ÄÚµÄͬһÌì£»ÌØÊâʱ¼äµã¹ýÌìºó²ÅË㲻ͬÌì
    ¼ò»¯Âß¼­£¬¸üÖ±¹Û
    @param eventHour: ²ß»®¹æ¶¨µÄij¸ö¹ýÌìСʱ½Úµã£¬ÈçÿÈÕ5µã¡¢22µãµÈ
    @return: ÊÇ·ñͬһÌì
    (R¥Rì(RåtcurDateRë((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytCheckIsSameDayEventHourßscCs`t|ƒ}tjj|ƒd}|rMt|ƒ}tjj|ƒd}n    tƒ}||kS(siÅжÏÖ¸¶¨timeÖµÓëµ±Ììʱ¼ä¶Ô±ÈÊÇ·ñΪÓÎÏ·ÄÚµÄͬһÖÜ£»ÌØÊâʱ¼äµã¹ýÌìºó²ÅË㲻ͬÌì
    @return: ÊÇ·ñͬһÖÜ
    i(RqR$RvRw(t    checkTimeR¿Råt    checkWeekRítcurWeek((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytCheckTimeIsSameWeekés      cCs^| s| rtSt|ƒ}t|ƒ}|j|jko]|j|jko]|j|jkS(N(R¥RqR=R>R?(RïR¿RåRí((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytCheckTimeIsSameDateös
  cCsO|jƒjƒ}|jƒjƒ}tjdƒ}t|jddƒƒ}|S(Nt AreaNameInfotNameExprR(R7R8t    GetAreaIDRRKtevalRé(R¸toperatortareaIDt areaNameInfotareaName((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetAreaName    s
cCst|ƒ}tj|ƒS(N(RütCommFunct    GetStrCrc(R¸Rû((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt
GetAreaCrc    s cCs;x4|jƒD]&\}}|j|dƒ|||<q WdS(Ni(RRé(tdict1tdict2RRn((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt AddDictValue    scCsPxI|jƒD];\}}|j|dƒ}||||tj||<q WdS(Ni(RRéRCtDef_MaxRateValue(RRRRntvalue1((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytCalcAttrDictPer#    s!cCs|td|ƒdS(Ni
(R:(tnumValuet    dataIndex((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetDataByDigitPlace0    scCsY|dks'|dks'|tjkr+|St||ƒ}|td|ƒ||7}|S(Nii    i
(RCtDef_PDictDigitCntRR:(RRt    dataValuet    lastTagLV((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytChangeDataByDigitPlace9    s
'cCs4td|ƒ}td||ƒ}|||}|S(s½»ñȡij¸öÊýÖµÖУ¬´ÓÓÒÍù×óÊýµÚxλ¿ªÊ¼£¬½ØÍ¼nλµÃµ½µÄÊý¾Ý
    @param dataValue: Ô­Ê¼ÊýÖµ
    @param fromRight: ´ÓÓÒÍù×óÊýµÚxλ¿ªÊ¼£¬´Ó1¿ªÊ¼
    @param bits: ½ØÈ¡nλ
    @return: ÊýÖµvalue
    i
(R:(R
t    fromRighttbitstlPowtrPowtcurValue((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRBD    scCsJtd|ƒ}td||ƒ}|||}||}||||S(síÐÞ¸Äij¸öÊýÖµ£¬´ÓÓÒÍù×óÊýµÚxλ¿ªÊ¼£¬½ØÍ¼nλµÃµ½µÄÊý¾Ý£¬Ì滻Ϊ¾ßÌåÊýÖµ
    @param dataValue: Ô­Ê¼ÊýÖµ
    @param fromRight: ´ÓÓÒÍù×óÊýµÚxλ¿ªÊ¼£¬´Ó1¿ªÊ¼
    @param bits: ½ØÈ¡nλ
    @param updValue: Ìæ»»Öµ
    @return: Ð޸ĺóµÄvalueÖµ
    i
(R:(R
R RtupdValueRRt    leftValuet
rightValue((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytSetValueP    s
 
cCs|d|>@rdSdS(s¸ µÃµ½Ä³¸ö×Ö½ÚÖµÖÐijһλ(Bit)µÄÖµ
    @param dataValue: ´ýȡֵµÄ×Ö½ÚÖµ
    @param index: ´ý¶ÁȡλµÄÐòºÅ£¬´ÓÓÒÏò×ó0¿ªÊ¼£¬0-7Ϊһ¸öÍêÕû×Ö½ÚµÄ8¸öλ
    @return: ·µ»Ø¶ÁÈ¡¸ÃλµÄÖµ£¬0»ò1
    ii((R
Rî((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetBitValue^    scCs|r|d|>BS|d|>@S(sß ¸ü¸Äij¸ö×Ö½ÚÖµÖÐijһλ(Bit)µÄÖµ
    @param dataValue: ×¼±¸¸ü¸ÄµÄ×Ö½ÚÔ­Öµ
    @param index: ´ý¸ü¸ÄλµÄÐòºÅ£¬´ÓÓÒÏò×ó0¿ªÊ¼£¬0-7Ϊһ¸öÍêÕû×Ö½ÚµÄ8¸öλ
    @param val: Ä¿±êλԤ¸ü¸ÄµÄÖµ£¬0»ò1
    @return: ·µ»Ø¸ü¸Äºó×Ö½ÚµÄÖµ
    i((R
Rîtval((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt SetBitValuef    s cCsJt|ƒtt|ƒƒdkr,t|ƒSt|ƒt|t|ƒƒS(Ngà?(R—R2(Ri((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRht    scCsT||kr||Sx9|jƒD]+\}}t|tƒr!||kr!|Sq!WdS(N(RR4Rá(tattrDicttfindKeyRRn((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetDictValueByKey|    s  cCs~||kr||Sxc|jƒD]U\}}t|tƒr!t|ƒdkr!|d|kom|dknr!|Sq!W|S(Niii(RR4RáR)(tsrcDictRRstrangeKeyRn((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetDictValueByRangeKey‰    s  EcCs |r dnd}||}|S(Nii    ((tbittisBint perKeyMaxBittkeyNum((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetDictKeyNumByBit“    s
c Cs|r dnd}||}|s,||n|t||gƒ}|j|ƒ}||}    |rŠ|td|    ƒ@}
|
rdnd}
nt||    ƒ}
|
S(Nii    iii(RáRFR:R( R¸t    keyFormatRR tkeyParamR!R"tkeyNamet    dictValuetbitIndextbitValue((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRZŸ    s
'
c Cs|r dnd}||}|s,||n|t||gƒ}|j|ƒ}    ||}
|r©|r~|    td|
ƒB} q»|    td|dƒdtd|
ƒ@} nt|    |
|ƒ} | dkrÚ|j|dƒnddl} | j||| ƒ|    | fS(Nii    iiiiÿÿÿÿ(RáRFR:R RLt PlayerControltNomalDictSetProperty( R¸R$RRnR R%R!R"R&R'R(t updDictValueR*((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytSetDictValueByBit·    s
'
+  c    Cs€|r dnd}ttj|t|ƒƒƒ}xHt|ƒD]:}|sT||n|t||gƒ}|j|ƒq>WdS(Nii    (R2R3R4R5RNRáRL(    R¸R$tmaxLenR R%R!tkeyCntR\R&((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytResetDictAllBitValueÏ    s 'cCsG||||g}t|ƒ}tƒjdddd|t|ƒƒdS(NitSendBroadcastMergeClient(RR´tGameServer_QueryPlayerResultR)(toperTypeRºR•tisRepeattmsgList((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytSendBroadcastMergeÝ    s %cCsA||g}t|ƒ}tƒj|||d|t|ƒƒdS(NtSendMergerChildMsg(RR´R2R)(R3tdataMsgt srcPlayerIDt    queryTypetqueryIDR5((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt!SendMergerChildToCenterStringDataç    s
  cCsOt||gƒ}tƒj|||d|t|ƒƒtd||fƒdS(NtSendMsgToCrossServers·¢ËÍ¿ç·þÐÅÏ¢: %s, %s(RR´R2R)R(tmsgTypeR8R9R:R;R5((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR=î    s%cCsUt|||gƒ}tƒj|||d|t|ƒƒtd|||fƒdS(NtSendMsgToClientServers*·¢ËÍ×Ó·þÐÅÏ¢: %s, %s, serverGroupIDList=%s(RR´R2R)R(R>R8tserverGroupIDListR9R:R;R5((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR?õ    s%cCsp||kr||St|jƒƒ}|dkrZx%|D]}||kr9||Sq9Wn|rl||dS|S(Niiÿÿÿÿ(tsortedR¼(t    orderDicttordert isDefaultLastt defaultValuet    orderListtdOrder((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetOrderValueByDict
s    cCs8||j|ƒtj|kr$tS|j||ƒtS(N(RRR‚R¥RƒR(R¸ttickTypeR…((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytCheckPlayerTick
s cCstƒsµt|tƒrB|}ddl}|jƒj|ƒ}n|}|s`td|ƒdS|jƒ}|jƒ}|s‚dSddl    }|j
t j i|d6|g|ƒdSt |dƒrÓ|jƒ}n|jƒ}t||ƒ|jt jƒjtƒƒ}|j|ƒdS(sUתÂëºóÔÙ·¢DebugAnswer
    @param curPlayer: ¿ç·þ·þÎñÆ÷ʱ֧³ÖÖ±½Ó´«Èë crossPlayer
    iÿÿÿÿNs DebugAnswerÕÒ²»µ½crossPlayer! %sttextt    GetPlayer(RR4R2t CrossPlayertGetCrossPlayerMgrtFindCrossPlayerR&RXR"tCrossMsgtSendToClientServerRCtC2S_GMDebugAnswerR€RLRRÔRÕRÖRÓRí(R¸RKRÎRMt crossPlayert mainServerIDRP((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRí
s.        #   cCs6|d}tƒj|ƒ}|r2t||ƒndS(NRK(R´RåRí(R8RÎRKR¸((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRR7
s
 
cCs<t||ƒtƒjƒr+t|ƒ‚n td|ƒdS(NtMapServerRaiseException(R&R²RóRt SendGameError(terrorMsgRÎ((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytRaiseException>
s
  cCsVtd||f|ƒt||ƒ|s9tƒjƒrRtd||fƒ‚ndS(NsSendGameErrorEx: %s -> %ss%s -> %s(R&RVR²RóR(terrTypetmsgInfoRÎR ((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRG
s
 cCstjddƒ}tƒ}tjƒ}|d|||tƒjƒf}|rj|dtj|ƒ}ntƒj    ddddd|ƒdS(sx ÏòÔËά·¢ËÍÓʼþ£¬ÓÃÓÚÐèÒª½ô¼±´¦ÀíµÄÐÅÏ¢
    @param errType: ´íÎóÀàÐÍ£¬×Ô¶¨Òå¼´¿É
    @param msgInfo: ´íÎóÐÅÏ¢£¬¿ÉÑ¡
    t EventReportt OpenStateUrls*?Type=%s&groupID=%s&userDBName=%s&mapID=%ss &MsgInfo=%sRiN(
RR$R t    GetDBNameR·tGetMapIDturllibt
quote_plusR²tEventReport_EventReport(RYRZtgetUrlt    groupNamet
userDBName((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRVN
s     #(àRËR®RðRRÃR;R3RR$RR#RýRCtdecimalRR`RRûRR_RBRUtsetrecursionlimittServerRootPathRùRRR!RRR8R9RBRKR`RfRgRORPRpRtRyR~R‡R‰RR”R–RšRRœRRŸR¤RªR­R«RµR¹R»R½RÁRÝRçRôRøRúRùRR    RRRRRRR5RPRpR¥R]R¾RuRwR_R}RR„R…R†R€RŒR‘R—R™R›R£R R®R¯R±RìRëtIPY_ItemFactoryRéR²RšR³R´RµR¶R·R¾R¹RÊRËRÌRÍRœRÛRäRèRêRïRR&RRöRRRRRRRRR R!R"R R&R*R.R-R+R1R3RR;R@R9RERHRIRSRTRWRcRlRzRoR~R€R†RRšR’R©R¬RªR±R´R¶R²R¹R»RÀR½RÈRÍRÒRÓR×RØRÙRÝRqR"RâRãRæRçRìRîRòRóRüRÿRRRR RBRRRRhRRR#RZR-R0R6R<R=R?RHRJRíRRRXRRV(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt<module>'s´                                     "                  H                                                                                                   7                                                                     O    K #                                                                     
                                                                                                                                                                                                                                                   
        '              
                     
                                      
                                                                 
 
         !