1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
›Üˆgc@sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z dZ!dZ"dZ#dZ$dZ%dZ&dZ'd    Z(d
Z)d Z*d Z+d Z,dZ-dZ.dZ/dZ0dZ1dZ2dZ3dZ4dZ5dZ6dZ7dZ8dZ9dZ:dZ;dZ<d Z=dZ>dZ?dZ@dZAdZBd ZCd!ZDd ZEdZFdZGd"ZHd#ZId$ZJdZKd%ZLd&ZMdZNd'ZOd(ZPd)ZQd*ZReSd+ƒ\ZTZUd,„ZVd-„ZWd.„ZXeYd/„ZZdd0„Z\d1d2„Z]d1d3„Z^d1d4„Z_d5„Z`d6„Zad7„Zbd8„Zcd9„Zdd:eYeed;„Zfd<„Zgd1dd:eed=„Zhd1d:d>„Zid1d?„Zjd@„ZkdA„ZldB„ZmdC„ZndD„ZodE„ZpddF„ZqdG„Zrd:dH„ZsdI„ZtdJ„ZudK„ZvdL„ZwdM„ZxdejydN„ZzejydO„Z{idP„Z|idQ„Z}dR„Z~dS„ZdT„Z€dU„ZdV„Z‚dW„ZƒdX„Z„ddY„Z…eedZ„Z†eed[„Z‡d\„Zˆd]„Z‰d^„ZŠd_„Z‹d`„ZŒda„Zdb„ZŽdc„Zdd„Zd1eYde„Z‘d1eYdf„Z’dg„Z“dh„Z”di„Z•dj„Z–dk„Z—d1gddl„Z˜dm„Z™dn„Zšdo„Z›dp„Zœgdq„Zdr„Zžggds„ZŸdt„Z eSduƒ\Z¡Z¢Z£Z¤dv„Z¥eYdw„Z¦dx„Z§dy„Z¨dz„Z©d{„Zªd|„Z«d}„Z¬d~„Z­d1d„Z®d1d€„Z¯d„Z°d‚„Z±ddƒ„Z²d„„Z³d:deed…„Z´d†„Zµd:d‡„Z¶dd:dˆ„Z·d‰„Z¸gdŠ„Z¹d‹„ZºdŒ„Z»d„Z¼dŽ„Z½d„Z¾d„Z¿d‘„ZÀd’„ZÁd“„ZÂd1ddgd”„ZÃd•„ZÄd1d–„ZÅd1d—„ZÆd˜„ZÇd1d™„ZÈdš„ZÉd›„ZÊdœ„ZËd„ZÌdž„ZÍdŸ„ZÎd „ZÏd¡„ZÐd1d¢„ZÑdd£„ZÒgd¤„ZÓd¥„ZÔd¦„ZÕeed§„ZÖd¨„Z×d©„ZØdª„ZÙd«dd¬„ZÚd­„ZÛd®„ZÜdS(¯iÿÿÿÿNt VSFB_CanEntert VSFB_IsClosetVSFB_NotFamilyIDt VSFB_NotFighttlineIDtsteptwheelt
wheelTotaltnpctnpcTotalt npcTotalNeedtexptexpPointtmoneytscoretgradetleaderIDtisHelpt    helpCounttrelationtrobotJobtisAutothasRefreshBosst
gsItemInfot    dataMapIDtisPasstisSweeptextraExpt extraExpPointtsptcostTimetranktitemInfot succItemInfot firstPassItemt    extrScoretenterLVt
helpPlayertownerIDt    ownerNametisAssisticCs*ttd|tjƒjƒf|ƒdS(Ns
GFBD_%s_%s(tsetattrt
PyGameDatat    GameWorldt GetGameWorldt    GetLineID(tattrKeytdata((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt SetGameFBDatarscCs#ttd|tjƒjƒfƒS(Ns
GFBD_%s_%s(tgetattrR*R+R,R-(R.((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt GetGameFBDatasscCst|ƒ}tjd|ƒS(NtFBFunc(tGetRecordMapIDt IpyGameDataPYtGetIpyGameDataNotLog(tmapID((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt GetFBIpyDataus cCsht|ƒ}tjd||ƒ}| rd|rdtjd|dƒ}|sdtjd|dƒ}qdn|S(NtFBLineii(R4R5R6(R7Rt isDefaultLinet fbLineIpyData((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetFBLineIpyDataxs  cCs,|st||ƒ}n|s"dS|jƒS(N(R<tNonetGetEnterPosInfo(R7RR;((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetFBLineEnterPosInfo‚sicCs#t||ƒ}|sdS|jƒS(N(R<R=t GetStepTime(R7RR;((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetFBLineStepTime‡scCs#t||ƒ}|sdS|jƒS(N(R<R=t GetRefreshNPC(R7RR;((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetFBLineRefreshNPC‹scCs#t||ƒ}|sdS|jƒS(N(R<R=t GetGradeInfo(R7RR;((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetFBLineGradescCs#t||ƒ}|sdS|jƒS(N(R<R=t GetRewardInfo(R7RR;((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetFBLineReward“scCs t|ƒ}|sgS|jƒS(N(R8t GetRewardRate(R7t    fbIpyData((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetFBGradeRewardRateList˜s cCs-|tjkr)tjƒjtj|ƒSdS(Ni(R*tFBEnterTimeLimiitMapIDR+R,tGetGameWorldDictByKeyt ShareDefinetDef_Notify_WorldKey_FBCanEnter(R((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetFBFuncOpenStateœscCs$|tjkrdS|tj|kS(N(R*tFBOpenTimeRecord(RtdayStr((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetFBHasOpenToday¤scCsU|jtj|ƒ}||kr&tStj|tj|t|gƒ}|rQtStS(N(tNomalDictGetPropertytChConfigtDef_Player_Dict_FBPassLineIDtTrueR+tGetDictValueByBitt"Def_Player_Dict_PlayerFBStar_MapIdtFalse(t    curPlayerR7Rt
passLineIDR((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytIsFBPassªs !ic    Cs|jƒ}tj|||ƒs(tjS|rót|ƒsntjd||ƒ|rgtj    |dƒntj
St ||||||ƒ\}    }
|    s»|
r´tj    ||
|gƒntj St ||ƒró|rétj    |d|gƒntjSn|r|jƒ} |jƒ} |jƒ} | ru| | krutjd||| | f|ƒ|rntj    |d|gƒntjS| rÍ| | krÍtjd||| | f|ƒ|rÆtj    |d|gƒntjSt||||||ƒds|r tj    |d|gƒntjSntjS(    Nsµ±Ç°Ê±¼ä먦·Å¸Ã¸±±¾!mapID=%st FBIsNotOpent SingleEnterCDsHÍæ¼ÒµÈ¼¶²»×ã, ÎÞ·¨½øÈ븱±¾!mapID=%s,lineID=%s,curLV(%s) < lvLimitMin(%s)tFbLVsHÍæ¼ÒµÈ¼¶³¬¹ý, ÎÞ·¨½øÈ븱±¾!mapID=%s,lineID=%s,curLV(%s) > lvLimitMax(%s)itGeRen_chenxin_157069(t GetPlayerIDtFBLogictOnNeedCheckCanEnterFBCommRMtEntFBAskRet_OKROR+tLogt PlayerControlt
NotifyCodetEntFBAskRet_FBCloset__CheckCanEnterFBByTimetEntFBAskRet_NoEnterCnttCheckIsEnterCDtEntFBAskRet_EnterCDtGetLVt GetLVLimitMint GetLVLimitMaxtEntFBAskRet_LVLimittGetFBEnterTickettEntFBAskRet_NoTicket(RZR7RRIR;t reqEnterCnttisNotifyt    isTeamAsktplayerIDtcanEntert
notifyMarktcurLVt
lvLimitMint
lvLimitMax((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytCheckCanEnterFBComm´sN  !
           
c Csg|jƒ}|stdfS|tjgkrytj|tj|t|gƒ}|sytjd||fƒtdfSn|j    tj
|ƒ}t ||ƒ}    |||    kr¸tdfStj ƒj |ƒ}
|
tjkrætdfS|
tjkrD|jƒs tdfS| r]|jƒ s7|jtjƒdkr]tdfSn|tjkr]tdfStdfS(Nts8OnEnterFBEvent Ê״νøÈë¸Ã¸±±¾Ïß·Ãâ·Ñ!mapID=%s,lineID=%stGeRen_chenxin_268121itTeamSingleEnter(t GetDayTimesRVRTtDef_FBMapID_PersonalBossR+RWRXRYtDebugLogRStDef_Player_Dict_EnterFbCntDaytGetEnterFBMaxCnttGetMaptGetMapFBTypeByMapIDt IPY_GameWorldt    fbtSingletfbtTeamt GetHelpPointt    GetTeamIDt GetDictByKeytDef_PlayerKey_TeamMemCounttDef_NoLimitEnterCntMap( RZR7RRIRsRutmaxTimest    curfbStartenterCnttmaxCnttfbType((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyRiës. 
! 
 
 
, 
cCsã|st||ƒ}n|jƒ}|s=tgdtgfS|jƒ}|s‚tjd||f|jƒƒtgdtgfS|jt    j
|ƒ}|t |ƒkr´|dn||}    |    |}
|
stjd||f|jƒƒtgdtgfS|j ƒj tjƒ} tj|| |
ƒ\} } }}| sÐ|jƒ}|r”| r”||}tj|tj|ƒ}t|ƒ| |
||fStjd|||||
f|jƒƒtgdtgfS| | |
|gfS(Nis#ûÓÐÅäÖÃÃÅÆ±ÏûºÄ!mapID=%s,lineID=%siÿÿÿÿsTÃÅÆ±²»×ã, ÎÞ·¨½øÈ븱±¾!mapID=%s,lineID=%s,ticketID=%s,reqEnterCnt=%s,totalCostCnt=%s(R<t GetTicketIDRVRYtGetTicketCostCntR+tErrLogRaRSRTRƒtlentGetItemManagertGetPackR‡trptItemt
ItemCommontGetItem_FromPack_ByID_ExExtGetTicketPriceRft HaveMoneyExRMtTYPE_Price_Gold_Paper_MoneytboolR‚(RZR7RR;RsRutticketIDtticketCostCntListR‘tcostCntt totalCostCnttitemPacktenought    indexListthasBindtlackCntt ticketPricet    costMoneyt costMoneyList((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyRq#s6   &
 !  
     c Csèt|||d|ƒ\}}}}}|s7t|fS|rši|d6|d6|d6}    x?|D]4\}
} tj||
| tj|    ƒs_t|fSq_Wn|sªt|fS|jƒj    t
j ƒ} t j || ||tdƒt|fS(NtMapIDtLineIDt
EnterCounttFBTicket(RqR=RYRftPayMoneyRTtDef_Cost_EnterFBRVR˜R™R‡RšR›t
ReduceItem( RZR7RR‘tisEnoughR§tdelCntR¨R¬tinfoDictt    moneyTypetmoneyNumR¥((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytDelFBEnterTicketKs'
 
cCs|j||tjƒS(N(RSRTtDef_PDictType_FB(RZtkeyt defaultValue((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetFBPDictValue`scCstj|||tjƒdS(N(RftNomalDictSetPropertyRTRº(RZR»tvalue((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytSetFBPDictValuehscCs4tjdƒ}|sdSttjƒjƒƒ}||tjkrHdSd}d}d}tjƒ}xšt    |j
ƒƒD]†}|j |ƒ}    |    dksy|    j ƒr¬qyn|rÊ|    jƒ|krÊqyn|    jƒ}
||
7}|d7}||
kry|
}qyqyW|s dS||} tjƒ} | jtj| ƒ| jtj|ƒtjd|||| |f|ƒ|tjkr0tjƒjƒd} t|| ƒ}|s¬dn    |jƒ}tjddƒ}| || }}t||ƒ}| jtj|ƒ| jtj|ƒtjd| |||fƒntS(    s¶¯Ì¬¸üи±±¾NPC³É³¤µÈ¼¶
    tNPCAttrStrengthenNiisMNPC³É³¤¶¯Ì¬µÈ¼¶±ä¸ü: isLeave=%s,totalLV=%s,playerCnt=%s,averageLV=%s,maxLV=%stElderBattlefieldCfgisD    ¸üÐÂÉϹŻúÆ÷È˵ȼ¶·¶Î§: lineID=%s,robotLVDiff=%s,robotLV=(%s~%s)( t ReadChConfigtGetEvalChConfigR4R+R…tGetMapIDt    NPCCommontNPCAttr_DynNPCLVMaptGetMapCopyPlayerManagertxrangetGetPlayerCounttGetPlayerByIndexR=tIsEmptyRaRmt    GetGameFBt SetGameFBDictRTtDef_FB_NPCStrengthenAverageLVtDef_FB_NPCStrengthenMaxLVRetDef_FBMapID_ElderBattlefieldR,t GetPropertyIDR<RnR5t
GetFuncCfgtmaxtDef_FB_NPCStrengthenMinLVRV(RvtisLeavetattrStrengthenInfoR7tmaxLVttotalLVt    playerCnttcopyMapPlayerManagertiRZRyt    averageLVtgameFBRR;Rzt robotLVDifft
robotLVMint
robotLVMax((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytUpdFBLineNPCStrengthenLVlsP  
 
 
      c CsVtjdƒ}|sdSttjƒjƒƒ}|tj}||krNdS||}tjƒ}tj    ƒj
ƒ}|r’t d|dƒ}n|j t j|ƒtjd|||f|ƒ|rRtjƒ}x{t|jƒƒD]d}    |j|    ƒ}
|
jƒdkrqçn|
jƒtjtjgkr8qçntj|
ttƒqçWntS(s¶¯Ì¬¸üи±±¾NPC³É³¤ÈËÊý
    RÁNisENPC³É³¤¶¯Ì¬ÈËÊý±ä¸ü: playerCount=%s,isLeave=%s,isRefreshNPCAttrNow=%si(RÃRÄR4R+R…RÅRÆtNPCAttr_DynPCCoefficientMapRÍRÈRÊRÔRÎRTtDef_FB_NPCStrengthenPlayerCntRet GetNPCManagerRÉt GetNPCCountt GetNPCByIndextGetIDtGetTypeR‡t ntFunctionNPCtntPettDoNPCAttrStrengthenRYRV( RvRÖR×R7tcoefficientDicttisRefreshNPCAttrNowRÞt playerCounttgameNPCManagertindextcurNPC((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytUpdFBLineNPCStrengthenPlayerCntœs2  
      cCsA|jtj|ƒ|jtj|ƒtjd||fƒdS(s{ ÉèÖùÖÎïµôÂäÖ´ÐдÎÊýÍò·ÖÂÊ ¼° ¹Ì¶¨¼Ó³É´ÎÊýÖµ
    @param doCountRate: ´ÎÊýÍò·ÖÂÊ
    @param doCountAdd: ´ÎÊý¹Ì¶¨Öµ    
    s7ÉèÖùÖÎïµôÂäÖ´ÐдÎÊýÐÅÏ¢: doCountRate=%s, doCountAdd=%sN(RÎRTtDef_FB_DropDoCountRatetDef_FB_DropDoCountAddR+Re(RÞt doCountRatet
doCountAdd((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytSetNPCDropDoCountRate¾scCstjƒjtjƒdkS(Ni(R+RÍtGetGameFBDictByKeyRTtMap_FBDict_PropertyMark(((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetHadSetFBPropertyMarkÉscCstjƒjtjƒdS(Ni(R+RÍRùRTRú(((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetFBPropertyMarkÏscCs!tjƒjtj|dƒdS(Ni(R+RÍRÎRTRú(t propertyMarkt    setPlayer((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytSetFBPropertyMarkÕs cCstjƒj|jƒtjƒS(N(R+RÍtGetPlayerGameFBDictByKeyRèRTtFBPlayerDict_IsDelTicket(RZ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetHadDelTicketèscCs&tjƒj|jƒtj|ƒdS(N(R+RÍtSetPlayerGameFBDictRèRTR(RZtdelSign((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytSetHadDelTicketîs"cCs|jtj||fƒS(N(RSRTtDef_Player_Dict_CustomMapStep(RZR7R((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetCustomMapStepóscCsItj|tj||f|ƒ|tjkrEtj|ddƒndS(Ni(RfR¾RTRtCustomMapStep_Overt SetCustomMap(RZR7RR((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytSetCustomMapStepõs cCs:d}tjƒ}|jƒdkr6|jdƒ}n|S(s »ñÈ¡µ±Ç°µ¥È˸±±¾Íæ¼Ò iN(R=R+RÈRÊRË(RZt playerManager((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetCurSingleFBPlayerûs
 cCsE|r tjS|jƒr>tjƒjtjƒdkr>tjStjS(Ni(    RTtFB_JoinType_HelpR‹R+RÍRùtDef_FB_TeamPlayerCounttFB_JoinType_MultitFB_JoinType_Single(RZt isHelpFight((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt GetFBJoinTypes
*cCs0|tjƒjƒ}tjƒjƒ}||S(N(R+R,t GetOpenFBTickR…t GetExistTime(tticktlastTickt    existTime((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetFB_RemainTimescCsÚd}tjƒ}|jtjƒ}||krM|rItj||ƒn|St||jƒdƒ}d}t    |ƒ}    d}
x<|D]4} |
| 7}
|
|}|dkr°Pn|    d8}    q†Wt
||    ƒ}    ||    krä| rä|S|j tj|    ƒtj d||||    |fƒ|rYtj||ƒ|    |krÖ|j |d|dtƒqÖn}tjƒ} xnt| jƒƒD]Z} | j| ƒ}|s™qxntj||ƒ|    |krx|j |d|dtƒqxqxW|    S(sa¸üе±Ç°¸±±¾ÐǼ¶¡¢ÆÀ¼¶
    @param gradeTimeList: ÆÀ¼¶·Ö¶Îʱ¼äÁÐ±í£¬µ¥Î»Ãë [×î¸ßÆÀ¼¶¿ÉÓÃʱ¼ä, Ï¼¶¿ÉÓÃʱ¼ä, ..., ×îµÍ¼¶¿ÉÓÃʱ¼ä]
    @param curPlayer: ´¥·¢µÄÍæ¼Ò£¬Ò»°ãÊÇDoEnterʱµ÷Ó㬻áͬ²½¸üÐÂÒ»´Î¸±±¾ÆÀ¼¶²¢½«ÐÅϢ֪ͨ¸ÃÍæ¼Ò
    @note: ÐǼ¶£º1-1ÐÇ£»2-2ÐÇ ...            [60, 20, 10]
            ÆÀ¼¶£º1-D£»2-C£»3-B£»4-A£»5-S;    [60, 30, 30, 20, 10]
    ig@@isQUpdateFBGrade useSecond=%s,gradeTimeList=%s,curGrade=%s,updGrade=%s,diffSecond=%siè(R+RÍRùRTt Def_FB_GradeRbtDoFBHelptintt GetFBStepTickR—RÔRÎR‚t Sync_TimeTickRVRÈRÉRÊRË(Rt gradeTimeListRZttimeTypetlowestRÞtcurGradet    useSecondt
diffSecondtupdGradet gSecondTotaltgSecondR Rñ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt UpdateFBGradesH    
 
         !c Cs8d}|jtjƒ}||kr(|S|jtjƒ}t||dƒ}d}t|ƒ}    d}
x<|D]4} |
| 7}
|
|}|dkr—Pn|    d8}    qmWt||    ƒ}    ||    krÄ|S|jtj|    ƒtj    d||||    |fƒt
|i|    t 6ƒ|    |kr4|j |d|dt ƒn|    S(sa¸üе±Ç°¸±±¾ÐǼ¶¡¢ÆÀ¼¶
    @param gradeTimeList: ÆÀ¼¶·Ö¶Îʱ¼äÁÐ±í£¬µ¥Î»Ãë [×î¸ßÆÀ¼¶¿ÉÓÃʱ¼ä, Ï¼¶¿ÉÓÃʱ¼ä, ..., ×îµÍ¼¶¿ÉÓÃʱ¼ä]
    @param curPlayer: ´¥·¢µÄÍæ¼Ò£¬Ò»°ãÊÇDoEnterʱµ÷Ó㬻áͬ²½¸üÐÂÒ»´Î¸±±¾ÆÀ¼¶²¢½«ÐÅϢ֪ͨ¸ÃÍæ¼Ò
    @note: ÐǼ¶£º1-1ÐÇ£»2-2ÐÇ ...            [60, 20, 10]
            ÆÀ¼¶£º1-D£»2-C£»3-B£»4-A£»5-S;    [60, 30, 30, 20, 10]
    ig@@isWUpdateCustomFBGrade useSecond=%s,gradeTimeList=%s,curGrade=%s,updGrade=%s,diffSecond=%siè(RŒRTt$Def_PlayerKey_ClientCustomSceneGradet'Def_PlayerKey_ClientCustomSceneStepTickRR—RÔtSetDictR+R‚t Notify_FBHelpt
Help_gradeRRV( RZRRRR R!t
fbStepTickR"R#R$R%R&((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytUpdateCustomFBGradeFs2   
 
       cCsh|ji|t6|t6t|ƒt6ƒtj|dtƒ}|j|ƒt    j
d||j ƒƒdS(Nt ensure_asciisNotifyFBOver: %s( tupdatetOver_dataMapIDt Over_lineIDRt Over_isPasstjsontdumpsRYt    Frm_FBEndR+R‚Ra(RZRRRtoverDicttoverMsg((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt NotifyFBOverls
( cCsT|ji|t6ƒtj|dtƒ}|j|ƒtjd||jƒƒdS(NR/sNotifyFBHelp: %s(    R0t Help_lineIDR4R5RYt
Frm_FBHelpR+R‚Ra(RZRthelpDictthelpMsg((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt NotifyFBHelpts
 cCs*tj|dtƒ}|jd|ƒdS(NR/s%s(R4R5RYR6(RZtmsgDict((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytNotify_FB_Over€scCs0tj|dtƒ}|jdt|ƒƒdS(NR/s%s(R4R5RYR;tstr(RZR<((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyR+…scCsDg}x7|D]/}i}t|tƒs7t|tƒr£t|ƒ}|dkr`|d|d<n|dkr}|d|d<n|dkr/t|dƒ|d<q/nŒt|tƒr¿||d<npt|tƒr×|}nXtj|ƒsìq n|jƒ|d<|j    ƒ|d<t
j |ƒ|d<|j ƒ|d<|j |ƒq W|S(NitItemIDitCountit IsAuctionItemtUserData(t
isinstancetlistttupleR—RtdictR›tCheckItemCanUset GetItemTypeIDtGetCountt ItemControlertGetIsAuctionItemt GetUserDatatappend(titemListt jsonItemListR titemDicttinfolen((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetJsonItemList‹s.          cCsBg}x5|jƒD]'\}}|ji|d6|d6ƒqW|S(NR·t
moneyValue(titemsRP(t    moneyDictt    moneyListR·RV((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetJsonMoneyList§scCsBg}x5|jƒD]'\}}|ji|d6|d6ƒqW|S(NtNPCIDtkillCnt(RWRP(tnpcDicttkillListtnpcidR\((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetJsonNPCKillList®scCsBg}x5|jƒD]'\}}|ji|d6|d6ƒqW|S(NR[tHPPer(RWRP(R]R^R_Ra((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetJsonNPCHPPerListµscCsë|jƒ}|tjkr9|jƒ}tj|ƒ}tj|ƒ}|tjkr&|rqtj|j    |ƒq6t
}xŒtj|D]}}    t |    t ƒs q…n|    d|dkr…|    j dƒ|j dƒkr…|    j ddƒ|j ddƒ|    d<t}Pq…q…W|s6tj|j    |ƒq6q9|gtj|<n|dkrIdSd}
tjƒ} xgt| jƒƒD]S} | j| ƒ} | sn| jƒrœqnn| jƒ|jƒkrn|
d7}
qnqnW|
dk}|rç|||ƒndS(NRBtIsBindRCii(RéRTtDef_ItemType_MoneyRèR›tCheckItemIsEquipt GetJsonItemR*tg_fbPickUpItemDictRPRYRFRItgetRVR=R+tGetMapItemManagerRÉtGetMapItemCounttGetMapItemByIndexRÌt
GetOwnerIDRa(RZtcurItemRtoverFunct mapItemTypeRvtisEquiptjsonItemtisInR tplayerItemCounttmapItemManagerRñtmapItemtisItemAllPickUp((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt OnPickUpItem¼sB  2&   c Cs=tjƒ}|jƒ||_g|_x|D]‡}|d \}}}}t|ƒdkrg|dnd}    tjƒ}
||
_||
_||
_    ||
_
|    |
_ |jj |
ƒq/Wt|jƒ|_ |råtj||ƒnTtjƒ} xEt| jƒƒD]1} | j| ƒ}|s%qntj||ƒqWdS(sõͬ²½¶¯Ì¬Õϰ­ÎïÊÇ·ñÓÐЧÐÔ
    @param barrierPointList: Õϰ­ÎïµãÁбí [[aPosX,aPosY,bPosX,bPosY,angle¿ÉÑ¡], [aPosX,aPosY,bPosX,bPosY,angle¿ÉÑ¡], ...]
    @param state: ÊÇ·ñÓÐЧ
    @param curPlayer: Ö¸¶¨Í¨ÖªÄ¿±êÍæ¼Ò£¬ÎªNoneʱ¹ã²¥±¾µØÍ¼ËùÓÐÍæ¼Ò
    iiN(tChPyNetSendPackttagMCDynamicBarrierStatetCleartStatet BarrierListR—ttagMCDynamicBarriertAPosXtAPosYtBPosXtBPosYtAngleRPRCt NetPackCommont SendFakePackR+RÈtrangeRÊRË( tbarrierPointListtstateRZtbarrierStatePacktposInfotaPosXtaPosYtbPosXtbPosYtangletbarriert playManagerRÜ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytSyncDynamicBarrierStateçs0 
         "                      c    Csítjƒ}xÚt|jƒƒD]Æ}|j|ƒ}|dkrFqn|jƒ}||krdqn|jƒ}|dkrÌ|rˆqn|r¹tjƒj    ƒ}t
j |ƒj |ƒn|j tƒqn|sØqn|j tƒqWdS(Ni(R+RåRÉRæRçR=tGetNPCIDt
GetVisibleR,tGetTickRÆt
NPCControlt DoNPCRebornt
SetVisibleRVRY(    t
doorIDListttypetisRebornRðRÜRòtnpcIDtcurTypeR((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytOpenOrCloseDoorEx s*       cCsÔtjƒ}xÁ|D]¹}|j|ƒ}|dkrKtjd|ƒqn|jƒ}|dkr³|roqn|r tjƒjƒ}tj    |ƒj
|ƒn|j t ƒqn|s¿qn|j t ƒqWdS(Ns¸±±¾ÎÞ·¨²éÕÒ, ÃÅID = %si(R+RåtFindGameNPCByNPCIDR=R–R“R,R”RÆR•R–R—RVRY(R˜R™RšRðR›RòRœR((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytOpenOrCloseDoor1s&      cCstjƒj|ƒdS(N(R+RÍtBroadcast_FbBillboard(tmaxCount((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt InitBillBoardSscCsX|jƒ}|jƒ}tjƒj|ƒ}|j|ƒ|j|ƒ|jdƒdS(Ni(RatGetNameR+RÍtGetFbBillBoardPlayert SetPlayerIDt SetPlayerNametSetPoint(RZt curPlayerIDt curPlayerNametplayerBillBoard((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytInitBillBoardPlayer[s     cCsmtjƒj|jƒƒ}|dkrCt|jƒ|dƒ}nt|jƒ|dƒ}|j|ƒ|S(Niiÿÿi(R+RÍR¤RatmintGetPointRÔR§(RZR™R¿Rªtpoint((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytAddorReduceBillBoardks   cCs,tjƒj|jƒƒ}|j|ƒdS(N(R+RÍR¤Rat
SetCountry(RZtcountryRª((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytSetCountryBillBoard{s cCs%tjƒj|jƒƒ}|jƒS(N(R+RÍR¤RaR­(RZRª((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetPlayerBillBoardPoint…scCs%tjƒj|jƒƒ}|jƒS(N(R+RÍR¤RatGetBillboardIndex(RZRª((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetPlayerIndex_InBillBoardscCs'tjƒ}|jƒ|j|ƒdS(N(R+RÍtSortFbBillBoardPlayerR (R¡RÞ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytNotifyBillBoard•s 
 cCsPtjƒ}|j|ƒ|j|ƒtjd||ftjƒjƒƒdS(NsSetFBStep %s, tick=%s(R+RÍt    SetFBStept SetFBStepTickReR,RÒ(RRRÞ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyR¸¢s
   &cCsatjƒ}xNt|jƒƒD]:}|j|ƒ}|jƒsFqn|j|||ƒqWdS(N(R+RÈR…RÊRËRatSync_FbSystemMessage(tkeepTimetmsgTypetmsgR RÜRZ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyRº¯s  cCsgtjƒ}xTtd|jƒƒD]=}|j|ƒ}|jƒsIq"n|j||||ƒq"WdS(Ni(R+RÈR…RÊRËRaR(R¼tmsgTickR›t
isContinueR RñRZ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytSync_Player_TimeTickÄs  c    Csd}|rHtjƒjtjƒ}|r?||kr?t}qHt}ntjd||fƒtjƒj    tj|ƒtj
ƒ}xyt d|j ƒƒD]b}|j |ƒ}|jƒsÁqšn|ræ|ræ|j||d|ƒn|j||||ƒqšWdS(Ns2Sync_Player_TimeTickEx() prevMsgType=%s,msgType=%si(R=R+RÍRùRTtMap_FBDict_PrevFBTimeTypeRVRYReRÎRÈR…RÊRËRaR(    R¼R¾t isSendPrevMsgR›R¿t prevMsgTypeR RñRZ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytSync_Player_TimeTickExØs"           cCsºtjƒ}t}x—t|jƒƒD]ƒ}|j|ƒ}|jƒ}|jƒ}|jƒ}|sj|rst    }n|||gkr‹q%n|j
|ƒt j kr§t StSW|r¶tStS(N(R+R,RVR…tGetGameWorldCounttGetGameFBByFbIndext GetFamilyVSt GetFamilyIDt GetVSFamilyIDRYtGetOpenStateByFbIndexR‡tfbosOpentDef_VSFB_IsClosetDef_VSFB_CanEntertDef_VSFB_NotFighttDef_VSFB_NotFamilyID(tfamilyIDt    gameWorldt todayNotFightRñRÞtfamilyVsManagertattackIDt    defenceID((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetCanEnterVSFBõs"         cCs|tjƒ}xit|jƒƒD]U}|j|ƒ}|jƒ}|jƒ}|jƒ}|||gkr||fSqWdS(N(NN(    R+R,R…RÅRÆRÇRÈRÉR=(RÐRÑRñRÞRÓRÔRÕ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGet_VS_Line_GameFBs    cCstjƒj|ƒS(N(R+R,t GetMapCopyPlayerManagerByFbIndex(t    lineIndex((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGet_Line_PlayerManager-scCs›tjƒ}|jƒtjkr<tjd|jƒƒdS|sFdStjƒ}xBt|jƒƒD].}tj|ƒ}|j    ƒ|kr’qen|SWdS(Ns+###µ÷Óú¯ÊýÒì³£ Get_TeamFB_Line_GameFB = %s(
R+R…t GetMapFBTypeR‡R‰ReR,R…RÅRÒ(tteamIDtgameMaptgameWorldManagerRñRÑ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGet_TeamFB_Line_GameFB5s  cCs‰tjƒjƒ}|tjkr…t|jƒƒ}|s=tS|jƒdkrSt    S|j
ƒtj krrt    dfS|j ƒtj kStS(Nit FBinCantEnter(R+R…RÛR‡R‰RßR‹RVtGetCloseFBTickRYt    GetTeamLVt    tmlLeadert GetOpenStatetfbosWaitForClose(t    askStructt gameMapFBTypeRÑ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytCheckFBStateCanEnterQs
c
CsM|s'tjƒjƒ}t|ƒ}ni}tjƒ}xŽt|jƒƒD]z}|j|ƒ}|jƒ}|syqLn|j    ƒt
j kr”qLn|r¬||kr¬qLn|j |dƒd||<qLW|ræt j|||ƒnctjƒ}xTt|jƒƒD]@}    |j|    ƒ}|jƒdkr2qnt j|||ƒqW|S(Nii(R+R…RÅR4RåRÉRæRçR’tGetGameNPCObjTypeR‡tgnotPetRhRÆtSyncNPCCntInfoRÈRÊRËRè(
R7t    npcIDListRZt
npcCntDictRðRñRòR›R RÜ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt
Sync_FBNPCos0   cCs‚g}tjƒ}xit|jƒƒD]U}|j|ƒ}|jƒdkrRq%n|jƒtjkrmq%n|j    |ƒq%W|S(Ni(
R+RåR…RæRçRèRéR‡RêRP(t gameNPCListRðRñRò((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt GetMapNPCLists cCsg}tjƒ}xêt|jƒƒD]Ö}|j|ƒ}|jƒdks%tj|ƒdkrgq%n|jƒt    j
kr‚q%n|jƒt    j krîtj |ƒ}|dkr¸q%n|jƒ}|dkrî|jƒt    jkrîq%qîn|j|ƒq%W|S(Ni(R+RåR…RæRçRètGameObjtGetHPRéR‡Rêt
gnotSummont GetObjDetailR=tGetOwnertGetGameObjTypet    gotPlayerRP(t findNPCListRðRñRòt curNPCDetailt curNPCOwner((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetMapSystemNPCList§s" '  !    cCsdtjƒ}xQtd|jƒƒD]:}|j|ƒ}|jƒdkrOq"ntj|ƒq"WdS(Ni(R+RÈR…RÊRËRèRft PlayerLeaveFB(R RÜRZ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytDoLogic_FBKickAllPlayerÌs cCsÁtƒ}g}x«|D]£}tj|ƒdkr7qn|jƒtjkr¬tj|ƒ}|dkrmqn|j    ƒ}|dkr¬|j
ƒtj tj fkr¬qq¬n|j |ƒqW|S(Ni(RðRñRòRéR‡RóR+RôR=RõRöR÷tgotNPCRP(RïRøRòRùRú((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetMapSystemNPCListExßs           cCssxltƒD]a}|dkr"q
n|jƒtjtjgkrFq
n|jƒ|kr^q
ntj|ƒq
WdS(N(    RÿR=RéR‡RêRëR’RÆt    SetDeadEx(t ignoreIDListRò((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt
ClearFBNPCÿs cCssxltƒD]a}|dkr"q
n|jƒtjtjgkrFq
n|jƒ|kr^q
ntj|ƒq
WdS(N(    RÿR=RéR‡RêRëR’RÆR(tclearNPCIDListRò((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt ClearFBNPCExs cCsšd}xtƒD]‚}|dkr(qn|jƒtjtjgkrLqn|jƒ}|rp||krpqn|rˆ||krˆqn|d7}qW|S(Nii(RÿR=RéR‡RêRëR’(RìRtnpcCntRòR›((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt GetFBNPCCnt*s  cCsgtjƒ}tj|}tj|}tj|}|j||ƒ|j||ƒ|j||ƒdS(N(R+RÍRTtMap_NPC_RandomMapNPCIDtMap_NPC_RandomMapNPCNeedCnttMap_NPC_RandomMapNPCPerMaxCntRÎ(t refreshMarkR›tneedRefreshCntt    perMaxCntRÞtnpcIDKeyt
needCntKeyt perMaxCntKey((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytSetRandomRefreshMapNPCEs    icCstjƒ}|jtj||ƒ|jtj||ƒ|jtj||ƒ|jtj|dƒ|jtj|dƒ|jtj    ||ƒ|jtj
|dƒ|jtj |dƒ|jtj |dƒ|jtj |dƒ|rt||d|ƒndS(Ni(R+RÍRÎRTtMap_TDNPC_RefreshFileNumtMap_TDNPC_RefreshSignKeytMap_TDNPC_RefreshStartTicktMap_TDNPC_RefreshBigWheelNumtMap_TDNPC_RefreshSmallWheelNumtMap_TDNPC_CurWheelStartTicktMap_TDNPC_CurWheelIsOvertMap_TDNPC_AllWheelIsOvertMap_TDNPC_NPCCnttMap_TDNPC_NPCBossCntt__TDStartRefreshNotify(trMarktfileNumtsignRRtRÞ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytOpenTDNPCRefreshas cCsètjƒ}|jtj|dƒ|jtj|dƒ|jtj|dƒ|jtj|dƒ|jtj|dƒ|jtj    |dƒ|jtj
|dƒ|rä|jtj |dƒ|jtj |dƒndS(Ni( R+RÍRÎRTRRRRRRRRR(Rt
isResetNPCRÞ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytCloseTDNPCRefreshws cCs;tjƒ}x(|D] }|jtj|ƒstSqWtS(N(R+RÍRùRTRRYRV(t    rMarkListRÞR((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytIsTDNPCRefreshOverŠs
  cCs;tjƒ}x(|D] }|jtj|ƒstSqWtS(N(R+RÍRùRTRRYRV(R"RÞR((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytIsTDWheelRefreshOver•s
  cCsdtjƒ}xQ|D]I}|jtj|ƒ}|jtj|ƒ}|dksX| rtSqWtS(Ni(R+RÍRùRTRRRYRV(R"RÞRRtcurWheelIsOver((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytIsTDNPCCurWheelAllKilleds  c
Cs»tjƒ}|jtj|ƒ}|jtj|ƒ}|jtj|ƒ}|dkr^tStj    d|ƒ}|t
|ƒkr‡tS||}|t }||}    |dkoº|    |kS(Nis    TD_%s_Cfg( R+RÍRùRTRRRRYRÃRÄR—tDef_TDCfg_NextWheelTime(
RRRÞt    startTickt curWheelNumRtrefreshCfgListt wheelInfoListtforceNextWheelTimetpassTick((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytCheckForceEnterNextWheel¬s  
 
 
cCsútjƒ}|jtj|ƒ}|d}|jtj||ƒ|jtj|dƒ|jtj||ƒ|jtj|dƒ|jtj    |ƒ}|dkrÜ|rÜ|jtj
|ƒ}t ||||ƒntj d|||fƒdS(Niis2TD ½øÈëÏÂÒ»²¨£ºfileNum=%s,rMark=%s,nextWheelNum=%s( R+RÍRùRTRRÎRRRRRRR‚(RRRtRÞR)t nextWheelNumRtsignKey((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytSetEnterTDNextWheelÃs 
c
Cs½|dkrdStjd|ƒ}|j|gƒ}|t|ƒkrKdS||ddd}tjd|ƒ}|t|ƒkr¹||}|t}    |    r¹tj|    |gƒq¹ndS(Nis TD_%s_NPCIDs    TD_%s_Cfg(RÃRÄRhR—tDef_TDCfg_NotifyMarkRftFBNotify(
RÞRtwheelNumRtrefreshNPCDicttrefreshNPCListR_R*R+Rx((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyRÙs 
 
c
CsÛtjƒ}|jtjƒ}tj|}|j|ƒ}tj|ƒ}|rutd||ƒ}|j    ||ƒntj
|}|j|ƒ}||}    td|    ƒ}    |j    ||    ƒtj d||    ||fƒ|    S(Nis3UpdTDNPCCnt rMark=%s,updCnt=%s,bossCnt=%s,isBoss=%s( R+RÍRŒRTtDef_NPC_Dict_FromRefreshMarkRRùt
IsGameBossRÔRÎRR‚(
RòR¿RÞRtcurMarkNPCBossCntKeytbossCnttisBosstcurMarkNPCCntKeyRtupdCnt((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt UpdTDNPCCntïs   
cCsGtjƒ}|jtj|ƒ}|jtj|ƒ}|dkrHdStjd|ƒ}|t|ƒkrqdS||}    |    t    }
|
dkrÛ|    t
} | s¥dS|jtj |ƒ} || } t | | dƒ}n3|jtj |ƒ}||} t |
| dƒ}|dkr-t|||ƒn|j|||tƒ|S(Niiÿÿÿÿs    TD_%s_Cfg(R+RÍRùRTRRRÃRÄR—R'tDef_TDCfg_PrepareTimeRRÔRR=RÀRRV(RZRR¼RtmsgIDRÞR)RR*R+t nextWheelTimet prepareTimetcurWheelStartTickR-tnextWheelRemainTickR(((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytSync_TDNextWheelTicks0  
 
 
 
 
 c    Cs‚i}tjd|ƒ}|j|gƒ}xP|D]H}x?|D]7}x.|D]&\}}|j|dƒ|||<qLWq?Wq2W|S(Ns TD_%s_NPCIDi(RÃRÄRh(    RRt npcCountDictR5R6t wheelNPCListtsmallWhellNPCInfoR›tnpcCount((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetTDCfgNPCCntInfo*s  &c CsÌt|ƒ}|sdS|jƒ}|jƒ}d}|jƒ}tj||ƒ}|jtj|ƒ}|jtj    |ƒ}    |jtj
|ƒ}
|jtj |ƒ} || |||    ||
} | S(Ni( R8R€tGetExtraTimesMWPriIDtGetExtraTimesVIPPriIDt    PlayerViptGetPrivilegeValueRSRTtDef_Player_Dict_BuyFbCntDaytDef_Player_Dict_RecoverFbCnttDef_Player_Dict_ItemAddFbCnttDef_Player_Dict_RegainFbCnt( RZR7RIRt MWPrivilegeIDtmwAddCnttextraTimesVIPPriIDtextraCnttbuyCntt recoverFbCntt
itemAddCntt regainFbCntR’((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyR„5s    cCsÝt|ƒ}|jtj|ƒ}|jƒ}d}tjddƒ}t|ƒ|kro|t|ƒd}n|jƒ}d}||7}|j    ƒ}    t
j ||    ƒ}
|jtj |ƒ} |jtj |ƒ} |jtj|ƒ} | |
||| | g}tj|ƒ}d}xKt|ƒD]=\}}||7}td||ƒ||<||kr%Pq%q%W|\}}}}}}|jƒ}t
j ||ƒ}td|| ƒ}||||||g|||
|d|ggS(NitFBCntRegainIntervalii'(R8RSRTRƒR€R5tGetFuncEvalCfgRARKRLRMRNRORPRQtcopytdeepcopyt    enumerateRÔtGetBuyTimesVIPPriID(RZR7RIR‘RtmaxRegainFbCnttrecoverIntervalDictRSRTRURVRWRXRYtcntListtrCntListtsumCntRÜtcntt rRecoverFbCntt    rExtraCntt
rCommonCntt rRegainFbCnttrBuyCntt rItemAddCnttbuyTimesVIPPriIDt    canBuyCnttnoBuyCnt((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetFBDetailCntInfoGs8   
 
  cCsBt|ƒ}|jtj|ƒ}|dkr>tj||ƒS|S(Ni(R4RSRTRƒR+tGetDataByDigitPlace(RZtfbIDtlineBitR‘((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetEnterFBCountos
  cCszt|ƒ}|jtj|ƒ}tj|tj|||ƒt||ƒtj|d|||gƒt||ƒdS(NtAddActivityCount_1(    R4RSRTRQRfR¾tSync_FBPlayerFBInfoDataRgt!OnFBCountChangeEffectRecoverCount(RZtitemIDR7taddCntRY((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytAddFBCntByItemvs   cCs£|}|rdn|}t|ƒ}tj|}|j|ƒ}|dkrœtj||ƒ}td||ƒ}    tj|||    ƒ}
tj    |||
ƒn~t
||ƒ} || kr»t St| ||ƒ} | |}tj    ||| ƒt j ||| |ƒtj|||ƒ| }
tj|} t|j| ƒ|tjƒ}tj    || |ƒtjd|||||
|f|jƒƒt||ƒt||ƒtS(Nii    s^    AddEnterFBCount fbID=%s, addCount=%s, lineBit=%s, enterCnt=%s,updValue=%s,enterCntTotal=%s(R4RTRƒRSR+RqR¬tChangeDataByDigitPlaceRfR¾R„RYtPlayerActivitytOnEnterFBActivityt PlayerSuccesstAddEnterFBSuccesstDef_Player_Dict_EnterFbCntTotaltDef_UpperLimit_DWordR‚RaRvRwRV(RZRrtaddCountRstisFreet
addCountExt enterCntKeyR‘tcurLineEnterCntt updEnterCnttupdValueR’R=tenterCntTotalKeyt enterCntTotal((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytAddEnterFBCount…s6    
     #  cCs÷tjddƒ}t|ƒ|kr(dS|t|ƒ\}}|jtj|ƒ}||kr¤tj|tj|dƒtj|tj    |dƒt
j dƒn?t t j ƒƒ}t|ƒ}|jƒ}t||ƒ}    t||ƒ}
|
|    } |jtj|ƒ} || } | |krftj|tj|dƒtj|tj    |dƒt
j dƒn}| |krunn| s„|}n|| |}tj|tj||ƒtj|tj    ||ƒt
j d|| | |fƒt||gƒdS(NR[iis¸±±¾Ê±¼ä»Ö¸´´ÎÊýÒÑ´ïµ±ÈÕÉÏÏÞ!s¸±±¾Ê±¼ä»Ö¸´´ÎÊýÒÑ´ï³£¹æ´ÎÊý!sV¸±±¾»¹¿É°´Ê±¼ä»Ö¸´´ÎÊý!curTime=%s,regainStartTime=%s,passTime=%s,updRegainTotalTime=%s(R5R\RARSRTRRRfR¾t$Def_Player_Dict_FbCntRegainStartTimet$Def_Player_Dict_FbCntRegainTotalTimeR+R‚RttimeR8R€RtR„tNotifyFBCntRegainInfo(RZR7RbtmaxCanRecoverCnttrecoverIntervaltcurRegainFbCnttcurTimeRIt maxFreeTimesR‘R’tremainCanEnterCnttregainStartTimetpassTimetupdRegainTotalTime((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyRw¥s@   
 
          cCs tj|tj||gƒdS(N(t
PlayerTaskt AddTaskValueRTtTaskType_FBChallenge(RZR7t
funcLineIDt    joinCount((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytOnFBJoinÎsc    Cs®|jtj|ƒ}||kr_tj|tj||ƒt||ƒtj|tjƒn|rªt    j
d|ƒt j ||dd|t i|d6|d6gƒndS(Ns¸ø½±ÀøÎïÆ·: %stevents    FBPass_%sR7Rœ(RSRTRURfR¾RvR™t UpdTaskValuetTaskType_FBPassR+R‚RMtGivePlayerItemOrMailRY(RZR7Rœt awardItemListt    passCountR[((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytOnFBPassÓs  4cCs»ttjƒƒ}tjddƒ}x|jƒD]‚\}}t|ƒ}|\}}|jtj|ƒ}|rƒ||krƒq1nt|ƒ}    |    j    ƒ}
t
||ƒ} t ||ƒ} | | } | |
krÕq1n|jtj |ƒ}|s÷q1n|jtj |ƒ}||}||kr)q1n||}d||}t|
| |ƒ}|rpt|||ƒ}n|dkr‚q1n||}tj|tj||ƒt||ƒq1WdS(NR[ii(RRŽR5R\RWRSRTRRR8R€RtR„RŒRR¬RfR¾Rw(RZR“RbtmapIDStrt recoverInfoR7RR‘R’RIR”R‘R’R•R–tneedTimeR—t
remainTimet
recoverCnttrealRecoverCnttupdRegainFbCnt((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytRegainFBCntProcessásB    
 
 
 
c Csktjddƒ}|sdS|sJg|jƒD]}t|ƒ^q/}ng}ttjƒƒ}x·|D]¯}t|ƒ|kr‡qintjƒ}|jƒ||_    |j
t j |ƒ}|j
t j |ƒ}    ||}
td|    |
ƒ|_|j
t j|ƒ|_|j|ƒqiW|s&dStjƒ} | jƒ|| _t| jƒ| _tj|| ƒdS(NR[ii(R5R\tkeysRRŽRARxttagMCFBCntRegainRzt    DataMapIDRSRTRŒRRÔt
RemainTimeRRt    RegainCntRPttagMCFBCntRegainRemainTimetInfoListR—tCntRƒR„( RZt syncMapIDListRbR¦tinfoListR“R7tmapInfotlastRegainTimeR¨R—t
regainData((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyR s6(  
    
 
    cCsytjƒjƒ}t|ƒ}|jtj|ƒ}t||ƒ}||krutjƒj    |j
ƒtj dƒt St S(Ni(R+R…RÅR4RSRTRƒR„RÍRRètFBPlayerDict_IsHelpFightRVRY(RZR7R‘R’((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytSetIsHelpFight,s  "cCstjƒj|jƒtjƒS(N(R+RÍRRèRTR»(RZ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetIsHelpFight7sc    CsÓg}tjƒ}x¤t|jƒƒD]}|j|ƒ}|jƒ}|jƒ}|s^q%n|jƒ|krvq%ntj    |}|j
|ƒr%t j ||dƒ|j |ƒq%q%W|rÏt||ƒndS(Ni(R5tIPY_DataRÉtGetFBFuncCounttGetFBFuncByIndext GetDataMapIDt GetWeekTimestGetWeekResetTypeRTtDef_Player_Dict_EnterFbCntWeekRSRfR¾RPRv(    RZt
onWeekTypet    mapIDInfot
ipyDataMgrRÜtipyDataR7t    weekTimestenterCntWeekKey((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytFBOnWeek;s"    cCs[tjd|jƒƒtj||ƒg}tjƒ}xìt|jƒƒD]Ø}|j    |ƒ}|j
ƒ}|j ƒrÅ|j t j|ƒ}|rÅtj|t j|dƒtjd|ƒqÅn|jƒ}| r|jƒ r|jƒ r|jƒ rqKn|jƒ|krqKnt||ƒ}    t j|}
|j |
ƒ} tj||
dƒt j|} |j | ƒ} tj|| dƒt j|}|j |ƒ}tj||dƒt j|}|j |ƒ}tj||dƒt j|}|j |ƒ}tj||dƒtj|t j|dƒtj|t j|dƒtjd||| ||||    | fƒ|t jkrt j!|t"j#ƒrt$|    | tj%dƒtj%ddƒƒ}||krêtj||||ƒq||krtj||
||ƒqqn|j&|ƒqKW|rWt'||ƒt(||ƒt)||ƒndS(Ns¸±±¾¹ýÌì´¦Àí,FBOnDay...is ÖØÖÃÈÕÖúÕ½½±Àø´ÎÊýÏÞÖÆ£¡mapID=%ssh    ÖØÖÃ:mapID=%s,dayTimes=%s,buyCnt=%s,recoverCnt=%s,itemAddCnt=%s,regainFBCnt=%s,maxCnt=%s,enterCnt=%stZhuXianBossCntCfgi(*R+ReRaRbtOnFBPlayerOnDayR5R¾RÉR¿RÀRÁtGetDayHelpCountMaxRSRTtDef_PDict_FBRealHelpCountRfR¾R‚R€R`RLRKtGetDayResetTypeR„RƒRORPRQRRRŒRtDef_FBMapID_ZhuXianBosst GameFuncCommt GetFuncCanUseRMtGameFuncID_ZhuXianBossR¬RÓRPRvtSync_FBPlayerFBBuyCountR(RZt    onDayTypeRÆRÇRÜRÈR7RtdayTimesR’R…R‘t    buyCntKeyRWt recoverCntKeyRªt itemAddCntKeyRYtregainFBCntKeyt regainFBCnttcurCnt((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytFBOnDayXsd    .          ,     cCsCtj|ƒt|ƒt|ƒt|ƒt|ƒt|ƒdS(N(RbtOnFBPlayerOnLoginRvtSyncFBEnterTickRÕRtCheckFBPlayerOffine(RZ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt    FBOnLogin¨s 
 
 
 
 
cCsx|jƒ}t|ƒ}|s"dS|jƒ}|s8dStj|ƒ}||krttjd|ƒtj|ƒndS(Ns9Åжϸ±±¾ÀïÀëÏß³¬¹ýÒ»¶¨Ê±¼äÔòÍ˳ö¸±±¾ leaveServerSecond=%s(RÅR8tGetOfflineTimeRftGetPlayerLeaveServerSecondR+R‚Rü(RZtmapidRÈt OfflineTimetleaveServerSecond((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyRá³s    c
Cstjƒj|ƒ}|j}|tjkrVtj|ƒ}|sVtjdƒdSnt    |ƒ}|sldS|j
ƒ}|s“tjd|ƒdSt j ||ƒ}|j tj|ƒ}    |jƒ}
t||ƒ} t||ƒ} |tjkr|
r| | |
krtjdƒdS|tjkrJ| | tjddƒkrJdS|    |krwtjd|||    |fƒdStjddiƒ} | jt|ƒd    ƒ}t|ƒ}tjddiƒ}|jt|ƒtjƒ}tj|||ƒ}|sÿdSi|d
6}xG|D]?\}}tj|||tj|ƒstjd |ƒdSqWtj|tj||    dƒt ||gƒtj!|d |gƒt"||ƒ|tjkr tj|ƒ}|r tjd dƒ}|j#ƒg}tj$d|g||ƒq ndS(NsûÓаéÂÂÎÞ·¨¹ºÂòÇéÔµ¸±±¾´ÎÊý!smapID:%s ²»¿ÉÒÔ¹ºÂò½øÈë´ÎÊýsµ±Ç°´ÎÊýÒÑÂú£¬ÎÞÐ蹺Âò¡£¡£RÌisI¹ºÂò´ÎÊýÒѾ­ÓÃÍêmapID=%s,buyTimesVIPPriID=%s,hasBuyCnt=%s >= canBuyCnt=%st BuyFBCntCostit0R­sÏÉÓñ²»×ã!costGold=%stFBEnterTimeBuytLoveFBitBuyLoveFBCntCoupleMail(%R+tGetPlayerManagerRËtFBIDRTtDef_FBMapID_LoveRft GetCoupleIDR‚R8R`RMRNRSROR€R„RttDef_FBMapID_SealDemonRÑR5RÓR\RhRAtevalRMRŸRžR±tDef_Cost_BuyFBCntR¾RÕRgRwt GetPlayerNamet SendMailByKey(t playerIndext
clientDataRRZR7tcoupleIDRÈRmRnt    hasBuyCntt maxDayTimesR’R‘t costGoldDicttcostGoldtcostMoneyTypeInfotcostTypeR¬R¶R·R¸t addItemListt    paramList((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytBuyFBEnterCountÊsf        % +    cCstj|tjƒS(N(t EventReporttWriteFuncCMEAcceptableRMtGameFuncID_RunDaily(RZ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytDoFuncOpen_RunDailyscCstj|tjƒS(N(RRRMtGameFuncID_RunFamily(RZ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytDoFuncOpen_RunFamilysc
Cstjƒjƒdks| r#dStjjƒ}|tjddƒ}|j|j|j|j    f\}    }
} } |j|j|j|j    f\} }}}d}t
|ƒ}d}xÐ|D]È\}}|| |gkrßq»n|| kr
||    |
| ||df}n|| ||||df}tjj |t j ƒ}||}|j}|ddd}d|koz|knr»Pq»q»W||kr|tjƒjt jƒkr|dkrÌ||g}n    |g}tjd||d|||ƒtjƒjt j|ƒndS(Nithoursis%s-%s-%s %s:%s:%siÿÿÿÿt00i<(R+R,tGetCurGameWorldIndextdatetimettodayt    timedeltatyeartmonthtdaythourRÔtstrptimeRTtTYPE_Time_FormattsecondsRÍRùtMap_FBDict_NotifyOpenRft WorldNotifyRÎ(t openTimeListt    notifyMsgtnotifyTimeListR7t mergeMinOSDt mergeMaxOSDt mergeMapInfoR“tnextTimetcurYeartcurMonthtcurDaytcurHourtnextYeart    nextMonthtnextDaytnextHourtstartTimeStrFormattmaxNotifyMinutet remaindMinuteRtminutet startTimeStrt    startTimeR©Rt msgParamList((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt FBOpenNotifys:**  
          cCsAtjƒ}|tjddƒ}|j|j|j|jf\}}}}|j|j|j|jf\}}    }
} d} x¾|D]¶\} }| || gkr§qƒn| |krÒ| |||| |df}n| ||    |
| |df}tjj|t    j
ƒ}||}|j }d|ko0|knrƒt SqƒWt S(NRis%s-%s-%s %s:%s:%sR    i(R+tGetCurrentTimeR R RRRRRRTRRRVRY(RtprepareSecondsR“tprevTimeRRR R!tprevYeart    prevMonthtprevDaytprevHourR&RR)R*R+tpastTimet pastSeconds((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytCheckIsFBPrepareTimeKs" ** 
    cCsö|jƒ}t|ƒ}tjd||ƒ}|s7dS|jƒ}tjƒ}|p^|jƒ}|j||ƒ}    d|}
|j||
ƒ} tj    ddiƒj
|dƒ} |    | krÐt j |dƒdS| |kr|t jkrþt j |dƒnt j |dƒdSt|jƒƒ} |tjkr[|jtjƒ}|r[| d9} q[nt j||| ƒ}|szdSi|d6}x6|D].\}}t j|||tj|ƒsŽdSqŽWtj    dd    iƒj
|tjƒ}||    }tjƒj|ƒ}|stjd
|ƒdStj|ƒ}|j|||    d    ƒ|j||
| d    ƒtj    dd iƒj
|dƒ}|tjkr~tj ƒ}xXt!|j"ƒƒD]Í}|j#|ƒ}|sËqªn|j$ƒ|krãqªnt%j&||||ƒt j |d |j'ƒ|    d    gƒt(||    d    |ƒ|jƒ|jƒkrªt)j*|t+j,d    |gƒt-j.||ƒqªqªWntt%j&||||ƒt j |d |    d    |gƒt(||    d    |ƒt)j*|t+j,d    |gƒt-j.||ƒt/S(Nt FbEncouragesFbEncourageCnt_%stFBEncourageBuffiitGeRen_chenxin_93643tXjmj_CopperInspireFullR­isFbEncourageBuff   ÕÒ²»µ½¼¼ÄÜ%sitAllianceBossText2tGeRen_chenxin_628920(0RÅR4R5tGetIpyGameDatatGetInspireMaxLVR+RÍRèRR\RhRfRgR‡tTYPE_Price_Silver_MoneyRòt GetMoneyCountRTRñRStDef_Player_Dict_FMTDoubleRžR±tDef_Cost_FBEncouragetDef_SkillID_FBEncourageBufft GetGameDatatGetSkillBySkillIDRet SkillCommont GetBuffTypeRtDef_FBMapID_AllFamilyBossRÈRÉRÊRËRÈt    BuffSkillt    DoAddBuffR£tSendFBEncourageInfoR~tDoAddSuccessProgressRMtSuccType_FBEncouraget
EventShelltEventRespons_FBEncourageRV(RZR»t encourageTypeRR&tcurMapIDRÈR’RÞt encourageLVtencourageCntKeyt encourageCntRØt encourageCosttisDoubleR¬R¶R·tmoneyCntt
buffTypeIDt skillBuffIDt    skillBufftbuffTypet
addHurtNumR Rñtplayer((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytFbEncourageBuffvs|    
!   $
! #c Cs|jƒ}tjd|ƒ|p,|jƒ}tjƒ}|j||ƒ}|sWdStjƒjƒ}t|ƒ}tj    ddiƒj
|t j ƒ}||d}    tj ƒj|    ƒ}
|
s×tjd|    ƒdStj|
ƒ} tj|| |
|ƒt|||ƒdS(Ns#AddFbEncourageBuff() curPlayerID=%sR9isFbEncourageBuff   ÕÒ²»µ½¼¼ÄÜ%s(RèR+ReRÍRR…RÅR4R5R\RhRTRDRERFRGRHRJRKRL( RZR»RR&R¨RÞRSR7RYRZR[R\((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytAddFbEncourageBuffÈs&   $cCs‚xntttjddiƒjƒƒƒD]E}tj|||ƒr(tj|ƒ}|jƒt    j
dƒt Sq(Wt    j
dƒt S(NR9isClearEncourageBuff() TruesClearEncourageBuff() False( RGtsetR5R\tvaluesRJtDelBuffBySkillIDRftRefreshPlayerAttrByBuffR+ReRVRY(RZRRYt playerControl((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytClearEncourageBuffãs.
  c Cs|jƒ}t|ƒ}tjdi|d6tƒ}|s>dStjƒ}|jƒg|_d}t    j
ƒ}|p~|j ƒ}xX|D]P}|j ƒ}    tj ƒ}
|    |
_|j|||    ƒ|
_|jj|
ƒqˆWt|jƒ|_tj||ƒdS(NR8R°sFbEncourageCnt_%s(RÅR4R5tGetIpyGameDataByConditionRVRxttagMCFBEncourageInfoRzR´R+RÍRètGetInspireTypettagMCFBEncourageCntt    MoneyTypeRt EncourageCntRPR—RµRƒR„( RZtlvR&RRt ipyDataListt encourageInfoRTRÞRÈt inspireTypetpackData((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyRLðs(   
            cCstd|jtjƒƒS(Ni(RÔRŒRTt Def_PlayerKey_AreaRewardMultiple(RZ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetAreaRewardMultiple
    scCs|jtj|ƒdS(N(R*RTRr(RZR¿((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytSetAreaRewardMultiple    scCst||ƒdkS(Ni(t GetFBEnterCD(RZR7((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyRk    sc    Cst|ƒ}tjddƒ}||kr.dStjddƒ}||kri|jƒ||kridSn||}t|tj|ƒ}|s“dStjtj    ƒƒ}t
d||ƒ}t
d||ƒ}|dkrýtj d|||||fƒn|S(Nt    FBEnterCDiiisF¸±±¾½øÈëCDÖУ¡mapID=%s,timeNum=%s,lastEnterTick=%s,passTick=%s,Ê£Óà=%s( R4R5R\RmR½RTtDef_PDict_LastEnterFBTickR+tChangeTimeStrToNumtGetCurrentDataTimeStrRÔR‚(    RZR7t enterCDDictt lvLimitDicttcdTickt lastEnterTickttimeNumR-t    curCDTick((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyRu!    s&   
     cCs”tjƒjƒ}t|ƒ}tjddƒ}||kr@dStjtjƒƒ}t|t    j
||ƒtj d||fƒt ||ƒdS(NRvis%UpdateFBEnterTick mapID=%s,timeNum=%s( R+R…RÅR4R5R\RxRyRÀRTRwR‚Rà(RZR7RzR~((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytUpdateFBEnterTick=    s   cCsØtjdƒ}|s§i}i}tjƒ}x±t|jƒƒD]}|j|ƒ}|jƒ}|jƒ}|j|gƒ}    ||    kr¥|    j    |ƒ|    ||<n|j|gƒ}
||
kr@|
j    |ƒ|
||<q@q@Wg} x<|j
ƒD].\}}
t |
ƒdkrô| j    |ƒqôqôWxi|j
ƒD][\}}    x*| D]"} | |    krF|    j | ƒqFqFWt |    ƒdkr3|j |ƒq3q3Wtjd|ƒ}nx*|j
ƒD]\} }||kr´| Sq´W|S(Nt DataMapIDDicti(R5t GetConfigExR¾RÉtGetFBLineCounttGetFBLineByIndexRÁRÅRhRPRWR—tremovetpopt SetConfigEx(R7RtmIDToDataMapIDDictt
dMapIDDictRÇRÜRÈtdMapIDtmIDtmIDListtdMIDListt    unMIDListtunMIDRt    mapIDList((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyR4M    s@           cCs”tjdƒ}|sg}tjƒ}xQt|jƒƒD]=}|j|ƒ}|jƒ}||kr:|j|ƒq:q:Wtjd|ƒ}n|S(NtGeneralTrainMapIDList(    R5R‚R¾RÉtGetFBGeneralTrainCounttGetFBGeneralTrainByIndexRÁRPR‡(R‘RÇRÜRÈRŠ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetGeneralTrainMapIDListt    s   cCstƒ}|tjS(N(R”RTtClientCustomSceneList(R((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetClientCustomScene„    s    cCs?tjddƒ}|sdStjtjƒƒ}tjƒ}|jƒg|_xÆ|j    ƒD]¸}|d|gkr{q]nt
|t j |ƒ}||krÝt |t j ||ƒ|}tjd||f|jƒƒntjƒ}|jƒ||_||_|jj|ƒq]Wt|jƒ|_tj||ƒdS(NRviis&ÐÞÕýÍæ¼Ò¸±±¾CDʱ¼ä mapID=%s,timeNum=%s(R5R\R+RxRyRxttagMCFBEnterTickListRzt EnterTickListR®R½RTRwRÀR‚RattagMCFBEnterTickR­t LastEnterTickRPR—RµRƒR„(RZt    syncMapIDRzR~t    enterListR7R}t enterTickObj((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyRà    s. 
     # 
        c
CsÝ|sItjƒ}gt|jƒƒD]}|j|ƒjƒ^q%}n=t|ƒttgkredSt|ƒtkr€|gn|}t    j
ƒ}|j ƒt |ƒ|_ g|_x|D]
}t    jƒ}|j ƒ||_|jtj|ƒ|_|jtj|ƒ|_|jtj|ƒ|_|jtj|ƒ|_|jtj|ƒ|_xCttjƒD]2}|jtj||fƒ}    |j j!|    ƒqmWt |j ƒ|_"|jj!|ƒq»Wt#j$||ƒdS(N(%R5R¾RÉR¿RÀRÁR™RRGRxttagMCPlayerFBInfoDataRzR—t    FBDataCntt
FBDataListt tagMCFBInfoRîRSRTRƒtEnterCntR€t EnterCntTotalRPt
RecoverCntRQt
ItemAddCntRUt
PassLineIDR…tDef_FBStar_MaxKeyCntRXt    PassGradeRPt PassGradeCntRƒR„(
RZRÆRÇRÜRt
fbInfoDataR‹R¸tkeyNumt
gradeValue((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyRv²    s4 7! 
      
    cCs|slg}tjƒ}xQt|jƒƒD]:}|j|ƒ}|jƒsRq+n|j|jƒƒq+Wntj    ƒ}|j
ƒg|_ xV|D]N}tj ƒ}|j
ƒ||_ |jtj|ƒ|_|j j|ƒq’Wt|j ƒ|_|jdkrtj||ƒndS(Ni(R5R¾RÉR¿RÀR`RPRÁRxttagMCBuyEnterInfoRztFBInfot tagMCBuyInfoRîRSRTROtBuyCountR—tFBCountRƒR„(RZRRÇRÜRÈRªR‹R¸((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyRÕé    s*   
      
    c Csg}x!t|ƒD]}|jgƒqW|d}xÙtd||ƒD]Å}g}x{t|ƒD]m}g}||}||kr’|j|ƒn|||d}    |    |krÀ|j|    ƒn|j|ƒq`Wtj|ƒx+t|ƒD]\}
} | j||
ƒqëWqGW|S(Niii(RÉRPtrandomtshuffleR_textend( RÚtgroupCntt    groupListRÜtsetpttmpListtgttmpGrouptaIndextbIndextgitgroup((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt GetGroupList
s&
 
   cCsƒtjƒ}|jtj|dƒ|jtj|dƒ|jtj|dƒ|jtj|dƒ|jtj|dƒdS(Ni(    R+R,tSetGameWorldDictRTtMap_Player_AreaReward_GetCnttMap_Player_AreaReward_GetExpt!Map_Player_AreaReward_GetExpPointt$Map_Player_AreaReward_GetZhenQiTotalt"Map_Player_AreaReward_GetTechPoint(RvRÑ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytClearAreaRewardRecord%
s cCsÿtjƒ}tjƒ}tj|dƒ}tj|ƒ}tj|dƒ}|jtjƒ}|||krqdS|j    tj|ƒtj
d||fƒtj ƒ}    xQt |    j ƒƒD]=}
|    j|
ƒ} | sÛqºn|rütj| ƒdkrüqºn| jƒ} |rT|jtj| ƒ} | |kr6qºn|jtj| | dƒnt| ƒ}| jƒ}tj| ƒ}tj| ƒ}d|krt|dƒ}|j|ƒ}|dkrt|| ƒ|}|jtj| |tjƒ|jtj| |tjƒqnd|kr…t|dƒ}tj| |t t dƒ|jtj!| ƒ}||7}|jtj!| |ƒnd    |krºt|d    ƒ}t"j#| |t t$j%t ƒ|jtj&| ƒ}||7}|jtj&| |ƒqºqºWdS(
Niis¸øÕ½³¡¸£Àû tick=%s,needAlive=%siitExptZhenQitFBt    TechPoint('R+RÍR,R5RÓR\RùRTtMap_FBDict_LastAreaRewardTickRÎR‚RÈRÉRÊRËRñRòRaRLRÁRÀRsRmRftGetPlayerReExpRòtAddExptGetFBAreaRewardExpRÂtDef_PerPointValueRÃtPlayerAddZhenQiRVRÄt PlayerFamilytAddPlayerFamilyActiveValueRMtDef_AddFAVReason_FamilyInvadeRÅ(t
cfgKeyNameRt    needAliveRÞRÑtrewardIntervaltrewardFormatDictt getCntLimitt lastAwardTickR RñRZRvtgetCnttmultipletreLVtreExpRetaddExpttotalExpt    addZhenQit totalZhenQit addTechPointt    techPoint((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytDoLogicAreaReward2
s^         $ 
 
cCs;|jtj|ƒ}|jtj|ƒ}|tj|S(N(RLRTRÂRÃRÏ(RÑRvR R ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyRÎn
scCs|jtj|ƒS(N(RLRTRÄ(RÑRv((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetFBAreaRewardZhenQis
scCs|jtj|ƒS(N(RLRTRÅ(RÑRv((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetFBAreaRewardTechPointv
si'c    Cs­tjƒ}|jtjƒ}|||kr2dS|jtj|ƒ|rX||ƒntjƒ}xBt|jƒƒD].}|j    |ƒ}|s˜qwn|||ƒqwWdS(N(
R+RÍRùRTtDef_FB_NotifyFBHelpTickRÎRÈRÉRÊRË(    Rt
fbHelpFunctintervalt befLogicFuncRÞRR RñRZ((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytNotifyCopyMapPlayerFBHelpy
s   cCstjƒjƒdS(Ni †(R+R,RÒ(((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pytGetCrossDynamicLineMapZoneID‹
scCstjƒjƒddS(Ni †id(R+R,RÒ(((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt GetCrossDynamicLineMapFuncLineID
s(ÝR+R‡RfR›tGameMapRORÆRÃRJRxRƒRGR5tPlayerFBRMRRÑR|RMR~RÒR™R*RMRñRbRTR R²R4tmathRŽR]RÍRÌRÏRÎR:t    Help_stept
Help_wheeltHelp_wheelTotaltHelp_npct Help_npcTotaltHelp_npcTotalNeedtHelp_expt Help_expPointt
Help_moneyt
Help_scoreR,t Help_leaderIDt Help_isHelptHelp_helpCountt Help_relationt Help_robotJobt Help_isAutotHelp_hasRefreshBosstHelp_gsItemInfoR1R2R3t Over_isSweeptOver_expt Over_expPointt Over_extraExptOver_extraExpPointt
Over_moneytOver_spt Over_costTimet    Over_rankt Over_npcTotalt
Over_wheelt
Over_gradet Over_itemInfotOver_succItemInfotOver_firstPassItemt
Over_scoretOver_extrScoret Over_enterLVt Over_leaderIDtOver_helpPlayert Over_ownerIDtOver_ownerNamet Over_isAssistR…tDef_FbActionEncouragetDef_FbActionChangeLineR0R2R8RVR<R=R?RARCRERGRJRORRR\RYR|RiRqR¹R½RÀRâRóRøRûRüRÿRRRR
R RRt tttFlagTakeR'R.R9R>R@R+RURZR`RbRwR‘RRŸR¢R«R¯R²R³RµR·R¸RºRÀRÄRÖR×RÚRßRèRîRðRûRýRÿRRRRR'R?tDef_TDCfg_SmallWheelSpaceR2RR!R#R$R&R.R1RR>RERJR„RpRtRzR‹RwRžR¥R­RR¼R½RËRÞRâRáRRRR-R7R_R`RfRLRsRtRkRuR€R4R”R–RàRvRÕR¿RÆRäRÎRåRæRëRìRí(((szE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBCommon.pyt<module>s¨                                             
                       
7    8(         0    "                                        1&                              + % % "                
                          %                !        %                                                         "         (          )     ,                  P             9         ;    + R                                  '             % 7 "         <