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
¬üÇgc @sªddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl m Z ddlZddlZddlZddlZddlZddlZejdƒdZdad„Zd„Zd„Zd    „Zd
„Zd „Zd „Zd d„Zd„Zd„Z d„Z!d„Z"d„Z#d„Z$d„Z%dd„Z&dd„Z'd„Z(d„Z)d„Z*d„Z+d„Z,e-d„Z.e j/d„Z0d„Z1d „Z2d!„Z3d"„Z4d#„Z5d$„Z6d%„Z7d&„Z8d'„Z9d(„Z:d)„Z;d*„Z<d+„Z=d,„Z>d-„Z?e@d.„ZAd/„ZBd0„ZCejDd1„ZEd2„ZFd3„ZGd4„ZHd5„ZId6„ZJd7„ZKd8„ZLd9„ZMd:„ZNd;„ZOd<„ZPd=„ZQejƒZRejSƒZTejUƒZVd>„ZWd?„ZXd@„ZYdA„ZZdB„Z[dC„Z\dD„Z]dE„Z^dF„Z_dG„Z`dH„ZadI„ZbdJ„ZcdK„ZddL„ZedM„ZfdN„ZgdO„ZhdP„ZSdQ„ZidddR„ZjdddS„ZkdddT„ZldU„ZmdV„ZndW„ZodX„ZpdY„ZqdZ„Zrd[„Zsd\Ztd]„Zud^„Zvd_„Zwd`„Zxda„Zydb„Zzdc„Z{ddZ|de„Z}df„Z~dddddddddddg„
Zdh„Z€de@di„Zdj„Z‚dk„Zƒdl„Z„dm„Z…dn„Z†dddo„Zˆdp„Z‰dq„ZŠddr„Z‹dds„ZŒddt„Ze-du„ZŽdv„Ze-dw„Zdx„Z‘dy„Z’dz„Z“d{„Z”d|„Z•d}„Z–d~„Z—d„Z˜d€„Z™d„Zšd‚„Z›dƒ„ZœejDd„„ZejDd…„ZžejDd†„ZŸejDd‡„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­d•„Z®dd–„Z¯e-d—„Z°e-gd˜„Z±e-gd™„Z²e-gdš„Z³e-d›„Z´ddddœ„Zµdddd„Z¶ddddž„Z·e-dŸ„Z¸d „Z¹d¡„Zºddd¢„Z»dd£d¤„Z¼ddd¥„Z½d¦„Z¾dd§„Z¿ddd¨„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((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt    ImportAllJs  cCsttƒ}|jƒ}||jtjƒtjtjkr?dS|jtj|ƒtƒrit|ƒdSt    ƒdS(N(
t GetGameWorldtGetTickt GetTickByTypeRtTYPE_Map_Tick_ReloadScripttTYPE_Map_Tick_Timet SetTickByTypet__GetPsycoIsOpent PsycoReloadt__ReloadScript(R R t    gameWorldttick((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt ReloadScript`s         
cCszxbtjjƒD]Q\}}y.|dkr?td|ƒwnt|ƒWqtk
r`qqXqWtdtƒƒdS(Nt
PyGameDatas%s Ä£¿é²»ÖضÁ!sReload Begin : time = %s(s
PyGameData(RRtitemstDebugLogtreloadt    ExceptiontLogtGetCurrentDataTimeStr(tnamet
reloadPath((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRys   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((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRŒs   cCs'|}|dkr#|d|}n|S(NRs.((R RtsysModulesPath((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR®s cCsttj|t|ƒƒƒS(N(tinttmathtceiltfloat(txtdiv((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetIntUpper»scCsttj|ƒƒS(N(R6R7R8(R:((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetFloatUpperÃsicCs;td|ƒ}tj|d||dƒ}|t|ƒS(Ni
i(tpowtrandomtrandintR9(tminXtmaxXtprecistmultipletran((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetFloatRanØscCsh||kr||krdStj||||ƒ}ttj|ƒƒ}|dkrd|d}n|S(Niih(R7tatan2R6tdegrees(tStartXtStartYtEndXtEndYtradtth((sbE:\SnxxServerCode\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( tlistR7tsqrtR>trangeR-tFiveInOtherOutt    GetAllPostcountR0tinsert( tmatrixtplayerXtplayerYtdestXtdestYtresulttdisttcostsintitxlisttylisttcurPos((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt MatrixCircle.s"    3 ((c
Csœtjtj||dƒtj||dƒƒ}d}d}|dkrj|||}|||}nt|||ƒ}t|||ƒ}    ||    fS(Nigð?gi(R7RQR>R6(
tposDistRZR[tposXtposYR]R^R_tresultXtresultY((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytPosInLineByDistHs3 c
Csœtjtj||dƒtj||dƒƒ}d}d}|dkrj|||}|||}nt|||ƒ}t|||ƒ}    ||    fS(Nigð?gi(R7RQR>R6(
ReRZR[RfRgR]R^R_RhRi((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytPosInLineByDistExWs3 cCs;t|ƒ}tt|ƒƒ}||kr1|gS||gS(N(R6tMyRound(tnumtnum1tnum2((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRSks
  cCs?g}x2|D]*}x!|D]}|j||fƒqWq W|S(N(R0(RaRbtposlistR:ty((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRTvs
  cCs ||dS(Nid((tvaluetpercent((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt
GetPercent…scCs-yt|ƒ}|SWntk
r(|SXdS(N(R6t
ValueError(tinputtdefValueR\((sbE:\SnxxServerCode\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(ttypeR6R9tisdigitt
startswithRu(tinputStrRwR\((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytToNumDef•s+  cCsttt||ƒ|ƒƒS(N(R6tmintmax(RvtminNumtmaxNum((sbE:\SnxxServerCode\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((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytParseNameGetObj±s cCs9t||ƒ}|dkrdSt|ƒtkr5dS|S(N(R‹RƒtcallableR…(R‡Rˆ((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetExecFuncÅs  cCstS(N(R…(tcurItem((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytCheckItemIsMaxEndureÕscCs!tt||ƒt||ƒƒS(N(Rtabs(RfRgttagXttagY((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetDiståscCsAtjt||dƒt||dƒƒ}|s7|St|ƒS(Ni(R7RQR>R=(RfRgR‘R’ttoIntR]((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt    GetDistExðs-cCs4||krdStjd|dƒ|kr0dSdS(Nii(R?R@(tratetmaxRate((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt    CanHappenüs
 cCsH|jƒtjd|dƒ}x!|D]}||kr?q'n|SWdS(Nii(tsortR?R@Rƒ(trateListR—t    ranNumbertnumber((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytWhichCanHappen    s
  cCsJ| s| rtS|jƒ|jƒkrF|jƒ|jƒkrFtStS(N(tFalsetGetIDtGetGameObjTypeR…(tsrcObjtdesObj((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt    IsSameObjs
0cCst|jƒ|jƒƒS(N(tIsSameCountry_Namet
GetCountry(R¡R¢((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt IsSameCountry*scCs6||krtS|tjks.|tjkr2tStS(N(R…t IPY_GameWorldttcNewRž(tsrcNametdesName((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR¤3s
 cCs>|jƒ}|jƒ}|dks0|dkr4tS||kS(Ni(t GetFamilyIDRž(R¡R¢t    srcFamilyt    desFamily((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt IsSameFamilyCs
  cCs#|jƒdtjgkrdStS(Ni(t
GetGMLevelRt Def_GM_LV_GodR…(t    curPlayer((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytIsGMPscCs|jƒdkrtStS(Ni(tGetRealPlayerIDR…Rž(R±((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytIsMirrorPlayerWscCs=| s%|jƒdks%|jƒr)tSt|ƒr9tStS(s€ÊÇ·ñÕý³£¿ÉÓõij£¹æÍæ¼Ò£¬Ò»°ãÓÃÓÚÅжÏÊÇ·ñÊÇÒ»¸öÕý³£µÄÍæ¼Ò
    ¿ÉÓÃÓÚ·â°ü֪ͨÅжϡ¢»î¶¯Íæ¼ÒÅжϵÈÒ»Çнö´¦ÀíÕæÊµ³£¹æÍæ¼ÒµÄÑéÖ¤
    i(RŸtIsEmptyRžR´R…(R±((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytIsNormalPlayer]s
% cCs,tƒ}t|ƒ}|jdƒd}|S(Ns.i(tGetCurrentTimetstrR,(tcurTimet
curTimeStr((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR#ps     cCs8|tjkriStj|}||kr0iS||S(N(Rtg_operationActionDict(tactNametactNumt
actNumDict((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt
GetActInfoxs   cCsc|dks|dks| r#dS|jƒ}|s9dS|t|ƒkrU|dn||}|S(Niiÿÿÿÿ(RƒtGetTemplateIDListR-(tipyDatatcfgIDtdayIndexttemplateIDListt
templateID((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetTemplateID€s &cCsD|dkrdS|sdS|t|ƒkr6|dn||}|S(Niiÿÿÿÿ(RƒR-(RÄRÃRÅ((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetTemplateIDByList‰s  &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,R6tChangeStrToDatetimeRtTYPE_Time_Format_DayR-RÉR~tdatetimet    timedelta(t startDateStrt
endDateStrt curDateTimetstartSplitListtloopDayststartLoopDateStrtstartLoopDateTimet endSplitListtendLoopDateStrtendLoopDateTimetpassDayst    loopTimest loopTimeMaxt startDateTimet endDateTime((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetOperationActionLoopDate‘s 
&  cCsÎtjjƒ}|jƒ}|jƒ}|sLd|j|j|jf}n|sqd|j|j|jf}n|jdƒdkr¬d|kr¬|jdƒ r¬||fS|j    ƒrt
ƒj t j ƒd}|tjdt|ƒ|ƒ}|tjdt|ƒ|ƒ}nx|jdƒr‡t
ƒj t j ƒd}|tjdt|dƒ|ƒ}|tjdt|dƒ|ƒ}n|jd    ƒrút
ƒj t jƒd}|tjdt|d
ƒ|ƒ}|tjdt|d
ƒ|ƒ}n’|jdƒrS|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ƒ}||kr8|}n||krP|}qPqŒn9|jdƒr€t|||ƒ\}}}n |}|}d|j|j|jf}d|j|j|jf}||fS( Ns%d-%d-%ds-itWtLiRÉtKtMixis|i(RÌttodayt GetStartDatet
GetEndDatetyeartmonthtdayRUR{RzRtGetGameWorldDictByKeyt ShareDefinetDef_Notify_WorldKey_ServerDayRÍR6Rxt Def_Notify_WorldKey_MixServerDaytweekdayR,R-RÊRRËRÝ(RÁRÐRÎRÏtdiffDayRÛRÜt
curWeekdaytstartWeekDateInfot startWeekInfot startWeekdayRÓRÔt startWeekDaytendWeekDateInfot endWeekInfot
endWeekdayRÖR×RÈ((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetOperationActionDateStr©sf  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( tgetRét ActKey_CfgIDt IpyGameDataPYtGetIpyGameDataNotLogR„R÷tGetFuncActDayst GetFuncLoopt GetPlayerIDRžt ActKey_StatetGetDictValueByBitRt"Def_Player_Dict_GameFuncFirstTouchR…RRøt ActKey_ActNumR·tGetActRelateFuncDateRùRåRæRçRÌtstrptimetTYPE_Time_FormatR6ttimetmktimet    timetuple(R±R¼tactInfot playerActIDRÂRÁt relateFuncIDt funcActDaystfuncLooptplayerIDtisInActtactIDtisOpent    isDayRestR½t
serverTimetnewActt startDayDatet
endDayDatet    resetTypeRÎ((sbE:\SnxxServerCode\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( NRøiRùii
s %s 04:59:59RÉis %s 23:59:59s%d-%d-%d(RþR„RøRùtChangeTimeNumToDatetimeRRR¸RÌRRÍRäRåRæRç( RÁt    startTimet returnYmdStrRRRRt startDayStrRRÏRÎ((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRAs0 !!     / 33   
cCs tjjƒS(N(RÌRâ(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR·dscCstjjtjjƒƒdS(Ni(RÌt isocalendarRâ(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetWeekOfYearrscCs_|jƒjdƒd}ytjj||ƒSWn(tk
rZ}td||fƒdSXdS(Ns.is%s : %s(tstripR,RÌRt BaseExceptionR*(ttimeStrt    timeFomatte((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetDateTimeByStr{scCs@t|ƒ}|dkr*td|ƒdS|jd|jdS(Ns GetPastHour Err dateTimeStr = %siii(t__GetPastTimeDeltaRƒR*RÉtseconds(t dateTimeStrt pastTimeDelta((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetPastHourŠs
  cCsDt|ƒ}|dkr*td|ƒdS|jdd|jdS(Ns"GetPastMinute Err dateTimeStr = %siii<(R'RƒR*RÉR((R)R*((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetPastMinute—s
  cCsDt|ƒ}|dkr*td|ƒdS|jddd|jS(Ns"GetPastMinute Err dateTimeStr = %siii<(R'RƒR*RÉR((R)R*((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetPastSeconds¥s
  cCs9tƒ}t|ƒ}|dks-|dkr1dS||S(N(R·R&Rƒ(tcompareTimeStrt curDataTimetcompareDataTime((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR'³s
     cCs$||}|jdd|jdS(Nii<(RÉR((R¹ttagTimet    diff_Time((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetDiff_MinuteÃs
cCsqt|ƒ}tj|j|j|jdddƒ}t|ƒ}tj|j|j|jdddƒ}||jS(Ni(RRÌRåRæRçRÉ(ttimeAttimeBt    dateTimeAt    dateTimeB((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetDiff_DayÈs
 ' 'cCstƒtjd|ƒS(NRÉ(R·RÌRÍ(tdiffDays((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetDatetimeByDiffDaysÕscCstƒj|ƒ}t|ƒS(N(t GetNPCManagert FindNPCByIDt__GetSummonTagNPC(tnpcIDtcurTag((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR<ÜscCs;tƒ}|j|ƒ}|s-t|ƒ}n|r7|SdS(N(R;tFindGameNPCByNPCIDtFindSummerNPCByNPCID(R>tnpcMgrtfindNPC((sbE:\SnxxServerCode\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>RBtindextcurNPC((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRAés    cCsstƒ}xct|j|ƒƒD]L}|j||ƒ}|jƒ}|dkrUqn||jƒkr|SqWdS(Ni(R;REtGetNPCCountByGWIndextGetNPCByIndexByGWIndexRŸRH(t    copyMapIDR>tgameNPCManagerRIRJtcurID((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytFindNPCByNPCIDExós      cCstƒj|ƒ}t|ƒS(N(R;t GetNPCByIndexR=(tnpcIndexR?((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRQscCstS(N(t __GameWorld(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRscCs
tjƒS(N(RSR;(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR;scCs
tjƒS(N(RStGetTeamManager(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRT"scCs
tjƒS(N(RStGetPlayerManager(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRU*scCs
tjƒS(N(RStGetMapItemManager(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRV2scCs
tjƒS(N(RStGetMapCopyPlayerManager(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRW:scCs
tjƒS(N(RStGetMap(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRXBscCs9tƒ}||kr|S||}|jd|ƒ}|S(Nt    DataMapID(tGetMapIDTxtInfoRú(tmapIDt mapIDTxtInfotmapInfot    dataMapID((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetMapDataMapIDEs      
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    iiRYsLoad %ssg_mapIDTxtInfo=%s(
Rtg_mapIDTxtInfoRtGetServerRootPathtopent    readlinesR,R-R6R"(trootPathtmapIDTxttftlinetlineListttMapIDt
dDataMapID((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRZNs          
 cCs
tjƒS(N(RStGetMail(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRkescCs
tjƒS(N(RSt    GetScript(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRlmscCs
tjƒS(N(RSt    GetGameFB(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRmuscCs
tjƒS(N(RStGetAllFbNPCManager(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRn}scCs|dkrdS|jƒ}|tjkrAtƒj|jƒƒS|tjkrftƒj|jƒƒS|tj    kr‹tƒj
|jƒƒS|S(N( RƒtGetGameNPCObjTypeR§t
gnotSummonR;tFindSummonNPCByIDRŸt    gnotTruckt FindTruckByIDtgnotPett FindPetByID(t    curTagNPCtnpcObj((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR=…s  cCsA|jƒtjkr=|jƒtjtjtjgkr=tSdS(N(R R§tgotNPCtGetTypetntWalltntDeert ntDefenceMaxR…(tcurObj((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetNPC_Is_Gate™s9cCs‡|jƒ}|jƒ}|tjkr7tƒj|ƒS|tjkrPt|ƒS|tjkrot    ƒj
|ƒSt d||fƒdS(Ns*»ñµÃobjÀàʧ°Ü objType = %s , objIndex = %s( R tGetIndexR§t    gotPlayerRUtGetPlayerByIndexRxRQtgotItemRVtGetPoolItemByIndexR*Rƒ(tobjtobjTypetobjIndex((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetObjDetail¤s  
cCs[|tjkrtƒj|ƒS|tjkr8t|ƒS|tjkrWtƒj|ƒSdS(N(
R§R€RWtFindPlayerByIDRxR<R‚RVt GetItemByIDRƒ(tobjIDR…((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetObj¹s
cCstS(N(t ItemFactory(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetItemFactoryÊscCstS(N(tGameData(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetGameDataÒscCs*|jƒtjkrdSt||ƒdS(N(R¯RR°t DebugAnswer(R±tmsg((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGodLogÛs cCstjd|||fƒdS(Ns%s    %s    %s(tLogUItMsg(R‘Rtpar((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR"éscCstjd|||fƒdS(Ns%s    %s    ###Error:%s(R“R”(R‘RR•((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR*ôscCs1tƒjƒsdStjd|||fƒdS(Ns%s    %s    PyDebug:%s(Rt GetDebugLevelR“R”(R‘RR•((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRýscCsÎ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 MergeServerIDRRaR'R(tisfileR*R!t ConfigParsertreadt
has_optionRxRúR"(RdtmergeServerIniFiletmergeServerInitsectiontoption((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetMergeServerIDs 
   cCs tƒjƒS(N(RtGetServerVersion(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR£#scCsttjddƒdƒS(NtplatformtGroupIDi(Rxt ReadChConfigtGetPyMongoConfig(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetServerGroupID&sc
Cstjdƒ}|dkrôtjƒdtƒ}tjj|ƒsXt    dd|ƒqôt
|dƒ}|j ƒ}|j ƒt |ƒ}i}xA|jƒD]3\}}t|ƒ}x|D]}    |||    <q»WqœWtjd|ƒtd|ƒn|sþ|S|j||ƒS(NtServerIDMainServerDicts\MixServerMap_%s.jsontGetMainServerIDErrorsfile can not found. %strbs¼ÓÔØ ServerIDMainServerDict=%s(Rüt GetConfigExRƒRt    GetDBPatht GetPlatformR'R(RštSendGameErrorExRbRœtclosetevalRR6t SetConfigExR"Rú(
tserverIDR©tfilePathtfileObjtcontenttMixServerMapDicttmainServerIDStrt serverIDListt mainServerIDtsID((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetMainServerID*s&  
   cCstjdƒ}|j|dƒS(Nt DBPlatformNumi(R¦tGetDBEvalChConfigRú(R¤tplatformNumDict((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetPlatformServerNumCscCstjddƒS(NR¤t PlatformName(R¦R§(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR®PscCs=|jƒ}tƒt|jdƒdtjƒ}|jdS(Ns ii(tGetCreateRoleTimeR·R&R,RRËRÉ(R±tcreateRoleTimetdiffTime((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetCreateRoleDaysas &s@cCsC|jƒ}|jtƒ}t|ƒdkr1dSt|ddƒS(Niiiÿÿÿÿi(tGetAccIDR,tDef_AccID_Split_SignR-Rx(R±taccIDtinfoList((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetPlayerServerIDms cCs9|jƒ}|jtƒ}t|ƒdkr1dS|dS(NiRiÿÿÿÿ(RÆR,RÇR-(R±RÈRÉ((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetPlayerServerSIDrs cCs3ttjdd|ƒdƒ}|dkr/|SdS(NR¤s%sMainServerIDi(RxR¦R§Rƒ(t accIDPlatformRº((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetPlayerMainServerIDxs cCs|jƒjƒS(N(tGetAccountDatat GetOperator(R±((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetPlayerPlatform’scCs,|jtƒ}|d }tj|ƒ}|S(Niþÿÿÿ(R,RÇtjoin(t    gameAccIDRÉt
paInfoListt platformAccID((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetPlatformAccID–s
cCs-tj|jƒ|jƒjƒdƒjƒS(Ntmobile(tmd5RÆRÎtGetLastLoginTimet    hexdigest(R±((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetSessionIDœscCs|jtjƒS(N(tNomalDictGetPropertyRtDef_Player_Dict_Account_Type(R±((sbE:\SnxxServerCode\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(
R¦tGetEvalChConfigtNomalDictDelPropertyRÞtvaluesR*RRtNomalDictAddPropertyR(R±t channelCodetChannelCodeDicttcodeListtcodeNumtcode((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytSetPlayerChannelCode§s    cCs>|jtƒ}|dkrdStjdƒ}|j|dƒS(NiRRß(RÛRÞR¦RàRú(R±RçRå((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetPlayerChannelCodeÀs
 c
 
Cs/tƒj||||||||||    ƒ
dS(N(RtDataServer_HugeTradeRec(
t    tradeGoldt tradeSilvert tradeItemIDttradeItemCounttsenderIDt
senderGoldt senderSilvert
receiverIDt receiverGoldtreceiverSilver((sbE:\SnxxServerCode\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((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytLogin_Interface_GoldRecðs
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( RXtCanMoveR*RŸtResetPostClearPlayerPosCountt    GetPetMgrt GetFightPett    NPCCommont
NPCControltGetMoveNearPostGetPosXtGetPosY(R±RfRgtreasont
isResetPettrolePetR((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytResetPlayerPoss
 0cCs|jdƒ|jdƒdS(Ni(t SetMoveCounttSetMoveDistDiff(R±((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRs  cCsB|s
tSt|dƒ|ko5t|dƒknr>tSdS(Nii(R…R&(R¹tactSect((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt IsAtActTime"s
0cCsdS(Ni((tcurLV((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt
GetReMoney1scCs8||j|ƒtj|kr$tS|j||ƒtS(N(RRtTYPE_Player_Tick_TimeRžRR…(R±tfuncKeyR((sbE:\SnxxServerCode\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-RƒRúRR0(titemListtitemDicttitemInfotitemIDt    itemCountt isAuctionItemtkeyt    mItemList((sbE:\SnxxServerCode\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-R0tcopytdeepcopyRRR?R@t    enumeratet ResetRiseList( triseListt    randomNumRwR—tdataInfotlistLentdatat tempRiseListR`R–tj((sbE:\SnxxServerCode\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((sbE:\SnxxServerCode\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"R6R0(
t
srcPieListtplusRatet plusPieListR`trateInfoR–tinfotsrcRatetnewRatetspecRate((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetPlusPieList™s ($cCs4|s
|Stjd|ddƒ}t|||ƒS(Niiÿÿÿÿ(R?R@tGetResultByRiseList(trandListRwR–((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetResultByRandomList§scCs0x)|D]!}||dkr#qn|dSW|S(Nii((R$tpointRwt    smallList((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR;²s
     cCs’g}d}xO|D]G}||d7}|j|t|ƒdkrL|dn|dgƒqW|sh|Stjd|ddƒ}t|||ƒS(Niiiiÿÿÿÿ(R0R-R?R@R;(t
weightListRwR<tweightR6R–((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetResultByWeightList½s 7cCsmxDtt|ƒƒD]0}|dkr+qn||c||d7<qWtjd|dƒ}t|||ƒS(Niiiÿÿÿÿ(RRR-R?R@tGetResultByRiseIndex(R<tisCriticalDownwardR`R>((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetIndexByIndependRateÎs  cCs"tjdtjƒ}t||ƒS(Ni(R?R@RtDef_NPCMapDropRateRC(R<R–((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetResultByRandomIndexÞscCs~xwtdt|ƒƒD]`}||}t|tƒr>|}n
|d}|rc||kruqqun||kruqn|SWdS(Niiÿÿÿÿ(RRR-t
isinstanceR6(R$R>RDRItelementtcmpPoint((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRCès
    
      cCs|S(N((tfunc((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetPsycoFuncscCs tjdƒS(Nt PsycoSwitch(R¦Rà(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRscCshtdtƒƒg}x7tjjƒD]&}|j||jdƒdgƒq'Wttj    d|ƒdS(NsPsycoReload Begin : time = %ss.iÿÿÿÿR(
R"R#RRtkeysR0R,t
TravelFileRt
ScriptPath(RtmoduleNameListt
moduleName((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRs $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+R{R,RRRúR R(R)RO(R R´RQRt curModuleNamet
reloadNameRRtmodule((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRO$s #cCsMt|dƒd}t|dƒdd}t|dƒd}|||fS(Nièii<(R6(t    inputTimet curTimeHourt curTimeMinutet curTimeSecond((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytChangeInputTimeBscCs/|jƒ}tjdƒ}||kr+tStS(NtDef_Mission_DR_MinLV(tGetLVR¦RàRžR…(R±tplayerLVtminDRLV((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt
IsMissonDRLs
  cCsatjdƒ}t|ƒdkr/tdƒtS|dr=tSyt||dƒWntSXtS(Nt EncodingTexisEncodingTex.txt Error len != 2ii(R¦RàR-R*RžR…tunicode(t    inputTextt encodingList((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytEncodingToUnicode[s
 
cCs7tjdƒ}t|ƒdkr/tdƒdS|dS(NR`isEncodingTex.txt Error len != 2tutf8i(R¦RàR-R*(Rc((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetCharacterEncodingos
 
cCs^tjdƒ}t|ƒdkr/tdƒ|Sy |jtjƒjtƒƒSWn|SX|S(NR`isEncodingTex.txt Error len != 2(    R¦RàR-R*tdecodeRétDef_Game_Character_EncodingtencodeRf(RbRc((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt    GbkToCodeys
 cCsttjddƒdƒS(NtMerget IsMergeServeri(RxR¦R§(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt IsCrossServer‡scCs tƒrtjddƒStjS(NRkt CrossZoneName(RmR¦R§Rtg_crossZoneName(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetCrossZoneName‹s    cCsYtƒrtƒStj\}}}|s/tƒSttjƒƒ}|||}t|ƒS(N(RmR#Rtg_crossServerTimeInfoR6RtChangeTimeNumToStr(tlastCrossServerTimetlastServerTimeRÈR¹tcrossServerTime((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetCrossServerTimeStr‘s    cCs.tjj||ƒjƒ}ttj|ƒƒS(N(RÌRR
R6RR    (R#t
timeFormat((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytChangeTimeStrToNumŸscCstj|tj|ƒƒS(N(Rtstrftimet    localtime(ttimeNumRw((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRr¦scCs.tj|tj|ƒƒ}tjj||ƒS(N(RRyRzRÌR(R{RwR#((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR¬scCstjj||ƒS(N(RÌR(R#Rw((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRʰscCsttj|jƒƒƒS(N(R6RR    R
(tdateT((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytChangeDatetimeToNum¶scCstttƒƒd tjƒS(Ni
(RxR¸R·RRË(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetTodayTime¸sc
Csgt|ƒ}tƒ}tj}|j|j|j|jf\}}}}|j|j|j|jf\}}    }
} ||krº||    krº||
krº||ko­| knr¶tSt    St
j
|||dddƒ} t
j
||    |
dddƒ} | | j }|dkr3||krtS| |kr/tSt    S|dkrc| |krOtS||kr_tSt    StS(s°ÅжÏÖ¸¶¨timeÖµÓëµ±Ììʱ¼ä¶Ô±ÈÊÇ·ñΪÓÎÏ·ÄÚµÄͬһÌì£»ÌØÊâʱ¼äµã¹ýÌìºó²ÅË㲻ͬÌì
    ¸Ãº¯ÊýÒ»°ãÓÃÓÚÅжÏij¸ö¹¦ÄܼǼµÄ°æ±¾ÌìÊÇ·ñÓëµ±Ììʱ¼äÊÇͬһÌìµÄÂß¼­
    @return: ÊÇ·ñͬһÌì
    iiiÿÿÿÿ( RR·RétDef_OnEventHourRåRæRçthourRžR…RÌRÉ(t    checkTimet    checkDatetcurDateRtchkYeartchkMonthtchkDaytchkHourtcurYeartcurMonthtcurDaytcurHourt checkDateExt    curDateExR9((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytCheckTimeIsSameServerDayEx¼s2         **$       cCs5t|ƒ}tjj|ƒd}tƒ}||kS(siÅжÏÖ¸¶¨timeÖµÓëµ±Ììʱ¼ä¶Ô±ÈÊÇ·ñΪÓÎÏ·ÄÚµÄͬһÖÜ£»ÌØÊâʱ¼äµã¹ýÌìºó²ÅË㲻ͬÌì
    @return: ÊÇ·ñͬһÖÜ
    i(RRÌRR (RR‚t    checkWeektcurWeek((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytCheckTimeIsSameWeekós     cCsO|jƒjƒ}|jƒjƒ}tjdƒ}t|jddƒƒ}|S(Nt AreaNameInfotNameExprR(RÎRÏt    GetAreaIDR¦RàR±Rú(R±toperatortareaIDt areaNameInfotareaName((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetAreaNameÿs
cCst|ƒ}tj|ƒS(N(R™tCommFunct    GetStrCrc(R±R˜((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt
GetAreaCrc s cCs;x4|jƒD]&\}}|j|dƒ|||<q WdS(Ni(RRú(tdict1tdict2RRr((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt AddDictValuescCsPxI|jƒD];\}}|j|dƒ}||||tj||<q WdS(Ni(RRúRétDef_MaxRateValue(RRžRRrtvalue1((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytCalcAttrDictPer!s!cCs|td|ƒdS(Ni
(R>(tnumValuet    dataIndex((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetDataByDigitPlace.scCsY|dks'|dks'|tjkr+|St||ƒ}|td|ƒ||7}|S(Nii    i
(RétDef_PDictDigitCntR¥R>(R£R¤t    dataValuet    lastTagLV((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytChangeDataByDigitPlace7s
'cCs|d|>@rdSdS(s¸ µÃµ½Ä³¸ö×Ö½ÚÖµÖÐijһλ(Bit)µÄÖµ
    @param dataValue: ´ýȡֵµÄ×Ö½ÚÖµ
    @param index: ´ý¶ÁȡλµÄÐòºÅ£¬´ÓÓÒÏò×ó0¿ªÊ¼£¬0-7Ϊһ¸öÍêÕû×Ö½ÚµÄ8¸öλ
    @return: ·µ»Ø¶ÁÈ¡¸ÃλµÄÖµ£¬0»ò1
    ii((R§RI((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetBitValueBscCs|r|d|>BS|d|>@S(sß ¸ü¸Äij¸ö×Ö½ÚÖµÖÐijһλ(Bit)µÄÖµ
    @param dataValue: ×¼±¸¸ü¸ÄµÄ×Ö½ÚÔ­Öµ
    @param index: ´ý¸ü¸ÄλµÄÐòºÅ£¬´ÓÓÒÏò×ó0¿ªÊ¼£¬0-7Ϊһ¸öÍêÕû×Ö½ÚµÄ8¸öλ
    @param val: Ä¿±êλԤ¸ü¸ÄµÄÖµ£¬0»ò1
    @return: ·µ»Ø¸ü¸Äºó×Ö½ÚµÄÖµ
    i((R§RItval((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt SetBitValueJs cCsJt|ƒtt|ƒƒdkr,t|ƒSt|ƒt|t|ƒƒS(Ngà?(RR6(Rm((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRlXscCsT||kr||Sx9|jƒD]+\}}t|tƒr!||kr!|Sq!WdS(N(RRHttuple(tattrDicttfindKeyRRr((sbE:\SnxxServerCode\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(RRHR­R-(tsrcDictR¯RwtrangeKeyRr((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetDictValueByRangeKeyms  EcCs |r dnd}||}|S(Nii    ((tbittisBint perKeyMaxBittkeyNum((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetDictKeyNumByBitws
c Cs|r dnd}||}|s,||n|t||gƒ}|j|ƒ}||}    |rŠ|td|    ƒ@}
|
rdnd}
nt||    ƒ}
|
S(Nii    iii(R­RÛR>R¥( R±t    keyFormatR´RµtkeyParamR¶R·tkeyNamet    dictValuetbitIndextbitValue((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRƒ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­RÛR>R©Rát PlayerControltNomalDictSetProperty( R±R¹R´RrRµRºR¶R·R»R¼R½t updDictValueR¿((sbE:\SnxxServerCode\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    (R6R7R8R9RRR­Rá(    R±R¹tmaxLenRµRºR¶tkeyCntR`R»((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytResetDictAllBitValue³s 'cCsG||||g}t|ƒ}tƒjdddd|t|ƒƒdS(NitSendBroadcastMergeClient(R¸RUtGameServer_QueryPlayerResultR-(toperTypeR[R&tisRepeattmsgList((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytSendBroadcastMergeÁs %cCsA||g}t|ƒ}tƒj|||d|t|ƒƒdS(NtSendMergerChildMsg(R¸RURÇR-(RÈtdataMsgt srcPlayerIDt    queryTypetqueryIDRÊ((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt!SendMergerChildToCenterStringDataËs
  cCsOt||gƒ}tƒj|||d|t|ƒƒtd||fƒdS(NtSendMsgToCrossServers·¢ËÍ¿ç·þÐÅÏ¢: %s, %s(R¸RURÇR-R(tmsgTypeRÍRÎRÏRÐRÊ((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRÒÒs%cCsUt|||gƒ}tƒj|||d|t|ƒƒtd|||fƒdS(NtSendMsgToClientServers*·¢ËÍ×Ó·þÐÅÏ¢: %s, %s, serverGroupIDList=%s(R¸RURÇR-R(RÓRÍtserverGroupIDListRÎRÏRÐRÊ((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRÔÙs%cCsp||kr||St|jƒƒ}|dkrZx%|D]}||kr9||Sq9Wn|rl||dSdS(Niiÿÿÿÿ(tsortedRNRƒ(t    orderDicttordert isDefaultLastt    orderListtdOrder((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytGetOrderValueByDictås    cCs8||j|ƒtj|kr$tS|j||ƒtS(N(RRRRžRR…(R±ttickTypeR((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytCheckPlayerTickós cCs‹|jƒ}tjdƒ}|d}|d}|d}d}x:t|ƒD],\}}||krn|}Pn|d}qLW||d}    ||d}
|t|ƒkr°dn||} d} d} xg|jƒD]Y\}}||    ksÓ|| krýqÓnt|ƒ}| |7} ||krÓ| |7} qÓqÓW||krY| |jtj|ƒ7} n|dkrk|n||    |
| | }||fS(Nt ClientLVRuleiiiiŸ†(    R\R¦RàR"R-RRÛRtDef_PDict_SplitExpLVCnt(R±tserverLVt clientLVRuletTransRealLVListtTransNewLvListtSplitLVExpDictttransCntR`treallvtcurTransRealLVtcurNewLVtnextTransRealLVtcurTransAddSplitLVtcurTransTotalSplitLVt splitRealLVt splitLVListt splitLVExCnttshowLV((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt GetClientLVýs6 
 
 
 " 
  (cCsAt||||gƒ}tƒj|ddd|t|ƒƒdS(s
    @todo: Ìí¼ÓÍæ¼Ò¼Ç¼
    @param recType: Í¨ÓüǼÀàÐÍ, ¶ÔÓ¦ ShareDefine.Def_PlayerRecTypeList
    @param valueList: ÊýÖµÁбí[value1, value2, ...], °´Ë³Ðò, Ö§³Övalue1 ~ value8
    @param userData: ×Ô¶¨Òå×Ö·ûÐÅÏ¢
    @param notifyType: 0-²»Í¨Öª; 1-֪ͨµ¥Ìõ; 2-֪ͨȫ²¿
    it AddPlayerRecN(R¸RURÇR-(RtrecTypet    valueListtuserDatat
notifyTypetmsgStr((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRò"    s%icCsDt|||||gƒ}tƒj|ddd|t|ƒƒdS(sÓ
    @todo: Ìí¼ÓGameServer´æ´¢Í¨ÓüǼ
    @param recType: Í¨ÓüǼÀàÐÍ, ¶ÔÓ¦ ShareDefine.Def_UniversalGameRecTypeList
    @param valueList: ÊýÖµÁбí[value1, value2, ...], °´Ë³Ðò, Ö§³Övalue1 ~ value5
    @param strValueList: ×Ö·ûÖµÁбí[strValue1, strValue2, ...], °´Ë³Ðò, Ö§³ÖstrValue1 ~ strValue3
    @param notifyType: 0-²»Í¨Öª; 1-֪ͨ±¾ÈË; 2-֪ͨȫ·þ£»3-֪ͨ±¾È˵¥Ìõ£»4-֪ͨȫ·þµ¥Ìõ
    @param isSort: ´æ´¢¼Ç¼ÂúÐèɾ³ýʱÊÇ·ñÐèÒªÏȰ´Ê±¼äÅÅÐò, Ä¬ÈÏ1ÊÇ, ÏȽøÏȳö
    itAddUniversalGameRecN(R¸RURÇR-(RRóRôt strValueListRötisSortR÷((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRø.    s    %cCs;t||gƒ}tƒj|ddd|t|ƒƒdS(s³
    @todo: É¾³ýGameServer´æ´¢Í¨ÓüǼ
    @param recType: Í¨ÓüǼÀàÐÍ, ¶ÔÓ¦ ShareDefine.Def_UniversalGameRecTypeList
    @param notifyType: 0-²»Í¨Öª; 1-֪ͨ±¾ÈË; 2-֪ͨȫ·þ
    itDelUniversalGameRecN(R¸RURÇR-(RóRRöR÷((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRû;    s%cCs9t|ƒ|jtjƒjtƒƒ}|j|ƒdS(sתÂëºóÔÙ·¢DebugAnswerN(RRgRéRhRiRfR(R±ttext((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRF    s
 cCs<t||ƒtƒjƒr+t|ƒ‚n td|ƒdS(NtMapServerRaiseException(R*RR–R!t SendGameError(terrorMsgR((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pytRaiseExceptionR    s
  cCsPtd||f|ƒtƒjƒr?td||fƒ‚n t||ƒdS(NsSendGameErrorEx: %s -> %ss%s -> %s(R*RR–R!Rþ(terrTypetmsgInfoR((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyR¯[    s
 cCsœtjddƒ}tjddƒ}tjddƒ}|d|||tƒjƒf}|ry|dtj|ƒ}ntƒjd    d    d    d    d
|ƒd S( sx ÏòÔËά·¢ËÍÓʼþ£¬ÓÃÓÚÐèÒª½ô¼±´¦ÀíµÄÐÅÏ¢
    @param errType: ´íÎóÀàÐÍ£¬×Ô¶¨Òå¼´¿É
    @param msgInfo: ´íÎóÐÅÏ¢£¬¿ÉÑ¡
    t EventReportt OpenStateUrlR¤R¥tconnectt USER_DB_NAMEs*?Type=%s&groupID=%s&userDBName=%s&mapID=%ss &MsgInfo=%sRiN(R¦R§RXtGetMapIDturllibt
quote_plusRtEventReport_EventReport(RRtgetUrltgroupIDt
userDBName((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyRþc    s#(ÂR§R“R¦RüR?R7RRÌRR'RšRétdecimalRRR R›RRR×tsetrecursionlimittServerRootPathR™RRRRRR<R=RFRORdRjRkRSRTRtRxR}R‚R‹RRR“R…R•R R˜RR£R¦R¤R®R²R´R¶R#R¿RÆRÇRÝRöRRžRR·R RR&R+R,R-R'R3R8R:R<RDRARPRQRSRRŽtIPY_ItemFactoryRŒRR;RTRURVRWRXR_RZRkRlRmRnR=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 RRRRRRƒR+R#R:R=R;RBRERGRCRLRRRORZR_RdRfRjRmRpRvRxRrRRÊR}R~RŽR‘R™RœRŸR¢R¥R©RªR¬RlR°R³R¸RRÂRÅRËRÑRÒRÔRÜRÞRñRòRøRûRRR¯Rþ(((sbE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorld.pyt<module>'sx                                   "                  H                                                                                                                          M    K #                                                          
                                                                                                                                                                                                 
        '              
                     
            
                            7                                                        
 
     
    %