| | |
| | | import CrossRealmPK
|
| | | import CrossRealmMsg
|
| | | import CrossRealmPlayer
|
| | | import CrossBattlefield
|
| | | import CrossActionControl
|
| | | import PlayerFBHelpBattle
|
| | | import PlayerFamilyRedPacket
|
| | |
| | | import PlayerFamilyParty
|
| | | import GameWorldFamilyWar
|
| | | import GameWorldArena
|
| | | import CrossLuckyCloudBuy
|
| | | import AuctionHouse
|
| | | import PlayerXMZZ
|
| | | import PlayerLove
|
| | | import PlayerTeam
|
| | | import PyGameData
|
| | | import CrossBoss
|
| | | import ChPlayer
|
| | | import PyDataManager
|
| | | import GameWorldOpenServerCampaign
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | # 通知开服天数
|
| | | #openServerDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ServerDay)
|
| | | #GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_ServerDay, openServerDay)
|
| | | GameWorldOpenServerCampaign.DoOnDay()
|
| | | #清理过期补偿
|
| | | PlayerCompensation.ClearUpTimeOutCompensation()
|
| | | #PlayerGeTui.ClearFMTGeTuiLimit()
|
| | |
| | | PlayerBourse.OverTimeItemsDeal()
|
| | | # 仙盟联赛
|
| | | GameWorldFamilyWar.DoOnDay()
|
| | | # 情缘
|
| | | PlayerLove.DoOnDay()
|
| | | # 云购
|
| | | CrossLuckyCloudBuy.DoOnDay()
|
| | | return
|
| | |
|
| | | def OnDayEx(tick):
|
| | |
| | | #拍卖行
|
| | | AuctionHouse.OnAuctionItemTimeProcess(curTime, tick)
|
| | |
|
| | | #情缘
|
| | | PlayerLove.OnTimeProcess(curTime, tick)
|
| | | |
| | | #每整分钟处理一次
|
| | | curDateTime = datetime.datetime.today()
|
| | | curMinute = curDateTime.minute
|
| | |
| | | GameWorldActionControl.Dispose_FBStateTime()
|
| | | #跨服PK
|
| | | CrossRealmPK.OnMinuteProcess()
|
| | | CrossBattlefield.OnMinuteProcess()
|
| | | #处理重开服务器后, 活动继续开启逻辑根据天数
|
| | | #GameWorldActionControl.Dispose_Action_GoOn_ByDay(tick)
|
| | | #触发世界等级
|
| | |
| | | PlayerFamily.UpdFamilyTotalFightPower()
|
| | | PlayerFamilyRedPacket.CheckDelRedpacketData()
|
| | |
|
| | | return
|
| | |
|
| | | def OnReloadConfig():
|
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | | def InitGameWorld(tick):
|
| | | #标记GameWorld初始化完成
|
| | | GameWorld.GetGameWorld().SetDict(ChConfig.Def_WorldKey_IsGameWorldInit, int(time.time()))
|
| | | PlayerControl.LoadDBPlayer()
|
| | | #初始化游戏时钟
|
| | | GameWorld.GetGameWorld().SetTickTypeCount(ChConfig.TYPE_Tick_Count)
|
| | | #转移运营活动旧db记录key value 到 新记录
|
| | | GameWorldActionControl.TransferOperationActDBKeyValue()
|
| | | #初始话开服时间、星期几
|
| | | initOpenServerTime = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_InitOpenServerTime)
|
| | | openServerWeekday = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_OpenServerWeekday)
|
| | |
| | | GameWorldArena.OnServerStart()
|
| | | #跨服PK
|
| | | CrossRealmPK.OnGameServerInitOK()
|
| | | #跨服战场
|
| | | CrossBattlefield.OnServerStart()
|
| | | #红包
|
| | | PlayerFamilyRedPacket.OnServerStart()
|
| | | #云购
|
| | | CrossLuckyCloudBuy.OnServerStart()
|
| | | #世界boss被杀次数重置
|
| | | #GameWorldBoss.CheckResetBossKilledCntOnServerInit()
|
| | |
|
| | |
| | | AuctionHouse.OnGameServerInitOK()
|
| | | # 注意:跨服相关信息的调用需放在最后,不然可能导致服务器未启动功能或者功能未加载成功导致跨服服务器与子服之间的数据同步可能出现异常的情况
|
| | | CrossRealmMsg.OnGameServerInitOK()
|
| | | if PyGameData.g_allMapServerInitOK:
|
| | | GameWorld.Log("InitGameWorld时AllMapServerInitOK已触发则补触发一次!")
|
| | | GameWorld.SendGameError("GameWarning", "InitGameWorld later than AllMapServerInitOK")
|
| | | AllMapServerInitOK(tick)
|
| | | |
| | | return
|
| | |
|
| | | def DoCheckNewServerOpen(tick):
|
| | |
| | |
|
| | | PyGameData.g_sortBOSSRefreshList = [] # boss刷新信息记录缓存重置, 不重置会导致通知前端的boss信息为空
|
| | |
|
| | | GameWorldArena.OnServerStart()
|
| | | |
| | | CrossBattlefield.OnServerStart()
|
| | | |
| | | PlayerDBGSEvent.SetInitOpenServerTime(setOpenServerTime)
|
| | |
|
| | | ReadChConfig.ReloadConfig()
|
| | |
| | | # @return None
|
| | | # @remarks 当一个mapServer开启时,
|
| | | def AllMapServerInitOK(tick):
|
| | | PyGameData.g_allMapServerInitOK = True
|
| | | if not GameWorld.GetGameWorld().GetDictByKey(ChConfig.Def_WorldKey_IsGameWorldInit):
|
| | | GameWorld.Log("AllMapServerInitOK时GameServer还未启动好!")
|
| | | return
|
| | | #通知所有地图服务器初始化成功, 同步时间
|
| | | GameWorld.GetGameWorld().Notify_AllMapServerInitOK(GameWorld.GetCurrentDataTimeStr())
|
| | |
|
| | |
| | | GameWorldFamilyWar.OnMapServerInitOK()
|
| | |
|
| | | # 跨服服务器状态
|
| | | GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_CrossServerTime, PyGameData.g_crossServerTimeInfo)
|
| | | isCrossServerOpen = GameWorld.GetGameWorld().GetDictByKey(ShareDefine.Def_Notify_WorldKey_CrossServerOpen)
|
| | | GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_CrossServerOpen, isCrossServerOpen)
|
| | | GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_CrossZoneName, PyGameData.g_crossZoneName)
|
| | |
|
| | | # 跨服PK
|
| | | CrossRealmPK.OnMapServerInitOK()
|
| | | #跨服战场
|
| | | CrossBattlefield.OnMapServerInitOK()
|
| | | # 本服竞技场
|
| | | GameWorldArena.SendMapServerArenaInfo()
|
| | | # 幸运云购
|
| | | CrossLuckyCloudBuy.OnMapServerInitOK()
|
| | |
|
| | | SendAllMapGlobalDropInfo() # 全局掉落控制
|
| | |
|
| | |
| | | PlayerFamily.RandomFakeFamily()
|
| | | #缥缈仙域
|
| | | PlayerFairyDomain.OnMapServerInitOK()
|
| | | #情侣信息
|
| | | PyDataManager.GetDBPyCoupleManager().SendMapServerCoupleInfo()
|
| | | # 记录服务器是否正常开启完毕
|
| | | getUrl = ReadChConfig.GetPyMongoConfig("EventReport", "OpenStateUrl") + "?Type=MapInit&MapCount=%s"%GameWorld.GetGameWorld().GetGameMapManager().GetCount()
|
| | | GameWorld.GetGameWorld().EventReport_EventReport("", "", "", "", 0, getUrl)
|
| | |
| | | ChPlayer.SavePlayerLVData()
|
| | | PlayerFBHelpBattle.OnServerClose()
|
| | | CrossActionControl.OnServerClose()
|
| | | CrossBattlefield.OnServerClose()
|
| | | PlayerFamilyRedPacket.OnServerClose()
|
| | | CrossLuckyCloudBuy.OnServerClose()
|
| | | GameWorldArena.OnServerClose()
|
| | | PlayerLove.OnServerClose()
|
| | | GameWorld.Log("通知C++关服!")
|
| | | GameWorld.GetGameWorld().OnServerClose()
|
| | |
|