hxp
2025-12-20 c32f8d566f4dd0800a2836058aef06b6461df668
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
%XCic@s&ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZd„Zd„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#„Z5dS($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_Week0scCs6tjƒjtjtjjtjjƒƒdƒdS(Ni(RRRRRRt isocalendarR(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytSet_Server_Week1s2cCstjƒjtjƒS(N(RRRRtDef_Server_Day(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytGet_Server_Day4scCs)tjƒjtjtjjƒjƒdS(N(RRRRRRRtday(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytSet_Server_Day5s%cCstjƒjtjƒS(N(RRRRtDef_Server_Hour(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytGet_Server_Hour8scCs)tjƒjtjtjjƒjƒdS(N(RRRRRRRthour(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytSet_Server_Hour9s%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.pyRJs
 
c    Cstjr dStjƒjƒ}tjd|ƒtjƒtj    ƒt
ƒt j ƒt tjƒƒt_tjƒjtjƒ}tjƒjtjƒ}|dks²|dkr×t|rÁ|nt tjƒƒƒntƒt|ƒt|ƒtjdƒtjƒ}|rn|tjƒ}tjƒjtjƒd}tjƒjtjƒ}tjƒjtjƒd}tjd|||||fƒtt_dS(Ns*·þÎñÆ÷Æô¶¯³õʼ»¯InitGameWorld: serverID=%sisR=============================== ·þÎñÆ÷Æô¶¯³É¹¦ ===================================isX·þÎñÆ÷Æô¶¯³É¹¦: ServerGroupID=%s,serverID=%s,serverDay=%s,isMixServer=%s,mixServerDay=%s(t
PyGameDatatg_initGameTimeRt GetGameWorldt GetServerIDRRt OnServerStartt
ItemCommont
InitPyItemt LoadDBPlayertPlayerViewCachet    LoadRobottintttimeRRRtDef_InitOpenServerTimetDef_OpenServerWeekdaytSetInitOpenServerTimet__DoMixServerInitt OnHighProcesstOnMinutet IsCrossServertGetServerGroupIDt Def_ServerDaytDef_IsMixServertDef_MixServerDaytTruetg_serverInitOK(    R!tserverIDtinitOpenServerTimetopenServerWeekdayt isCrossServert serverGroupIDt    serverDayt isMixServert mixServerDay((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR Qs8    
 
 
%
 
           cCsdS(N((R!((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytAllMapServerInitOK{scCstjƒrdSdS(N(RR4(((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_SetOpenServerTimeRRtChangeTimeNumToStrtOnNewServerOpentGetTick(topenServerTimeR;tcurTimetsetOpenServerTime((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pytGMSetOpenServerTime„s # cCsztjƒjtjƒ}|s"dStjƒjtjƒ}||krJdSttjƒƒ}||krldSt|ƒdS(N(    RRRRRER.R,R-RG(R!RKtcurOpenServerTimeRJ((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%RRRRRRER.t    DelAllKeyt GetFamilyMgrt DelAllFamilyt
GetMailMgrt
DelAllMailtGetPlayerViewCacheMgrt DelAllCacheR0RCtSaveGameServerDatat SendGameError(R!R;RKt excludeList((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRG¬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/RRRE(tinitTimet openDatetimeR=RK((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( RRRRR7RtDebugLogtDef_IsMixServerInitOKRRR6tDef_LastMixServerDay(RAtisMixServerInitOKR@((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 ƒt|ƒdS(Nsʱ¼ä»Øµ÷ÁË: lastProcessTime=%sii
s/ʱ¼äÎó²î¹ý´ó: passSeconds=%s,lastProcessTime=%s(R"R#R,R-tg_highProcessTimeRRRFtOnFixServerTimeProcesstg_serverClosingtCheckCloseMapOKRt GetUserCtrlDBtonSecondProcessR3(R!RJt passSeconds((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR2ó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.pyRcs  cCs¸tjƒ}|j}|tjkr(dS|t_t|ƒtj|ƒt|ƒ|ddkrrt    ||ƒnt
j|ƒt jƒt jƒt jƒtj|ƒt|ƒdS(Nii(RtGetCurrentTimetminuteR"tg_minuteProcessRNRR3tDoLogic_GameWorldEvenByTimet
OnMinute_5t PlayerControlt PlayerFamilyt PlayerOnlinet    BattleObjtObjPoolt__CheckIpyDataRecycle(R!RJt    curMinute((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR3&s"         
 
 
 
 
 
cCst||ƒdS(N(tDisposeGameActivePlayer(RJR!((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRxDs cCsg|j}tjƒ}|jdƒ}||kr4dS|jd|ƒtjƒjƒ}tj|ƒdS(Nt
OnlineCntM(    RuRR$tGetGameWorldDictByKeytSetGameWorldDictRit OnlineCounttDataRecordPacktDR_OnLinePlayerCount(RJR!Rt    gameWorldtnoteDatatactivePlayerCount((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyR€Is       c CsMtjjƒ}|j}|j}tjj|ƒd}|j}|j}tƒ\}}}    }
} ||ks‘||ks‘|
|ks‘| |kr¥tƒt    |ƒn||ksÉ|
|ksÉ| |krÝt
ƒt |ƒn|    |krýt ƒt |ƒn|
|ks| |kr)tƒt|ƒn| |krItƒt|ƒndS(Ni(RRRRRR R    RRtOnHourRtOnDayRtOnWeekRtOnMonthR
tOnYear( R!RJt curTimeHourt
curTimeDayt curTimeWeekt curTimeMontht curTimeYeart
serverHourR@t
serverWeekt serverMontht
serverYear((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyRwUs.                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( RRRRtSetValueIncrementRR6RR7R8R˜t DoLogic_OnDay(R!teventMgrR@RARB((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  cCsŽtjƒjƒ}|r%dt_dStj|ƒ}tjsJ|t_dStjdkr]dS|tjdkrtdSdt_tjjƒdS(Niiiii€Q(    RRiR„R"tg_ipyDataRecycleCheckTimetChangeDatetimeToNumt IpyGameDataPYtIPYDatatRecycle(ttimeNowt playerCountRJ((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"RdRiRjRkRltGetIDtIsEmptytIsMirrorPlayerRyt DeleteMirrortKickt IPY_GameWorldtdisMapServerCloseRt OnServerClose(R!R;RqRrRs((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"Rdtg_closeSaveDataOKRRiR„RtClearBackupFiletPyMongoDB.DBCommonR±tPyMongoDB.CommonR²t    WriteBYTEtdgPlayerSaveGameServerDatat NetPackCommontSendPyPackToMapServerSelftlenR(R±R²tdata((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyReÔs    
     (6RRRRzR£R­R…R˜R*RyRºR{RR"R'R|RnR}RR-RR
R RRRRRRRRRR RCR)RLRNRGR0R1R2RcR3RxR€RwRŠR‹RŒRRŽR~R°Re(((suD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\GameWorldEvent.pyt<module>sj                                                                         *                                  $                     )