cehua_LC
2018-11-26 19ed0ff715c2960e92f41b475a684d88c68de533
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
fû[c@sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl!Z!d„Z"d„Z#d„Z$d„Z%d„Z&d„Z'd„Z(d    „Z)d
„Z*d „Z+d „Z,e-d „Z.d„Z/d„Z0d„Z1d„Z2d„Z3d„Z4d„Z5d„Z6d„Z7d„Z8d„Z9d„Z:d„Z;d„Z<ej=d„Z>dd„Z?d„Z@d „ZAd!dd"„ZBd#„ZCd$„ZDd%„ZEd&„ZFd'„ZGd(„ZHd)„ZId*„ZJd+„ZKd,„ZLd-„ZMd.„ZNd/„ZOd0„ZPd1„ZQd2„ZRd3„ZSd4„ZTd5„ZUd6„ZVd7„ZWd8„ZXd9„ZYd:„ZZd;„Z[d<„Z\d=„Z]d>„Z^d?„Z_d@„Z`dA„ZadB„ZbdC„ZcdD„ZddE„ZedF„ZfdG„ZgdH„ZhdS(IiÿÿÿÿNcCsEtjdƒtj|ƒtjƒj|ƒt|ƒtjƒdS(NsGameServer -> OnHour!(    t    GameWorldtLogtPlayerEventCountertDoLogic_GameServer_OnHourt GetGameWorldtOnHourt__SetWorldKey_SavePlayert GameLogInfotSet_Server_Hour(t
curTimeStrttick((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRys   
 
cCstjdƒtjƒtj|ƒtjtjƒ}tj    t
j |ƒtjtj ƒ}tjtj ƒ}tj    t
j|ƒtj    t
j|ƒtjƒj|ƒtjƒtjƒtjƒtjƒtjƒtjƒddl}|jƒtjƒdS(NsGameServer -> OnDay!iÿÿÿÿ( RRtPlayerBillboardtCopyBillboardOnDayRtDoLogic_GameServer_OnDaytPlayerDBGSEventtGetDBGSTrig_ByKeyt Def_ServerDaytSendMapServerMsgExt ShareDefinetDef_Notify_WorldKey_ServerDaytDef_IsMixServertDef_MixServerDaytDef_Notify_WorldKey_IsMixServert Def_Notify_WorldKey_MixServerDayRtOnDayRtSet_Server_DaytNoteOssBillboardInfoByDaytPlayerFamilyRedPackettDoOnDaytChPlayertUpdataPlayerLVInfotPlayerCompensationtClearUpTimeOutCompensationt PlayerGeTuitClearFMTGeTuiLimitt PlayerBoursetOverTimeItemsDealtGameWorldFamilyWar(R    R
t openServerDayt isMixServert mixServerDayR#((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRŒs( 
 
 
 
 
 
 
 
 
cCs/tjdƒtj|ƒtƒtjƒdS(NsGameServer -> OnDayEx!(RRRtDoLogic_GameServer_OnDayExt__Set_Server_DayExt
PlayerXMZZt XMZZOndayEx(R
((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pytOnDayEx´s
 
cCs;tjdƒtjƒtj|ƒtjƒj|ƒdS(NsGameServer -> OnWeek!(RRRtSet_Server_WeekRtDoLogic_GameServer_OnWeekRtOnWeek(R    R
((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR0Ãs
 
 cCs%tjdƒtj|ƒtƒdS(NsGameServer -> OnWeekEx!(RRRtDoLogic_GameServer_OnWeekExt__Set_Server_WeekEx(R
((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pytOnWeekExÌs  cCs;tjdƒtj|ƒtjƒj|ƒtjƒdS(NsGameServer -> OnMonth!(RRRtDoLogic_GameServer_OnMonthRtOnMonthRtSet_Server_Month(R    R
((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR5Øs
 
cCs%tjdƒtj|ƒtƒdS(NsGameServer -> OnMonthEx!(RRRtDoLogic_GameServer_OnMonthExt__Set_Server_MonthEx(R
((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyt    OnMonthExàs  cCs;tjdƒtj|ƒtjƒj|ƒtjƒdS(NsGameServer -> OnYear!(RRRtDoLogic_GameServer_OnYearRtOnYearRtSet_Server_Year(R    R
((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR;ìs
 
cCsÄy't|jƒdjdƒdƒ}Wn+tk
rT}tjd||fƒdSXtjƒ}|dkr˜|jtjƒsÀ|j    tjdƒqÀn(|jtjƒrÀ|j    tjdƒndS(Nis:is!###»ñÈ¡Íæ¼Ò´¢´æ×ÖµäÒì³£ = %s , %si(
tinttsplitt BaseExceptionRRRt GetDictByKeytChConfigtDef_WorldKey_SavePlayertSetDict(R    ttimeStrtet    gameWorld((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRüs'  cCstjtƒ|ƒdS(N(Rt GetPsycoFunct__Func_HighPrecisionProcess(R
((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pytHighPrecisionProcessscCs tjƒjtjƒsdStj|ƒtj|ƒt    j
|ƒt    j |ƒt j |ƒtj|ƒtj|ƒtjjƒ}|j}|j}|d}tjƒjtjƒ}||krïtjƒjtj|ƒt||ƒn|ddkr    tƒndS(Nii
i(RRR@RAtDef_WorldKey_IsGameWorldInittPlayerFamilyPartytFamilyParty_Processt PlayerFamilytOnLeaderImpeachTickt GameWorldBosstDoCheckWorldBossReborntProcessBossGeTuiR!tProcessNewGuyCallBackGeTuit
PlayerTeamt DoTeamProcesst PlayerDBOpert PyDBProccesstdatetimettodaytminutetsecondtDef_WorldKey_ProcessMinuteRCtGameWorldProcessOnMinutetSendMapCommMapLinePlayerCount(R
t curDateTimet    curMinutet    curSecondt processMinutetlastProcessMinute((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRH s(                   
 
cCsR| rtj rdStjd|tjfƒtjtjtjƒtt_dS(NsO֪ͨ³£¹æµØÍ¼Íæ¼ÒÈËÊýÐÅÏ¢: isForce=%s,PyGameData.g_commMapLinePlayerCountDict=%s(    t
PyGameDatat g_needSyncCommMapLinePlayerCountRtDebugLogtg_commMapLinePlayerCountDicttSendCommMapServerMsgRt*Def_Notify_WorldKey_CommMapLinePlayerCounttFalse(tisForce((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR]Js        cCstt|ƒt|ƒtjƒtjƒtjƒtjƒtj    |ƒt
j ƒ|ddkrpt j ƒndS(Nii(tDoCheckNewServerOpentDisposeGameWorldEvenByTimetGameWorldActionControltDispose_OperationActionStatetDispose_DailyActionStatetDispose_FBStateTimetGameWorldAverageLvtOpenWorldAverageLvRStDoCountdownLeaveTeamLogictPlayerFBHelpBattletOnMinuteProcessRMtUpdFamilyTotalFightPower(R_R
((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR\Ws
 
 
 
 
 
 
 cCstjtƒ|ƒdS(N(RRGt__Func_OnGameWorldProcess(R
((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pytOnGameWorldProcesstscCsut|ƒt|ƒt|ƒt|ƒt|ƒt|ƒt|ƒt|ƒt|ƒt    j
ƒt j |ƒdS(N( tDisposeGameWorldEvenByTrucktDisposeGameWorldBroadcasttDisposeGameWorldGametDisposeGameActivePlayertDispose_MapServer_TimetDispose_MapServer_PlayerSavetDisposeMapServerRunningStatetDispose_DataBase_GMShelltDispose_SendMsg_RouteServert EventReporttOnTimeCloseScribeTxtROtCalcGameWorldBossOnlineCnt(R
((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRw|s
 
 
 
 
 
 
 
 
 
 cCsstjƒ}|jtjƒ}|dkr.dS||tjtjkrLdS|jtj|ƒtjƒjƒdS(Niÿÿÿÿ(RRt GetTickByTypeRAtTYPE_SendMsg_RouteServertTYPE_Tick_Timet SetTickByTypet SendHeartBeat(R
RFtlastTick((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR¤s  cCs¹tjƒ}||jtjƒtjtjkr6dS|jtj|ƒ|jƒ}|jƒ|j    ƒ}|sudSx3t
d|ƒD]"}|j |ƒ}t j |ƒq…W|jƒdS(Ni(RRR…RAtTYPE_ReadDateBaseGMR‡RˆtGetDBGMCommandListManagertDataServer_GMCommandReqtGetCounttrangetGetAttGMShelltDoLogic_DBGMCommontClear(R
RFtdBGMCommandListManagertdBGMCommandListCounttitgmCommon((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR€¼s & 
 
cCs`tjƒ}||jtjƒtjtjkr6dS|jtj|ƒ|jtjƒƒdS(N(    RRR…RAtTYPE_SendTimeToMapServerR‡Rˆt
OnTimeSynctGetCurrentDataTimeStr(R
RF((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR}Ûs  &cCsWtjƒ}||jtjƒtjtjkr6dS|jtj|ƒ|jƒdS(N(RRR…RAtTYPE_SendServerStateR‡RˆtDataServer_ServerStateReport(R
RF((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pytDisposeServerStateìs  &
cCsútjƒjtjƒdkr"dStjjƒjdkr>dStjƒ}g}x6t    |j
ƒƒD]"}|j |ƒ}|j |ƒqcW|j dtƒxAt    dt|ƒƒD]*}|dkrÅPn||}|jƒq¯WtjƒjtjdƒdS(Nii2tkeyii(RRR@RARBRWRXRYtGetPlayerManagerRtGetActivePlayerCounttGetActivePlayerAttappendtsorttGetKeytlentMapServer_PlayerSaveRC(R
t playerManagert curPlayerListR–t    curPlayer((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR~ýs"  
cCs
|jƒS(N(tGetLV(R©((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR¤ sc    Cs+tjjƒjddkr dSi}d}tjƒ}|jƒ}xŠt|ƒD]|}|j|ƒ}|dksQ|j    ƒ r…qQnt
j |ƒr¤|d7}qQntj |ƒ}|j |dƒd||<qQWx@|jƒD]2\}}tj|||ƒtj|d|ƒqÞWtj|i|ƒdS(Niii(RWRXRYRRŸR txrangeR¡tNonet    GetInitOKt PlayerControltGetIsTJGtGetPlayerPlatformtgettitemstDataRecordPacktDR_OnLinePlayerCountR‚tWriteEvent_concurrency(    R
tplatformOLDictt tjgOnlineCntR§tactivePlayerCounttindextplayertplatformt    playerCnt((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR|(s(  
c Csµtjƒ}g}tjjƒ}x7t|jƒƒD]#}|j|ƒ}|jƒ}tj|j    ƒƒ}tj|j
ƒƒ}| s| rº|j |ƒtj d|||fƒq4n|j ƒs;||kr;||kr;|jtƒ|jƒ}    t|||    ƒtj|ƒ}
|
dkr8tjd|
ƒq8q;n||kr4|j |ƒq4q4WxS|D]K} t| ƒ|j| ƒtj| ƒ}
|
dkrbtjd|
ƒqbqbWdS(Ns%###---»î¶¯ÉèÖÃʱ¼äÒì³£ , %s , %s , %sti(RtGetGameWorldEventManagerRWRXRtGetActiveEventCounttGetActiveEventByIndext
GetEventIDtGetDateTimeByStrt
GetEndTimet GetStartTimeR¢RtGetIsProcessingtSetIsProcessingtTruetGetPart__NotifyMapServerProcesstGMCommontGetGameServer_GM_GameOpen_MsgR®t WorldNotifytDoLogic_ProcessEvent_ClosetDelActiveEventtGetGameServer_GM_GameClose_Msg( R
t eventManagertdelListt todayDateTimeR¹teventteventIDt eventEndTimeteventStartTimeteventPartsysMsgt
delEventID((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR{„s:         
  cCsŒ|tjkr%ttt|ƒƒnc|tjkrJttt|ƒƒn>|tjkr~t|ƒ\}}t    t||ƒn
|j
ƒdS(N( RAtDef_GY_GM_Game_DoubleExpt__DisposeWorldExpEventRÇR=tDef_GY_GM_Game_DropRatet__DisposeWorldDropRateEventtDef_GY_GM_Game_Broadcastt__GetBroseCastStrt__DisposeBroadcastEventtNotify_AllMapServerProcess(RÓRÔR×tintervaltmsg((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRɺs
cCsX|tjkrttƒn8|tjkr8ttƒn|tjkrTttƒndS(N(RARÚRÛRiRÜRÝRÞRà(RÔ((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRÍÐs   cCs7|jdƒ}t|| ƒ}||d}||fS(Ns:i(tfindR=(R×R¹RâRã((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRßâscCs3tjƒ}|r"|j|ƒn |j|ƒdS(N(RRt
SetExpRate(tisOpentexpRateRF((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRÛís
  icCs3|rtd|tjƒ}nd}t|ƒdS(Ni(tmaxRAtDef_MaxRateValuetSetWorldDropRateAdd(RæRçtworldDropRateAdd((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRÝûs
 
cCsdS(N((Rë((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRêscCsat|ƒ}|s |jƒdStjƒ}x!|D]}|jt|ƒƒq3W|j|ƒdS(N(tevalRátIPY_GameServert    IntVectort    push_backR=tNotify_SelectMapServerProcess(RÓt    mapIDListtvectortmapID((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyt__DisposeMapGiveExps 
   R½cCsZtjƒ}|r/|j|ƒ|j|ƒn'|j|ƒ|jdƒ|jdƒdS(Ni(RRtSetBroadcastMsgtSetBroadcastIntervaltSetBroadcastTick(Ræt broadcastMsgt broadcastTickRF((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRà.s     cCs¬tjƒ}|jtjƒ}|s(dS|jƒs8dStjƒ}|jƒ}|dkr`dS||jƒ|j    ƒddkrˆdStj
ƒj |ƒ|j |ƒdS(NR½i<iè( RR¾tFindActiveEventRARÞRÅRtGetBroadcastMsgtGetBroadcastTicktGetBroadcastIntervalRŸt BroadcastInfoR÷(R
RÐt
broadEventRFRø((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRzFs     $ c    Csòg}tjƒ}x6t|jƒƒD]"}|j|ƒ}|j|ƒq%W|sUdStjdƒd}tt    j    ƒƒ}|t
j d}x`|D]X}||j ƒ|kr´q’ntj d|jƒ|j ƒ||fƒtj|ƒq’WdS(Nt    TruckTimei<iès@ÔËïÚʱ¼ä³¬Ê±: %d disappear! startTime=%d,curTime=%s,truckTime=%s(RtGetTruckManangerRt GetTruckCounttGetTruckByIndexR¢t ReadChConfigtGetEvalChConfigR=ttimeRAtDef_PlayerTruckLogoffTickt GetLogoffTickRt
GetOwnerIDt PlayerTrucktDelTruck(    R
tworldTruck_Listt truckManangerR¹ttruckt    truckTimetcurTimet disappearTimetcurTruck((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRyxs"       cCst|ƒdS(N(tDoLogic_GameWorldEvenByTime(R
((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRl±s
c    Cs²tjƒjtjƒ}|dkr(dStjƒ}tjjƒ}|j}|j    }tjj
|ƒd}|j }|j }t jƒ\}    }
} } } |    |ksÈ|
|ksÈ| |ksÈ| |krØt||ƒn|
|ksü| |ksü| |kr t||ƒntƒr"t|ƒn| |kr>t||ƒntƒrTt|ƒn| |ksl| |kr|t||ƒntƒr’t|ƒn| |kr®t||ƒndS(Niÿÿÿÿi(RRR…RAtTYPE_EvenByTimeRšRWRXthourtdayt isocalendartmonthtyearRtInitServerTimeRRt__Get_Can_OnDayExR-R0t__Get_Can_OnWeekExR3R5t__Get_Can_OnMonthExR9R;(R
RŠR    Rt curTimeHourt
curTimeDayt curTimeWeekt curTimeMontht curTimeYeart
serverHourt    serverDayt
serverWeekt serverMontht
serverYear((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR»s8                  0$                 c    Csºtjƒ}tjtjƒ}|r¶|d}|dd}|d}tj|||dddƒ}||}|j}|j}|dkrdS|dkr¶|tj    dkr¶dSndS(s5ÅжϿɷñÁ賿Xµã¹ýÌì
    @return: 0-²»¿É£» 1-¿ÉÒÔ
    i'idiii(
Rt GetServerTimeRRtDef_Server_DayExRWtdaystsecondsRtDef_OnEventHour(    R^t lastOndayExtlastOndayEx_YeartlastOndayEx_MonthtlastOndayEx_Dayt lastDatetimetpassTimetpassDayst passSeconds((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRôs 
 
 
         cCs‘tjƒ}|jtjkr7|tjddƒ}n|jd|jd|j    }t
j t
j |ƒtj tj|ƒtjd|ƒdS(NR*ii'ids!Set_Server_DayEx, OnDayExValue=%s(RR(RRR,RWt    timedeltaRRRRtSetDBGSTrig_ByKeyR)RtDef_Notify_WorldKey_OnDayExR(t onDayDateTimet ondayExValue((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR*s c Csítjƒ}tjj|ƒ}|\}}}tjtjƒ}|ré|d}|d}||kru||krudS|dkré|tjddƒ}tjj|ƒ\}    }
} |    |kræ|
|kræ|jt    j
krãdSqæqéndS(s5ÅжϿɷñÁ賿Xµã¹ýÖÜ
    @return: 0-²»¿É£» 1-¿ÉÒÔ
    idiiR*i( RR(RWRRRtDef_Server_WeekExR5RRR,( R^Rt dateTime_yeart dateTime_weekt dateTime_dayt lastOnWeekExtlastOnWeekEx_YeartlastOnWeekEx_WeektpreWeekDateTimet preWeek_yeart preWeek_weekt preWeek_day((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR(s$ 
 
 cCsÈtjƒ}tjj|ƒ}|\}}}|dkr|jtjkr|tjddƒ}tjj|ƒ\}}}n|d|}tj    tj
|ƒtj tj |ƒtj d|ƒdS(NiR*iids#Set_Server_WeekEx, OnWeekExValue=%s(RR(RWRRRR,R5RR6R:RtDef_Notify_WorldKey_OnWeekExR(tonWeekDateTimeRR;R<R=t onWeekExValue((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR2Ts c    Csîtjƒ}|j}|j}|j}tjtjƒ}|rê|d}|d}||kro||krodS|dkrê|dkrdn|d}|dkr©|n|d}||krç||krç|jt    j
krädSqçqêndS(s5ÅжϿɷñÁ賿Xµã¹ýÔÂ
    @return: 0-²»¿É£» 1-¿ÉÒÔ
    idiii ( RR(RRRRRtDef_Server_MonthExRRR,(    R^R=tdateTime_monthR;t lastOnMonthExtlastOnMonthEx_YeartlastOnMonthEx_MonthtpreMonth_montht preMonth_year((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRds&             
 
 cCsÖtjƒ}|j}|j}|j}|dkr|jtjkr|dkrWdn|d}|dkrs|n|d}tjdƒn|d|}t    j
t    j |ƒtj tj |ƒtjd|ƒdS(Nii sWSetMonthEx ÔÂ1ºÅÌØÊâXµã֮ǰ¹ýÌìµÄ£¬´ú±íÔ²î´óÓÚ1µÄÔÂ1ºÅ¹ýÔ£¬ÕâʱºòµÄ¹ýÔÂÖµÐèÉèÖÃΪÉÏÔÂids%Set_Server_MonthEx, onMonthExValue=%s(RR(RRRRRR,RRR6RHRtDef_Notify_WorldKey_OnMonthEx(tonMonthDateTimeR=RIR;tonMonthExValue((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR8’s             cCs7tjƒtjƒjtjƒtjƒjt    ƒdS(N(
R tInitServerBillboardRtGetTeamManagertSetMaxTeamMemberCountRAtDef_Team_MaxPlayerCountRt SetPreInitOKRÇ(R
((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pytPreInitGameWorld¨s
cCs0tjƒjtjttjƒƒƒtjƒjtjƒt    j
t    j ƒ}t    j
t    j ƒ}|dksw|dkrŸt    j |r‰|nttjƒƒƒntjƒjtjƒtjƒjƒjƒtjƒtjƒtjƒtjƒtjƒtjƒtƒtjƒt j!ƒt"j#ƒdS(Ni($RRRCRARJR=RtSetTickTypeCounttTYPE_Tick_CountRRtDef_InitOpenServerTimetDef_OpenServerWeekdaytSetInitOpenServerTimetGetFamilyManagertSetFamilyUpperLimitCounttDef_Family_MaxCnttGetDBGoldOrderFormMgrtSortR tClearBillboardOnServerInittSortServerBillboardRMt DoFamilySortRmRpR%tOnGameServerInitOKR‚t InitDllAppIDt__DoMixServerInitR+RtLoadPlayerLVDataRtt OnServerStart(R
tinitOpenServerTimetopenServerWeekday((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyt InitGameWorldºs&%(
 
 
 
 
 
 
 
 
cCsntjtjƒ}|sdStjtjƒ}||kr>dSttjƒƒ}||kr`dSt|ƒdS(N(RRtDef_SetOpenServerTimeRZR=RtOnNewServerOpen(R
tsetOpenServerTimetcurOpenServerTimeR((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRkïs  
cCstjdƒtjtjƒ}|s)dSi}tjƒjƒ}xpt|jƒƒD]\}|j    |ƒ}|j
ƒ}|j ƒ}| sT|tj tjgkr¦qTn|||<qTWx>|j ƒD]0\}}|j|ƒtjd||fƒqÁWxktjD]`}tjƒj|ƒ}    |    s&dn    |    jƒ}
|
rÿtj|ƒtjd||
fƒqÿqÿWtjƒ} xetjD]Z} | j| ƒ} | sšdn    | jƒ}| j| ƒ|rytjd| |fƒqyqyWg}tjƒ}x0t|jƒƒD]}|j|j    |ƒƒqüWx8|D]0}tjd|jƒƒtjd||ƒq#Wt j!ƒgt"_#tj$|ƒt%j&ƒt'|ƒdS(sзþ¿ªÆôÐèÒª´¦ÀíµÄÂß¼­sÖ´ÐÐÕýʽ¿ª·þÖØÖÃÂß¼­...NsDeleteGameServerEventTrig %s=%sisClearBillboard %s, count=%ss"DeleteRecData recType=%s, count=%ssDeleteFamily familyID=%s((RRRRRmRtGetDBGameServerEventTrigManagerR«RŽRRÁt
GetIsEventRZR²t DeleteByKeyRtBillboardTypeListt GetBillboardt FindBillboardR tClearBillboardByIndextGetUniversalRecMgrtDef_UniversalGameRecTypeListt GetTypeListtCounttDeleteR]R¢tGetIDRMtDoLogic_DeleteFamilyR¬R%tDoFamilyWarResetRctg_sortBOSSRefreshListR\Rt ReloadConfigtAllMapServerInitOK(R
RotdbgsTrigKeyDicttgsEventTrigManagerR–tgsEventRžtvaluetbillboardIndext    billBoardtcounttuniversalRecMgrtrecTypet
recordListt recordCountt
familyListt    familyMgrtfamily((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRnÿsT         
     
 
cCstjtjƒS(N(RRR[(((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pytGetOpenServerWeekday<sc
CsÙtjƒjtjƒƒtƒtƒtƒtjƒtj    ƒtj
ƒt ƒt j tjƒ}tjtj|ƒt j t jƒ}tjtj|ƒt j t jƒ}tjtj|ƒt j t jƒ}tjtj|ƒt j t jƒ}tjtj|ƒt j t jƒ}tjtj|ƒt j tjƒ}tjtj|ƒt j tjƒ}tjtj|ƒtjƒjtjƒ}    tjtj |    ƒt!j"ƒt#j"ƒt$ƒt%t&ƒt'j(ƒdS(N()RRtNotify_AllMapServerInitOKRšt__SetWorldExpRatet__SetWorldDropRateAddt__NotifyMapServerEventRmt!SendMapServerOperationActionStatetSendMapServerDailyActionStatetSendMapServerFBFuncStatet__NotifyMissionPubEventRRRt"Def_Notify_WorldKey_WorldAverageLvRRRR[t%Def_Notify_WorldKey_OpenServerWeekdayRRRRtDef_LastMixServerDayt$Def_Notify_WorldKey_LastMixServerDayt&Def_Notify_WorldKey_ClearBillboardSignt*Def_Notify_WorldKey_FamilyActivityDayStateR@RARJt%Def_Notify_WorldKey_InitGameWorldTimeROtOnMapServerInitOKR%tSendAllMapGlobalDropInfoR]RÇRMtRandomFakeFamily(
R
tworldLvR&RkR'R(tlastMixServerDaytlastSigntfadStatetinitGameWorldTime((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR‚Bs@
 
 
 
 
 
 
cCs    tjtjƒ}|s)tjdƒdStjtjƒ}|rRtjdƒdStjdƒtjƒ}tjg}tjdt    |ƒƒx|D]}|j
|ƒq•Wt |ƒt j ƒtjtjdƒtjtjƒ}tjtj|ƒtjdƒdS(Ns$·ÇºÏ·þ£¬²»´¦ÀíºÏ·þÊ×´ÎÆô¶¯Êý¾Ý¼ÓÔØ£¡sºÏ·þÊ×´ÎÆô¶¯¼ÓÔØÒѾ­´¦Àí¹ý£¡sºÏ·þÊ×´ÎÆô¶¯¼ÓÔØ´¦Àí...s&    Çå³ýÖ¸¶¨Í¨ÓÃÊý¾Ý delRecTypeList=%sis    ºÏ·þÊ×´ÎÆô¶¯¼ÓÔØ³É¹¦...(RRRRRetDef_IsMixServerInitOKRxRt%Def_UniversalGameRecType_ManorWarInfotstrR|t__DelOutofdayRecDataR%RR6RRœ(R'tisMixServerInitOKRŠtdelRecTypeListt
delRecTypeR$((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRgšs*      
 
 c Csûttjƒƒ}tjd|ƒid    tj6}xÁ|jƒD]³\}}|j|ƒ}|sgq@nd}|jƒ}x]t    |ƒD]O}||}    |j
|    ƒ}
||
j ƒ|kr†|j |    ƒ|d7}q†q†Wtjd|||fƒq@WdS(
Ns"Ö´ÐÐɾ³ý¹ýÆÚµÄͨÓÃÊý¾Ý, curTime=%siiiiis2    É¾³ý¹ýÆÚÌõÊý: recType=%s,totalCnt=%s,delCnt=%sièi€Þ(( R=RRRRt&Def_UniversalGameRecType_MergeRegisterR²RzR{R«tAttGetTimeR|( RŠRtdelOutofdayRecDataDictt otDayRecTypetotTimet otRecDataListtdelCntttotalCntR¹tdelIndext    otRecData((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR¬¿s" 
 cCsqtjƒ}|jtjƒ}|s0tj}n*|jƒsHtj}nt|jƒƒ}tj    ƒj
|ƒdS(N( RR¾RúRARÚRéRÅR=RÈRRå(RÐt expRateEventRç((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR“Øs    cCsgtjƒ}|jtjƒ}|s1ttƒn2|jƒsJttƒnttt    |j
ƒƒƒdS(N( RR¾RúRARÜRÝRiRÅRÇR=RÈ(RÐRÓ((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR”ís    cCsjtjƒ}xWt|jƒƒD]C}|j|ƒ}|jƒsFqnt||jƒ|jƒƒqWdS(N(    RR¾RR¿RÀRÅRÉRÁRÈ(RÐR¹RÓ((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR•ÿs   c    CsØtjƒ}|jƒ}|jƒ}|jƒ}|jƒ}|jƒ}tjƒj    ƒj
|||||ƒ|t j ||f<t j j|iƒ}||ks±|||krÔ|||<|t j |<tt _ndS(N(RítIPY_GMapServerStatetGetRouteServerIndextGetMapIDt    GetLineIDtGetCurPlayerCounttGetMaxPlayerCountRRtGetMapServerStateManagertSetZoneServerStateRctg_commMapLineRouteDictRfR±RÇRd(    R¹R
tpacktrouteServerIndexRótlineIDtcurPlayerCounttmaxPlayerCounttlinePlayerCountDict((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pytMapServer_RefreshStates      %
  cCsgtjƒ}tjƒjƒ}|j|jƒƒ}|j|jƒƒ|j    |j
ƒƒ|j ƒdS(N( RítIPY_GMissionPubRRtGetDBMissionPubManagertAddDBMissionPubt GetMissionIDtSetMissinoPubTypetGetMissinoPubTypetSetPubIDtGetPubIDRá(R¹R
RÅtmissionPubManagert curMissionPub((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pytMapServer_MissionPub>s 
cCs tjƒjƒ}|jƒdS(N(RRRÍt#NotifyAllMapServerMissionPubProcess(RÔ((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR™Ks
cCsitjƒ}|jƒ}|jƒ}|jƒ}t|||ƒ|tjkrettj||ƒndS(N(RítIPY_GTreasureDropt    GetItemIDt GetItemCounttGetDropFunctionTypet__ProcessFunctionTypeDroptdfdAll(R¹R
RÅtitemIDt    itemCounttdropFunctionType((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pytMapServer_TreasureDropcs    cCswtjƒjƒ}|j||ƒ}|dkr4dS|jƒ|}|j|ƒ||jƒkrs|jdƒndS(Ni(    RRtGetDBGameWorldDropManagertFindGameWorldDropR¬tGetCurrentCounttSetCurrentCountt GetDropCounttNotify_AllMapServerDropState(RàRÞRßt dropManagertcurDropt
finalCount((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyRÜvs  cCsYtjƒjƒ}x6t|jƒƒD]"}|j|ƒ}|jdƒq%W|jƒdS(Ni(RRRâRRŽRRåt%Notify_AllMapServerClearForbiddenDrop(RèR–Ré((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyt__ClearTreasureDropCount‰s 
cCstjddƒ}tjddƒ}tjdƒ}x@|jƒD]2}tj|}tj|ƒ}tj||ƒq@Wx@|jƒD]2}tj    |}tj|ƒ}tj||ƒqƒWx@|jƒD]2}tj
|}tj|ƒ}tj||ƒqÆWdS(Nt GlobalDropCDiitNPCGlobalDropRate( t IpyGameDataPYtGetFuncEvalCfgtkeysRt Def_Notify_WorldKey_LastDropTimeRRRRt$Def_Notify_WorldKey_DropNPCKilledCntt"Def_Notify_WorldKey_NPCKilledCount(tglobalDropCDDicttglobalKilledCountDropDicttglobalDropRateDictRÞRžtdropTimet    killedCnttnpcID((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR¢“s    cCs=|\}}tj|}tj||ƒtj||ƒdS(N(RRòRR6RR(tmsgListRÞRøRž((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pytUpdGlobalDropCD©s
  cCs=|\}}tj|}tj||ƒtj||ƒdS(N(RRóRR6RR(RûRÞt updKilledCntRž((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pytUpdGlobalDropRate±s
  cCs=|\}}tj|}tj||ƒtj||ƒdS(N(RRôRR6RR(RûRúRýRž((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pytUpdGlobalKillCount¹s
  cCsŽtjƒjƒ}tjƒ}|j|jƒ|jƒƒ}|j|j    ƒƒ}|j
|j    ƒƒ|j |j ƒƒ|j |jƒƒdS(N(RRtGetGameFbEventListRítIPY_GRegisterFBInfotGetGameFbEventR¿t GetDataMapIDtGetGameFbDetailtGetClientLineIDtSetClientLineIDtSetMaxPlayerCountRÁt    SetFbInfot    GetFbInfo(R¹R
t
fbEventMgrtmPackt gameFBEventtfbDetail((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pytMapServer_RegisterFBInfoÛs cCsxtjƒ}tjƒjƒ}|j|jƒ|jƒƒ}|dkrLdS|j    |j
ƒƒ}|j |j ƒƒdS(N( RítIPY_GFbInfoRefreshRRRtFindGameFbEventR¿RR¬RRtSetPlayerCounttGetPlayerCount(R¹R
RÅtfbEventR R ((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pytMapServer_FbInfoRefreshûs  cCsptjƒ}tjƒjƒ}|j|jƒ|jƒƒ}|dkrLdS|j    |j
ƒƒ|j |ƒdS(N( RítIPY_GMapServerRunningStateRRtGetGameMapManagertFindR½R¾R¬tSetStatetGetStatetSetRefreshTick(R¹R
t mapServerPacktgameMapManagertcurMap((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pytMapServer_RunningStateRefresh s   cCs¨tjtj|ƒsdStjƒjƒ}xvtd|jƒƒD]_}|j|ƒ}|j    ƒt
j krqqAn||j ƒtj krqAn|jt
j ƒqAWdS(Ni(RtSetWorldDictKeyRAtTYPE_MapServerRunningStateRRRRŽRRRítmssNonetGetRefreshTicktDef_Tick_MapServer_MssNoneR(R
RR–R((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR1scCs&tjƒ}|jƒ}t|ƒdS(N(RítIPY_GMapServerMsgtGetMsgt RunEventFunc(R¹R
RÅRã((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pytMapServer_MapServerMsgVs  
cCs?d|}tƒj|ƒr*tƒ|ƒStjd|ƒdS(Nt RunEventFunc_s"Error : RunEventFunc funcName = %s(tglobalsthas_keyRR(tfuncName((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyR&bs
 
cCsBtj|ƒtjƒtjƒtjdƒtjƒjƒdS(Ns ֪ͨC++¹Ø·þ£¡(RSt OnServerCloseRtSavePlayerLVDataRtRRR(R
((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyt BeforeCloseps
 
 
 (iRRWRAR
RR®R‘RRMRRmR RíRÊRR³RRqRUR!RORRR‚t MergeChildMsgRtRRïRKR%R+RSRcRRRR-R0R3R5R9R;RRIRHRiR]R\RxRwRR€R}RR~R¤R|R{RÉRÍRßRéRÛRÝRêRôRàRzRyRlRRR*RR2RR8RWRlRkRnR‘R‚RgR¬R“R”R•RËRÖR™RáRÜRìR¢RüRþRÿRRRRR'R&R.(((scE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldProcess.pyt<module>AsÌ                                          (                                              *             (                    #        \    6                          2    9    
    9    '         ,        .            5        =        X    %                    +                     
                "         %        %