hxp
3 天以前 c9f723dab47d9ae5bcb3f49281717a9a7668281f
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
U¾¸ic@sVddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZd„Zd„Zd„Zd„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"d#d$„Z6d%„Z7d&„Z8d'„Z9dS((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_Month.scCs)tjƒjtjtjjƒjƒdS(N(RRRRR RRtmonth(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytSet_Server_Month/s%cCstjƒjtjƒS(N(RRRRtDef_Server_Week(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytGet_Server_Week2scCs6tjƒjtjtjjtjjƒƒdƒdS(Ni(RRRRRRt isocalendarR(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytSet_Server_Week3s2cCstjƒjtjƒS(N(RRRRtDef_Server_Day(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytGet_Server_Day6scCs)tjƒjtjtjjƒjƒdS(N(RRRRRRRtday(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytSet_Server_Day7s%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.pytInitServerTime?s    cCstjƒt|ƒdS(N(t PyMongoMaintStartDBt InitGameWorld(ttick((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRLs
 
cCsEtjr 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 ƒƒƒntƒtjƒtt_tƒdS(Ns8·þÎñÆ÷Æô¶¯³õʼ»¯InitGameWorld: serverID=%s,serverType=%sis%Æô¶¯·þÎñÆ÷Ê±ÖØÖÿç·þ¹«»á´«ÊäÊý¾Ý״̬!(t
PyGameDatatg_initGameWorldOKRt GetGameWorldt GetServerIDt GetServerTypeRRt OnServerStartt LoadDBPlayertintttimetg_initGameTimetCheckCrossCenterUniquenessErrRRRtDef_FamilyTransDataTimeRtDef_InitOpenServerTimetDef_OpenServerWeekdaytSetInitOpenServerTimet__DoMixServerInittGameLogic_QunyingtTruetOnServerInitOK(R!tserverIDt
serverTypetinitOpenServerTimetopenServerWeekday((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR Ss*     
 
%
    cCs,tj stj rdStjr%dStt_tjƒjƒ}tjƒjƒ}t    |ƒt
|ƒtj dƒtj ƒ}tj ƒ}|r«tj d||fƒnptjƒjtjƒd}tjƒjtjƒ}tjƒjtjƒd}tj d|||||fƒtjdƒdS(sŠ·þÎñÆ÷ÍêÈ«Æô¶¯³õʼ»¯³É¹¦ºóµÄ´¦Àí£¬ÈçdbÊý¾Ý¼ÓÔØ¼°¾²Ì¬ÎïÆ·Êý¾ÝµÈ¶¼¼ÓÔØÍê±ÏÁË
    Èç¿ç·þ¼äÏà¹ØÂß¼­Í¨Ñ¶ÐèÒªµÈ·þÎñÆ÷ÍêÈ«Æô¶¯Íê±Ïºó²Å¿É½øÐÐ
    NsR=============================== ·þÎñÆ÷Æô¶¯³É¹¦ ===================================s-¿ç·þ·þÎñÆ÷Æô¶¯³É¹¦: serverType=%s,serverID=%sisYÓÎÏ··þÎñÆ÷Æô¶¯³É¹¦: serverType=%s,serverID=%s,serverDay=%s,isMixServer=%s,mixServerDay=%strestart(R"R#t g_initPyItemtg_serverInitOKR3RR$tGetTickR%t OnHighProcesstOnMinuteRR&t IsCrossServerRRRRt Def_ServerDaytDef_IsMixServertDef_MixServerDaytDataRecordPackt    DR_Reload(R!R5R6t isCrossServert    serverDayt isMixServert mixServerDay((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR4ys*        
 
        cCsdS(N((R!((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytAllMapServerInitOK›scCstjƒrdSdS(N(RR?(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR(žs cCsztjƒ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  
cCstjƒjƒ}tjd|ƒtjƒjtjƒ}|sEdStj    tjg}tjƒj
|ƒtj ƒj ƒtj ƒj ƒtjƒjƒtjƒjƒtjƒjƒtjƒjtjdƒt|ƒt|ƒtjdtƒtjdƒdS(sзþ¿ªÆôÐèÒª´¦ÀíµÄÂß¼­s#Ö´ÐÐÕýʽ¿ª·þÖØÖÃÂß¼­... serverID=%sNitsaveToDBtClearOpenServerOK(RR$R%RRRRRRJR.t    DelAllKeytGetBillboardMgrt
DelAllDatat GetGameRecMgrt GetFamilyMgrt DelAllFamilyt
GetMailMgrt
DelAllMailtGetPlayerViewCacheMgrt DelAllCacheRt Def_CanCrossR0RItBackupGameWorldDataR3t SendGameError(R!R5RLt excludeList((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRK´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/RRRJ(tinitTimet openDatetimeR8RL((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR0ÖscCsÊtjƒjtjƒ}|s/tjdƒdStjƒjtjƒ}|r^tjdƒdStjdƒtjƒj    tjdƒtjƒjtj
ƒ}tjƒj    tj |ƒtjd|ƒdS(Ns$·ÇºÏ·þ£¬²»´¦ÀíºÏ·þÊ×´ÎÆô¶¯Êý¾Ý¼ÓÔØ£¡sºÏ·þÊ×´ÎÆô¶¯¼ÓÔØÒѾ­´¦Àí¹ý£¡sºÏ·þÊ×´ÎÆô¶¯¼ÓÔØ´¦Àí...is&    ºÏ·þÊ×´ÎÆô¶¯¼ÓÔØ³É¹¦! serverDay=%s( RRRRRARtDebugLogtDef_IsMixServerInitOKRRR@tDef_LastMixServerDay(RGtisMixServerInitOKRF((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR1ã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"R;R)R*tg_highProcessTimeRRtChangeTimeNumToStrtOnFixServerTimeProcesstg_serverClosingtCheckCloseMapOKRt GetUserCtrlDBtonSecondProcesstCrossMgrtOnSecondProcessR>(R!RNt passSeconds((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR=s.             
   #
        
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.pyRj(s  cCsÅtjƒ}|j}|tjkr(dS|t_t|ƒtj|ƒt|ƒt    j
|ƒ|ddkrt ||ƒnt j|ƒt jƒtjƒtjƒtj|ƒt|ƒdS(Nii(RtGetCurrentTimetminuteR"tg_minuteProcessRORR>tDoLogic_GameWorldEvenByTimetGameWorldActiontOnProcessGameActiont
OnMinute_5t PlayerControlt PlayerFamilyt PlayerOnlinet    BattleObjtObjPoolt__CheckIpyDataRecycle(R!RNt    curMinute((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR>7s$         
 
 
 
 
 
cCst||ƒdS(N(tDisposeGameActivePlayer(RNR!((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRƒSs cCsg|j}tjƒ}|jdƒ}||kr4dS|jd|ƒtjƒjƒ}tj|ƒdS(Nt
OnlineCntM(    R~RR$tGetGameWorldDictByKeytSetGameWorldDictRrt OnlineCountRCtDR_OnLinePlayerCount(RNR!RŠt    gameWorldtnoteDatatactivePlayerCount((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR‹Xs       cCsQtjƒsdStjƒjtjƒ}t|d|ƒrMtj    d|ƒndS(NtgmEvent(
Rt IsCrossCenterRRRRtDef_CrossCenterEventtDoLogic_CrossCenterEventRotSendCrossServerEvent(R”tserverEventValue((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytOnGM_CrossCenterEventds  c Cs°tjƒrctjƒsdStjtjttjƒƒtjƒƒ}t    |ƒr_t
j ƒndSt 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?R•tToIntDefRiR)R*tChConfigtTYPE_Time_Format_YmdHR—RoR˜RRRRRR R    RRtOnHourRtOnDayRtOnWeekRtOnMonthR
tOnYear( R!t
eventValueRNt curTimeHourt
curTimeDayt curTimeWeekt curTimeMontht curTimeYeart
serverHourRFt
serverWeekt serverMontht
serverYear((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR€ls<  *                  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( RRRRtSetValueIncrementRR@RRARBR­t DoLogic_OnDay(R!teventMgrRFRGRH((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  itcCs9tjƒjtjƒ}||krR| rR|rNtjd|||fƒndS|rxtjd||||fƒntjd|||fƒtjd|tj    ƒ}tjd|tj    ƒ}|j
}|j }|j }|j }    |j
}
|j } |j } |j } tjƒjtj|ƒt}||
ksg|| ksg|| ksg|    | ksg|dkr}t}tj|ƒn|| ks­|| ks­|    | ks­|dkrÃt}tj|ƒntjƒr5tjƒ}xWt|jƒƒD]@}|j|ƒ}tj|ƒsqîntj||d|ƒqîWn|S(NsY±¾·þÓë¿ç·þÖÐÐÄʼþÖµÏàͬ²»´¦Àí! serverEventValue=%s,centerEventValue=%s,centerServerID=%ss^±¾·þÓë¿ç·þÖÐÐÄʼþÖµ±ä»¯! serverEventValue=%s,centerEventValue=%s,centerServerID=%s,gmEvent=%ssL¿ç·þÖÐÐÄ·þÎñÆ÷ʼþÖµ±ä»¯! serverEventValue=%s,centerEventValue=%s,gmEvent=%ss%stGMOnHourtGMOnDayR”(RRRRR–RRtChangeStrToDatetimeRœRRRR R    RtFalseR3R­tDoLogic_CrossCenterOnHourtDoLogic_CrossCenterOnDayt IsMainServerRrRsRtOnlineAtRvtPlayerOnCrossCenterEvent(tcenterEventValuetcenterServerIDR”R™tserverEventTimetcenterEventTimeR©RFR«R¬t
centerHourt    centerDayt centerMontht
centerYeartisEventRzR{R|((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR—ÆsD                                 <0  cCsŽtjƒjƒ}|r%dt_dStj|ƒ}tjsJ|t_dStjdkr]dS|tjdkrtdSdt_tjjƒdS(Niiiii€Q(    RRrRR"tg_ipyDataRecycleCheckTimetChangeDatetimeToNumt IpyGameDataPYtIPYDatatRecycle(ttimeNowt playerCountRN((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"RkRrRsRtRutGetIDtIsEmptytIsMirrorPlayerR„t DeleteMirrortKickt IPY_GameWorldtdisMapServerCloseRt OnServerClose(R!R5RzR{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"Rktg_closeSaveDataOKRRrRRtClearBackupFiletPyMongoDB.DBCommonRÙtPyMongoDB.CommonRÚt    WriteBYTEtdgPlayerSaveGameServerDatat NetPackCommontSendPyPackToMapServerSelftlenR(RÙRÚtdata((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRl<s    
     (:RoRœRRRR…RËRÕRCR­R2RR„RáR†RR"R‡RwRˆRR*RR
R RRRRRRRRRR R4RIR(RORKR0R1R=RjR>RƒR‹RšR€RžRŸR R¡R¢R—R‰RØRl(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyt<module>sr                                                                           &    "                "              %                         5                    F