def __init__(self, roomDefine): super(PokerCtrlStageMatchRoom, self).__init__(roomDefine) serverType = tyglobal.serverType() # GR才进行加载 if serverType == tyglobal.SRV_TYPE_GAME_ROOM: ftlog.info('PokerCtrlStageMatchRoom.init ...', 'bigRoomId=', roomDefine.bigRoomId, 'gameId=', roomDefine.gameId, 'roomId=', roomDefine.roomId) self.shadowRoomIds = roomDefine.shadowRoomIds self.tableCount = roomDefine.tableCount self.playerNotifier = PokerMatchPlayerNotifier(self) self.tableController = PokerMatchTableController() self.matchRankRewardsIF = MatchRankRewardsIFStage() self.initDao() self.initStageMatch() ftlog.info('PokerCtrlStageMatchRoom.init ok', 'bigRoomId=', roomDefine.bigRoomId, 'gameId=', roomDefine.gameId, 'roomId=', roomDefine.roomId) else: #TODO GT 中需要使用roomConf ftlog.info('PokerCtrlStageMatchRoom.init ...', 'bigRoomId=', roomDefine.bigRoomId, 'gameId=', roomDefine.gameId, 'roomId=', roomDefine.roomId) self.shadowRoomIds = roomDefine.shadowRoomIds self.tableCount = roomDefine.tableCount
def initGameBefore(self): ftlog.info('_CrossElimination.initGameBefore IN') super(_CrossElimination, self).initGameBefore() srvType = tyglobal.serverType() if srvType in (tyglobal.SRV_TYPE_GAME_ROOM, tyglobal.SRV_TYPE_GAME_TABLE): pass ftlog.info('_CrossElimination.initGameBefore OUT')
def needLoadPlugin(cls): return tyglobal.serverType() in { tyglobal.SRV_TYPE_GAME_ROOM, tyglobal.SRV_TYPE_GAME_TABLE, tyglobal.SRV_TYPE_GAME_UTIL, tyglobal.SRV_TYPE_GAME_HTTP, tyglobal.SRV_TYPE_GAME_SINGLETON, }
def initGameBefore(self): ftlog.info('_CasualMatch.initGameBefore IN') super(_CasualMatch, self).initGameBefore() srvType = tyglobal.serverType() if srvType in (tyglobal.SRV_TYPE_GAME_ROOM, tyglobal.SRV_TYPE_GAME_TABLE): pass ftlog.info('_CasualMatch.initGameBefore OUT')
def initGameBefore(self): ftlog.info('_TGXueZhan.initGameBefore IN') super(_TGXueZhan, self).initGameBefore() srvType = tyglobal.serverType() if srvType in (tyglobal.SRV_TYPE_GAME_ROOM, tyglobal.SRV_TYPE_GAME_TABLE): from majiang2.poker2.entity.game.dao import roomdao roomdao.DaoTableScore.initialize() ftlog.info('_TGXueZhan.initGameBefore OUT')
def initGame(self): ftlog.info('TGHall.initGame IN') srvType = tyglobal.serverType() if srvType in (tyglobal.SRV_TYPE_HALL_SINGLETON, tyglobal.SRV_TYPE_HALL_UTIL): ''' 当进程为UTIL和SINGLETON时,初始化以下模块 ''' pass ftlog.info('TGHall.initGame OUT')
def initGame(self): ftlog.info('_CrossElimination.initGame IN') super(_CrossElimination, self).initGame() srvType = tyglobal.serverType() if srvType in (tyglobal.SRV_TYPE_HALL_SINGLETON, tyglobal.SRV_TYPE_HALL_UTIL): ''' 当进程为UTIL和SINGLETON时,初始化以下模块 ''' pass ftlog.info('_CrossElimination.initGame OUT')
def isOtherGameServer(cls, gameId): '''判断是否为别的游戏的GR/GT,如果是,不加载当前游戏的 plugins''' if tyglobal.serverType() not in (tyglobal.SRV_TYPE_GAME_ROOM, tyglobal.SRV_TYPE_GAME_TABLE): return False return gameId != tyglobal.gameId()