| | |
| | |
|
| | | # 其他跨服功能
|
| | |
|
| | | # 游戏服额外处理玩家
|
| | | if GameWorld.IsMainServer():
|
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | for i in xrange(playerManager.OnlineCount()):
|
| | | curPlayer = playerManager.OnlineAt(i)
|
| | | if not GameWorld.IsNormalPlayer(curPlayer):
|
| | | continue
|
| | | PlayerOnCrossCenterEvent(curPlayer, centerEventValue)
|
| | | |
| | | PlayerBillboard.OnDay(centerEventValue)
|
| | | return
|
| | |
|
| | |
| | | return
|
| | |
|
| | | #--------------------------------------------------------
|
| | | def PlayerOnCrossCenterEvent(curPlayer, centerEventValue=0):
|
| | | def PlayerOnCrossCenterEvent(curPlayer, centerEventValue=0, gmEvent=""):
|
| | | ## 跨服中心过天
|
| | | if not centerEventValue:
|
| | | centerEventValue = DBDataMgr.GetEventTrigMgr().GetValue(ShareDefine.Def_CrossCenterEvent)
|
| | |
| | | playerEventValue = centerEventValue
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_OnCrossEvent, centerEventValue)
|
| | |
|
| | | if playerEventValue == centerEventValue:
|
| | | if playerEventValue == centerEventValue and not gmEvent:
|
| | | return
|
| | |
|
| | | centerEventTime = GameWorld.ChangeStrToDatetime("%s" % centerEventValue, ChConfig.TYPE_Time_Format_YmdH)
|
| | |
| | |
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_OnCrossEvent, centerEventValue)
|
| | |
|
| | | if (center_Day != player_Day or center_Month != player_Month or center_Year != player_Year):
|
| | | if (center_Day != player_Day or center_Month != player_Month or center_Year != player_Year or gmEvent == "GMOnDay"):
|
| | | PlayerCrossCenterOnDay(curPlayer, centerEventValue)
|
| | |
|
| | | return
|
| | |
| | |
|
| | | def PlayerOnDay(curPlayer):
|
| | | #记录玩家字典值,待初始化后执行
|
| | | if not curPlayer.GetGameServerInitOK():
|
| | | GameServerRefresh.Set_PlayerGameServerInitOK_OnDay(curPlayer , 1)
|
| | | return
|
| | | #GameServer已废弃,不再验证
|
| | | #if not curPlayer.GetGameServerInitOK():
|
| | | # GameServerRefresh.Set_PlayerGameServerInitOK_OnDay(curPlayer , 1)
|
| | | # return
|
| | |
|
| | | ondayValue = __Get_Can_OnDay(curPlayer)
|
| | | if not ondayValue:
|
| | |
| | | # @remarks 函数详细说明.
|
| | | def PlayerOnWeek(curPlayer):
|
| | | #记录玩家字典值,待初始化后执行
|
| | | if not curPlayer.GetGameServerInitOK():
|
| | | GameServerRefresh.Set_PlayerGameServerInitOK_OnWeek(curPlayer , 1)
|
| | | return
|
| | | #GameServer已废弃,不再验证
|
| | | #if not curPlayer.GetGameServerInitOK():
|
| | | # GameServerRefresh.Set_PlayerGameServerInitOK_OnWeek(curPlayer , 1)
|
| | | # return
|
| | |
|
| | | onWeekValue = __Get_Can_OnWeek(curPlayer)
|
| | | if not onWeekValue:
|
| | |
| | | # @remarks 函数详细说明.
|
| | | def PlayerOnMonth(curPlayer):
|
| | | #记录玩家字典值,待初始化后执行
|
| | | if not curPlayer.GetGameServerInitOK():
|
| | | GameServerRefresh.Set_PlayerGameServerInitOK_OnMonth(curPlayer , 1)
|
| | | return
|
| | | #GameServer已废弃,不再验证
|
| | | #if not curPlayer.GetGameServerInitOK():
|
| | | # GameServerRefresh.Set_PlayerGameServerInitOK_OnMonth(curPlayer , 1)
|
| | | # return
|
| | |
|
| | | onMonthValue = __Get_Can_OnMonth(curPlayer)
|
| | | if not onMonthValue:
|
| | |
| | | # @remarks 函数详细说明.
|
| | | def PlayerOnYear(curPlayer):
|
| | | #记录玩家字典值,待初始化后执行
|
| | | if not curPlayer.GetGameServerInitOK():
|
| | | GameServerRefresh.Set_PlayerGameServerInitOK_OnYear(curPlayer , 1)
|
| | | return
|
| | | #GameServer已废弃,不再验证
|
| | | #if not curPlayer.GetGameServerInitOK():
|
| | | # GameServerRefresh.Set_PlayerGameServerInitOK_OnYear(curPlayer , 1)
|
| | | # return
|
| | |
|
| | | curPlayerID = curPlayer.GetPlayerID()
|
| | |
|
| | |
| | | # @remarks 函数详细说明.
|
| | | def PlayerOnHour(curPlayer):
|
| | | #记录玩家字典值,待初始化后执行
|
| | | if not curPlayer.GetGameServerInitOK():
|
| | | GameServerRefresh.Set_PlayerGameServerInitOK_OnHour(curPlayer , 1)
|
| | | return
|
| | | #GameServer已废弃,不再验证
|
| | | #if not curPlayer.GetGameServerInitOK():
|
| | | # GameServerRefresh.Set_PlayerGameServerInitOK_OnHour(curPlayer , 1)
|
| | | # return
|
| | |
|
| | | curPlayerID = curPlayer.GetPlayerID()
|
| | |
|