hxp
8 天以前 1cac2e545c2e30599c2325218d89667ec800d43d
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
ûʁic@sGddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZd„Zd„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"d#„Z5d$„Z6d%„Z7d&„Z8dS('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_Week1scCs6tjƒjtjtjjtjjƒƒdƒdS(Ni(RRRRRRt isocalendarR(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytSet_Server_Week2s2cCstjƒjtjƒS(N(RRRRtDef_Server_Day(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytGet_Server_Day5scCs)tjƒjtjtjjƒjƒdS(N(RRRRRRRtday(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytSet_Server_Day6s%cCstjƒjtjƒS(N(RRRRtDef_Server_Hour(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytGet_Server_Hour9scCs)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.pyRKs
 
cCs;tjr dStjƒjƒ}tjƒ}tjd||fƒtjƒt    ƒt
j ƒt t j ƒƒt_tjƒjtjƒr³tjƒjtjdƒtjdƒntjƒjtjƒ}tjƒjtjƒ}|dksû|dkr t|r
|nt t j ƒƒƒntƒtt_tƒdS(Ns8·þÎñÆ÷Æô¶¯³õʼ»¯InitGameWorld: serverID=%s,serverType=%sis%Æô¶¯·þÎñÆ÷Ê±ÖØÖÿç·þ¹«»á´«ÊäÊý¾Ý״̬!(t
PyGameDatatg_initGameWorldOKRt GetGameWorldt GetServerIDt GetServerTypeRRt OnServerStartt LoadDBPlayertPlayerViewCachet    LoadRobottintttimetg_initGameTimeRRRtDef_FamilyTransDataTimeRtDef_InitOpenServerTimetDef_OpenServerWeekdaytSetInitOpenServerTimet__DoMixServerInittTruetOnServerInitOK(R!tserverIDt
serverTypetinitOpenServerTimetopenServerWeekday((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR Rs(     
 
%    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.pyR4us*        
 
        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 cCsétjƒjƒ}ttjƒƒ}||krEtjd|ƒdStjƒjt    j
ƒ}|r„||kr„tjd|ƒdStjƒj t    j
|ƒtj d|tj |ƒ|fƒ||kråttjƒjƒƒndS(s…GMÉèÖÿª·þʱ¼ä
    @param openServerTime: ¿ª·þʱ¼ä´Á
    @return: 1-³É¹¦£»-1-ÉèÖõÄʱ¼äÒì³££»-2-ÒѾ­ÉèÖùýÇÒ¿ª·þÁË£¬²»ÄÜÖØ¸´ÉèÖÃ
    s5µ±Ç°Ê±¼äÒѾ­³¬¹ýÉèÖõĿª·þʱ¼ä£¬²»ÄÜÉèÖÃ! serverID=%siÿÿÿÿs-ÒѾ­ÉèÖùýÇÒ¿ª·þÁË£¬²»ÄÜÖØ¸´ÉèÖÃ! serverID=%siþÿÿÿs"GMÉèÖÿª·þʱ¼ä£º serverID=%s,%s,%si(RR$R%R+R,tErrLogRRRRtDef_SetOpenServerTimeRRtChangeTimeNumToStrtOnNewServerOpenR<(topenServerTimeR5tcurTimetsetOpenServerTime((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytGMSetOpenServerTime s # cCsztjƒjtjƒ}|s"dStjƒjtjƒ}||krJdSttjƒƒ}||krldSt|ƒdS(N(    RRRRRKR/R+R,RM(R!RPtcurOpenServerTimeRO((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ƒt|ƒt|ƒtjƒjƒtjdƒdS(sзþ¿ªÆôÐèÒª´¦ÀíµÄÂß¼­s#Ö´ÐÐÕýʽ¿ª·þÖØÖÃÂß¼­... serverID=%sNtClearOpenServerOK(RR$R%RRRRRRKR/t    DelAllKeyt GetFamilyMgrt DelAllFamilyt
GetMailMgrt
DelAllMailtGetPlayerViewCacheMgrt DelAllCacheR1RItSaveGameServerDatat SendGameError(R!R5RPt excludeList((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRMÈ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/R0RRRK(tinitTimet openDatetimeR8RP((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR1â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.pyR2ï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_highProcessTimeRRRLtOnFixServerTimeProcesstg_serverClosingtCheckCloseMapOKRt GetUserCtrlDBtonSecondProcesstCrossMgrtOnSecondProcessR>(R!ROt 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.pyRh4s  cCs¸tjƒ}|j}|tjkr(dS|t_t|ƒtj|ƒt|ƒ|ddkrrt    ||ƒnt
j|ƒt jƒt jƒt jƒtj|ƒt|ƒdS(Nii(RtGetCurrentTimetminuteR"tg_minuteProcessRSRR>tDoLogic_GameWorldEvenByTimet
OnMinute_5t PlayerControlt PlayerFamilyt PlayerOnlinet    BattleObjtObjPoolt__CheckIpyDataRecycle(R!ROt    curMinute((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR>Cs"         
 
 
 
 
 
cCst||ƒdS(N(tDisposeGameActivePlayer(ROR!((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRas cCsg|j}tjƒ}|jdƒ}||kr4dS|jd|ƒtjƒjƒ}tj|ƒdS(Nt
OnlineCntM(    R|RR$tGetGameWorldDictByKeytSetGameWorldDictRpt OnlineCountRCtDR_OnLinePlayerCount(ROR!R†t    gameWorldtnoteDatatactivePlayerCount((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR‡fs       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?t IsCrossCentertToIntDefRLR+R,tChConfigtTYPE_Time_Format_YmdHtDoLogic_CrossCenterEventRmtSendCrossServerEventRRRRRR R    RRtOnHourRtOnDayRtOnWeekRtOnMonthR
tOnYear( R!t
eventValueROt curTimeHourt
curTimeDayt curTimeWeekt curTimeMontht curTimeYeart
serverHourRFt
serverWeekt serverMontht
serverYear((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR~rs<  *                  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  icCsªtjƒjtjƒ}|s@|}tjƒjtj|ƒn|rctjd|||fƒn||krtjd|||fƒdStj    d|t
j ƒ}tj    d|t
j ƒ}|j }|j }|j}|j}|j }    |j }
|j} |j} tjƒjtj|ƒt} ||    ksV||
ksV|| ksV|| krlt} tj|ƒn||
ks|| ks|| kr¦t} tj|ƒn| S(NsM´¦Àí¿ç·þÖÐÐÄʼþÖµ! serverEventValue=%s,centerEventValue=%s,centerServerID=%ssM¿ç·þÖÐÐÄʼþÖµ²»±ä! serverEventValue=%s,centerEventValue=%s,centerServerID=%ss %s:%02d:%02d(RRRRtDef_CrossCenterEventRRRRctChangeStrToDatetimeR’tTYPE_Time_Format_YmdHMSRRR R    tFalseR3R¥tDoLogic_CrossCenterOnHourtDoLogic_CrossCenterOnDay(tcenterEventValuetcenterServerIDtserverEventValuetserverEventTimetcenterEventTimeR¡RFR£R¤t
centerHourt    centerDayt centerMontht
centerYeartisEvent((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR”Ìs8                                 0$cCsŽtjƒjƒ}|r%dt_dStj|ƒ}tjsJ|t_dStjdkr]dS|tjdkrtdSdt_tjjƒdS(Niiiii€Q(    RRpR‹R"tg_ipyDataRecycleCheckTimetChangeDatetimeToNumt IpyGameDataPYtIPYDatatRecycle(ttimeNowt playerCountRO((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"RiRpRqRrRstGetIDtIsEmptytIsMirrorPlayerR€t DeleteMirrortKickt IPY_GameWorldtdisMapServerCloseRt OnServerClose(R!R5RxRyRz((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(tCommFunctspython ÒÑ´¦ÀíµØÍ¼¹Ø±ÕÂß¼­i(R"Ritg_closeSaveDataOKRRpR‹RtClearBackupFiletPyMongoDB.DBCommonRÎtPyMongoDB.CommonRÏt    WriteBYTEtdgPlayerSaveGameServerDatat NetPackCommontSendPyPackToMapServerSelftlenR(RÎRÏtdata((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRj5s    
     (9RmR’RRRRRÀRÊRCR¥R)R€R×R‚RR"RƒRuR„RR,RR
R RRRRRRRRRR R4RIR(RQRSRMR1R2R=RhR>RR‡R~R–R—R˜R™RšR”R…RÍRj(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyt<module>sp                                                                          #    "                                  %                     5                     9