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
Ø­jc@szddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd    „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.d„Z/d„Z0d„Z1d„Z2d„Z3d„Z4d„Z5d„Z6d „Z7d!„Z8d"d#d$„Z9d%„Z:d&„Z;d'„Z<dS((iÿÿÿÿNcCstjƒjtjƒS(N(t    DBDataMgrtGetEventTrigMgrtGetValuet ShareDefinetDef_Server_Year(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytGet_Server_Year-scCs)tjƒjtjtjjƒjƒdS(N(RRtSetValueRRtdatetimettodaytyear(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytSet_Server_Year.s%cCstjƒjtjƒS(N(RRRRtDef_Server_Month(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytGet_Server_Month1scCs)tjƒjtjtjjƒjƒdS(N(RRRRR RRtmonth(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytSet_Server_Month2s%cCstjƒjtjƒS(N(RRRRtDef_Server_Week(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytGet_Server_Week5scCs6tjƒjtjtjjtjjƒƒdƒdS(Ni(RRRRRRt isocalendarR(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytSet_Server_Week6s2cCstjƒjtjƒS(N(RRRRtDef_Server_Day(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytGet_Server_Day9scCs)tjƒjtjtjjƒjƒdS(N(RRRRRRRtday(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytSet_Server_Day:s%cCstjƒjtjƒS(N(RRRRtDef_Server_Hour(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytGet_Server_Hour=scCs)tjƒjtjtjjƒjƒdS(N(RRRRRRRthour(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytSet_Server_Hour>s%cCs^tƒs<tƒtƒtƒtƒtƒtjdƒntƒt    ƒt
ƒt ƒtƒfS(Ns!###·þÎñÆ÷пª, ³õʼ»¯·þÎñÆ÷ʱ¼ä !( RRRRRR
t    GameWorldtLogRRRR (((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytInitServerTimeBs    cCstjƒt|ƒdS(N(t PyMongoMaintStartDBt InitGameWorld(ttick((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyROs
 
cCsžtjr dStjƒjƒ}tjƒ}tjd||fƒtjƒt    ƒt
t j ƒƒt_ tj ƒtjƒjtjƒr³tjƒjtjdƒtjdƒntjƒjtjƒ}tjƒjtjƒ}|dksû|dkr t|r
|nt
t j ƒƒƒntjƒjtjƒsytjƒjƒ}tjƒj|ƒtjƒjtjdƒntƒtjƒtt_tƒdS(Ns8·þÎñÆ÷Æô¶¯³õʼ»¯InitGameWorld: serverID=%s,serverType=%sis%Æô¶¯·þÎñÆ÷Ê±ÖØÖÿç·þ¹«»á´«ÊäÊý¾Ý״̬!i( t
PyGameDatatg_initGameWorldOKRt GetGameWorldt GetServerIDt GetServerTypeRRt OnServerStartt LoadDBPlayertintttimetg_initGameTimetCheckCrossCenterUniquenessErrRRRtDef_FamilyTransDataTimeRtDef_InitOpenServerTimetDef_OpenServerWeekdaytSetInitOpenServerTimetDef_RemoveFamilyIDUsedt GetFamilyMgrtGetFamilyIDListRt GetUserCtrlDBtRemoveFamilyIDUsedt__DoMixServerInittFBLogictTruetOnServerInitOK(R!tserverIDt
serverTypetinitOpenServerTimetopenServerWeekdayt familyIDList((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR Vs2     
 
%
    cCsRtj stj rdStjr%dStt_tjƒjƒ}tjƒjƒ}t    |ƒt
|ƒtj dƒtj ƒ}|t jkr¨tj d||fƒn™|t jkrÑtj d||fƒnptjƒjt jƒd}tjƒjt jƒ}tjƒjt jƒd}tj d|||||fƒtjdƒdS(sŠ·þÎñÆ÷ÍêÈ«Æô¶¯³õʼ»¯³É¹¦ºóµÄ´¦Àí£¬ÈçdbÊý¾Ý¼ÓÔØ¼°¾²Ì¬ÎïÆ·Êý¾ÝµÈ¶¼¼ÓÔØÍê±ÏÁË
    Èç¿ç·þ¼äÏà¹ØÂß¼­Í¨Ñ¶ÐèÒªµÈ·þÎñÆ÷ÍêÈ«Æô¶¯Íê±Ïºó²Å¿É½øÐÐ
    NsR=============================== ·þÎñÆ÷Æô¶¯³É¹¦ ===================================s+¿ç·þÖÐÐÄÆô¶¯³É¹¦: serverType=%s,serverID=%ss-¿ç·þ·þÎñÆ÷Æô¶¯³É¹¦: serverType=%s,serverID=%sisYÓÎÏ··þÎñÆ÷Æô¶¯³É¹¦: serverType=%s,serverID=%s,serverDay=%s,isMixServer=%s,mixServerDay=%strestart(R"R#t g_initPyItemtg_serverInitOKR8RR$tGetTickR%t OnHighProcesstOnMinuteRR&RtserverType_CrossCentertserverType_CrossRRRt Def_ServerDaytDef_IsMixServertDef_MixServerDaytDataRecordPackt    DR_Reload(R!R:R;t    serverDayt isMixServert mixServerDay((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR9‚s,        
 
       cCsdS(N((R!((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytAllMapServerInitOK¥scCsdS(N((((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR(¨scCsztjƒjtjƒ}|s"dStjƒjtjƒ}||krJdSttjƒƒ}||krldSt|ƒdS(N(    RRRRtDef_SetOpenServerTimeR.R)R*tOnNewServerOpen(R!tsetOpenServerTimetcurOpenServerTimetcurTime((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytDoCheckNewServerOpen¬s  
cCs(tjƒjƒ}tjd|ƒtjƒjtjƒ}|sEdStj    tjg}tjƒj
|ƒtj ƒj ƒtj ƒj ƒtjƒjƒtjƒjƒtjƒjƒtjƒjtjdƒt|ƒt|ƒtjƒtjdtƒtjdƒddl}|jƒdS(sзþ¿ªÆôÐèÒª´¦ÀíµÄÂß¼­s#Ö´ÐÐÕýʽ¿ª·þÖØÖÃÂß¼­... serverID=%sNitsaveToDBtClearOpenServerOKiÿÿÿÿ(RR$R%RRRRRRPR.t    DelAllKeytGetBillboardMgrt
DelAllDatat GetGameRecMgrR2t DelAllFamilyt
GetMailMgrt
DelAllMailtGetPlayerViewCacheMgrt DelAllCacheRt Def_CanCrossR0ROtGameLogic_QunyingRQtBackupGameWorldDataR8t SendGameErrort ReadChConfigtSetReloadConfig(R!R:RRt excludeListRe((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRQ¼s*
 
 
 
cCsÆtj|ƒ}|jƒd}tjƒjtj|ƒtjƒjtj|ƒtj    d|||fƒtjƒj
tj ƒ}|rÂ||krÂtjƒjtj |ƒtj    d|ƒndS(NisÉèÖÿª·þʱ¼ä: %s(%s), ÖÜ%ss%    Í¬²½¸üРDef_SetOpenServerTime=%s( RtChangeTimeNumToDatetimetweekdayRRRRR.R/RRRP(tinitTimet openDatetimeR=RR((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR0åscCs½tjƒjtjƒ}|s"dStjƒjtjƒ}|rQtjdƒdStjdƒtjƒj    tjdƒtjƒjtj
ƒ}tjƒj    tj |ƒtjd|ƒdS(NsºÏ·þÊ×´ÎÆô¶¯¼ÓÔØÒѾ­´¦Àí¹ý£¡sºÏ·þÊ×´ÎÆô¶¯¼ÓÔØ´¦Àí...is&    ºÏ·þÊ×´ÎÆô¶¯¼ÓÔØ³É¹¦! serverDay=%s( RRRRRHtDef_IsMixServerInitOKRtDebugLogRRRGtDef_LastMixServerDay(RMtisMixServerInitOKRL((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR6òs  cCstjs dSttjƒƒ}tjs4|t_n|tjkrstjdtjtjƒƒ|t_tƒn|tj}|dkrdS|dkrÉtjd|tjtjƒfƒtƒn|t_tj    ræt
ƒdSt j ƒj ƒtj||ƒt|ƒdS(Nsʱ¼ä»Øµ÷ÁË: lastProcessTime=%sii
s/ʱ¼äÎó²î¹ý´ó: passSeconds=%s,lastProcessTime=%s(R"RAR)R*tg_highProcessTimeRRtChangeTimeNumToStrtOnFixServerTimeProcesstg_serverClosingtCheckCloseMapOKRR4tonSecondProcesstCrossMgrtOnSecondProcessRD(R!RTt passSeconds((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRCs.             
   #
        
cCsktjƒ}xXt|jƒƒD]D}|j|ƒ}tj|ƒsIqntj|ƒtj|ƒqWdS(N(    RtGetPlayerManagertxrangetGetPlayerCounttGetPlayerByIndextIsNormalPlayertChPlayertSync_PyServerDataTimeToClienttSync_OpenServerDay(t playerManagertit    curPlayer((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRr7s  cCsétjƒ}|j}|tjkr(dS|t_t|ƒtj|ƒt|ƒt    j
|ƒ|ddkrt ||ƒnt j|ƒt jƒtjƒtjƒtj|ƒtj|ƒtj|ƒtjƒt|ƒdS(Nii(RtGetCurrentTimetminuteR"tg_minuteProcessRURRDtDoLogic_GameWorldEvenByTimetGameWorldActiontOnProcessGameActiont
OnMinute_5t PlayerControlt PlayerFamilyt PlayerOnlinet    BattleObjtObjPoolR7tPlayerActFamilyGCZtOnMinuteProcesstPlayerSubscribeMsgt__CheckIpyDataRecycle(R!RTt    curMinute((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRDFs*         
 
 
 
 
 
 
cCst||ƒdS(N(tDisposeGameActivePlayer(RTR!((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRŠes cCsg|j}tjƒ}|jdƒ}||kr4dS|jd|ƒtjƒjƒ}tj|ƒdS(Nt
OnlineCntM(    R…RR$tGetGameWorldDictByKeytSetGameWorldDictRyt OnlineCountRJtDR_OnLinePlayerCount(RTR!R”t    gameWorldtnoteDatatactivePlayerCount((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR•js       cCsQtjƒsdStjƒjtjƒ}t|d|ƒrMtj    d|ƒndS(NtgmEvent(
Rt IsCrossCenterRRRRtDef_CrossCenterEventtDoLogic_CrossCenterEventRvtSendCrossServerEvent(RžtserverEventValue((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytOnGM_CrossCenterEventvs  c Cs°tjƒrStjtjttjƒƒtjƒƒ}t|ƒrOt    j
ƒndStj ƒscdSt j j ƒ}|j}|j}t j j|ƒd}|j}|j}tƒ\}}    }
} } ||ksô|    |ksô| |ksô| |krtƒt|ƒn|    |ks,| |ks,| |kr@tƒt|ƒn|
|kr`tƒt|ƒn| |ksx| |krŒtƒt|ƒn| |kr¬tƒt|ƒndS(sö¿ç·þʼþÓÉ¿ç·þÖÐÐÄ·þÎñÆ÷Çý¶¯£¬ÓÎÏ··þʹÓÃÔ­·½Ê½
    ¿ç·þÖÐÐÄOnEvent -> ÆäËû·þÎñÆ÷OnEvent (°üº¬¸ö³£¹æ¿ç·þ·þÎñÆ÷¼°ÓÎÏ··þ£¬²»±£Ö¤Ë­ÏÈÖ´ÐÐ)
        ¸ö±ð¹¦ÄÜÈç¹ûÐèҪȷ±£¿ç·þÏÈÖ´ÐÐEvent£¬ÔÙ´¦ÀíÓÎÏ··þEvent£¬¿ÉÒÔÓɹ¦ÄÜÇý¶¯¿ç·þÏÈÖ´ÐУ¬ÔÙͬ²½ÓÎÏ··þÖ´ÐÐ
    Ni(RRŸtToIntDefRqR)R*tChConfigtTYPE_Time_Format_YmdHR¡RvR¢t IsMainServerRRRRRR R    RRtOnHourRtOnDayRtOnWeekRtOnMonthR
tOnYear( R!t
eventValueRTt curTimeHourt
curTimeDayt curTimeWeekt curTimeMontht curTimeYeart
serverHourRLt
serverWeekt serverMontht
serverYear((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR‡~s< *                   0 $      cCstjdƒtj|ƒdS(NsServer -> OnHour!(RRtPlayerEventCountertDoLogic_OnHour(R!((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR©´s  cCs‘tjdƒtjƒ}|jtjƒ}|jtjƒ}d}|r^|jtj    ƒ}ntjd|d||dfƒt
j |ƒdS(NsServer -> OnDay!is4OnDay -> serverDay=%s,isMixServer=%s,mixServerDay=%si( RRRRtSetValueIncrementRRGRRHRIR¸t DoLogic_OnDay(R!teventMgrRLRMRN((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRª¹s  " cCs:tjdƒtjƒ}|jtjƒtj|ƒdS(NsServer -> OnWeek!(    RRRRRºRtDef_ServerWeekR¸tDoLogic_OnWeek(R!R¼((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR«Çs
   cCstjdƒtj|ƒdS(NsServer -> OnMonth!(RRR¸tDoLogic_OnMonth(R!((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR¬Ïs  cCstjdƒtj|ƒdS(NsServer -> OnYear!(RRR¸tDoLogic_OnYear(R!((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR­Ôs  itcCs“tjƒjtjƒ}||krR| rR|rNtjd|||fƒndS|rxtjd||||fƒntjd|||fƒtjd|tj    ƒ}tjd|tj    ƒ}|j
}|j }t j j |ƒd}|j}    |j}
|j
} |j } t j j |ƒd} |j}|j}tjƒjtj|ƒt}|| ks“|| ks“|    |ks“|
|ks“|d
kr©t}tj|ƒn|| ksÙ|    |ksÙ|
|ksÙ|d krït}tj|ƒn|| ks|d krt}tj|ƒntjƒrtjƒ}xWt|jƒƒD]@}|j|ƒ}tj|ƒsrqHntj||d    |ƒqHWn|S( NsY±¾·þÓë¿ç·þÖÐÐÄʼþÖµÏàͬ²»´¦Àí! serverEventValue=%s,centerEventValue=%s,centerServerID=%ss^±¾·þÓë¿ç·þÖÐÐÄʼþÖµ±ä»¯! serverEventValue=%s,centerEventValue=%s,centerServerID=%s,gmEvent=%ssL¿ç·þÖÐÐÄ·þÎñÆ÷ʼþÖµ±ä»¯! serverEventValue=%s,centerEventValue=%s,gmEvent=%ss%sitGMOnHourtGMOnDaytGMOnWeekRž(RÂRÃRÄ(RÃRÄ(RÄ(RRRRR RRtChangeStrToDatetimeR¦R§RRRRR R    RtFalseR8R¸tDoLogic_CrossCenterOnHourtDoLogic_CrossCenterOnDaytDoLogic_CrossCenterOnWeekR¨RyRzR™tOnlineAtR}tPlayerOnCrossCenterEvent(tcenterEventValuetcenterServerIDRžR£tserverEventTimetcenterEventTimeR´RLRµR¶R·t
centerHourt    centerDayt
centerWeekt centerMontht
centerYeartisEventRR‚Rƒ((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR¡ÙsN                                 <0  cCsŽtjƒjƒ}|r%dt_dStj|ƒ}tjsJ|t_dStjdkr]dS|tjdkrtdSdt_tjjƒdS(Niiiii€Q(    RRyR™R"tg_ipyDataRecycleCheckTimetChangeDatetimeToNumt IpyGameDataPYtIPYDatatRecycle(ttimeNowt playerCountRT((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR“ s                 cCsÌtjƒjƒ}tjd|ƒdt_tjƒ}xƒt|jƒƒD]o}|j    |ƒ}| sK|j
ƒdksK|j ƒr‹qKntj |ƒrªt j|ƒqK|jtjƒqKWtjƒdS(Ns'µØÍ¼·þÎñÆ÷¹Ø±Õ¿ªÊ¼±£´æÊý¾Ý! serverID=%sii(RR$R%RR"RsRyRzR{R|tGetIDtIsEmptytIsMirrorPlayerR‹t DeleteMirrortKickt IPY_GameWorldtdisMapServerCloseRt OnServerClose(R!R:RR‚Rƒ((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytCloseMap<s     %
cCs«tjdkrdStjs dStjƒjƒr6dStjƒddlm    }ddl
m }d}|j ||j ƒ}tj|t|ƒƒtjdƒdt_dS(    sB¼ì²éµÈ´ý¹Ø·þÊý¾Ý´¦ÀíÍê±Ï
    Ã»ÓÐÍæ¼ÒÁË£¬ÇÒ¹«¹²Êý¾ÝÒÑÈë¿âÍê±Ï
    iNiÿÿÿÿ(t CommonDefine(tCommFuncRÁspython ÒÑ´¦ÀíµØÍ¼¹Ø±ÕÂß¼­i(R"Rstg_closeSaveDataOKRRyR™RtClearBackupFiletPyMongoDB.DBCommonRætPyMongoDB.CommonRçt    WriteBYTEtdgPlayerSaveGameServerDatat NetPackCommontSendPyPackToMapServerSelftlenR(RæRçtdata((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRtPs    
     (=RvR¦RRRRŒRØRâRJR’R¸RRbRˆR‹RîRRR"RŽR~RR7RR*RR
R RRRRRRRRRR R9ROR(RURQR0R6RCRrRDRŠR•R¤R‡R©RªR«R¬R­R¡R“RåRt(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyt<module>sx                                                                              ,    #                )              %                         6                    G