hxp
3 天以前 8e76a6859474df07c12e0b4ff0ea3bfd321675eb
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
ûô‡ic@sSddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    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#„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
j ƒt t j ƒƒt_tjƒ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_initGameTimetCheckCrossCenterUniquenessErrRRRtDef_FamilyTransDataTimeRtDef_InitOpenServerTimetDef_OpenServerWeekdaytSetInitOpenServerTimet__DoMixServerInittTruetOnServerInitOK(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_serverInitOKR4RR$tGetTickR%t OnHighProcesstOnMinuteRR&t IsCrossServerRRRRt Def_ServerDaytDef_IsMixServertDef_MixServerDaytDataRecordPackt    DR_Reload(R!R6R7t isCrossServert    serverDayt isMixServert mixServerDay((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR5ys*        
 
        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=(topenServerTimeR6tcurTimetsetOpenServerTime((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytGMSetOpenServerTime¤s # cCsztjƒjtjƒ}|s"dStjƒjtjƒ}||krJdSttjƒƒ}||krldSt|ƒdS(N(    RRRRRLR0R+R,RN(R!RQtcurOpenServerTimeRP((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%RRRRRRLR0t    DelAllKeyt GetFamilyMgrt DelAllFamilyt
GetMailMgrt
DelAllMailtGetPlayerViewCacheMgrt DelAllCacheR2RJtSaveGameServerDatat SendGameError(R!R6RQt excludeList((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRNÌ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( RtChangeTimeNumToDatetimetweekdayRRRRR0R1RRRL(tinitTimet openDatetimeR9RQ((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR2æ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( RRRRRBRtDebugLogtDef_IsMixServerInitOKRRRAtDef_LastMixServerDay(RHtisMixServerInitOKRG((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR3ó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_highProcessTimeRRRMtOnFixServerTimeProcesstg_serverClosingtCheckCloseMapOKRt GetUserCtrlDBtonSecondProcesstCrossMgrtOnSecondProcessR?(R!RPt 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.pyRi8s  cCsÅtjƒ}|j}|tjkr(dS|t_t|ƒtj|ƒt|ƒt    j
|ƒ|ddkrt ||ƒnt j|ƒt jƒtjƒtjƒtj|ƒt|ƒdS(Nii(RtGetCurrentTimetminuteR"tg_minuteProcessRTRR?tDoLogic_GameWorldEvenByTimetGameWorldActiontOnProcessGameActiont
OnMinute_5t PlayerControlt PlayerFamilyt PlayerOnlinet    BattleObjtObjPoolt__CheckIpyDataRecycle(R!RPt    curMinute((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR?Gs$         
 
 
 
 
 
cCst||ƒdS(N(tDisposeGameActivePlayer(RPR!((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR‚cs cCsg|j}tjƒ}|jdƒ}||kr4dS|jd|ƒtjƒjƒ}tj|ƒdS(Nt
OnlineCntM(    R}RR$tGetGameWorldDictByKeytSetGameWorldDictRqt OnlineCountRDtDR_OnLinePlayerCount(RPR!R‰t    gameWorldtnoteDatatactivePlayerCount((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRŠhs       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 IsCrossCentertToIntDefRMR+R,tChConfigtTYPE_Time_Format_YmdHtDoLogic_CrossCenterEventRntSendCrossServerEventRRRRRR R    RRtOnHourRtOnDayRtOnWeekRtOnMonthR
tOnYear( R!t
eventValueRPt curTimeHourt
curTimeDayt curTimeWeekt curTimeMontht curTimeYeart
serverHourRGt
serverWeekt serverMontht
serverYear((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRts<  *                  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( RRRRtSetValueIncrementRRARRBRCR¨t DoLogic_OnDay(R!teventMgrRGRHRI((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||krs|rotjd|||fƒndS|r–tjd|||fƒntjd||fƒtjd|t    j
ƒ}tjd|t    j
ƒ}|j }|j }|j }|j}|j }    |j }
|j } |j} tjƒjtj|ƒt} ||    ksv||
ksv|| ksv|| krŒt} tj|ƒn||
ks°|| ks°|| krÆt} tj|ƒn| S(NsY±¾·þÓë¿ç·þÖÐÐÄʼþÖµÏàͬ²»´¦Àí! serverEventValue=%s,centerEventValue=%s,centerServerID=%ssS±¾·þÓë¿ç·þÖÐÐÄʼþÖµ±ä»¯! serverEventValue=%s,centerEventValue=%s,centerServerID=%ssA¿ç·þÖÐÐÄ·þÎñÆ÷ʼþÖµ±ä»¯! serverEventValue=%s,centerEventValue=%ss%s(RRRRtDef_CrossCenterEventRRRtChangeStrToDatetimeR•R–RRR R    tFalseR4R¨tDoLogic_CrossCenterOnHourtDoLogic_CrossCenterOnDay(tcenterEventValuetcenterServerIDtserverEventValuetserverEventTimetcenterEventTimeR¤RGR¦R§t
centerHourt    centerDayt centerMontht
centerYeartisEvent((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR—Îs<                                 0$cCsŽtjƒjƒ}|r%dt_dStj|ƒ}tjsJ|t_dStjdkr]dS|tjdkrtdSdt_tjjƒdS(Niiiii€Q(    RRqRŽR"tg_ipyDataRecycleCheckTimetChangeDatetimeToNumt IpyGameDataPYtIPYDatatRecycle(ttimeNowt playerCountRP((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"RjRqRrRsRttGetIDtIsEmptytIsMirrorPlayerRƒt DeleteMirrortKickt IPY_GameWorldtdisMapServerCloseRt OnServerClose(R!R6RyRzR{((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"Rjtg_closeSaveDataOKRRqRŽRtClearBackupFiletPyMongoDB.DBCommonRÐtPyMongoDB.CommonRÑt    WriteBYTEtdgPlayerSaveGameServerDatat NetPackCommontSendPyPackToMapServerSelftlenR(RÐRÑtdata((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRk:s    
     (:RnR•RRRR„RÂRÌRDR¨R€R)RƒRÙR…RR"R†RvR‡RR,RR
R RRRRRRRRRR R5RJR(RRRTRNR2R3R>RiR?R‚RŠRR™RšR›RœRR—RˆRÏRk(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyt<module>sr                                                                           &    "                                  %                     5                     <