示例#1
0
 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
示例#2
0
    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')
示例#3
0
 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,
     }
示例#4
0
文件: game.py 项目: zhaozw/freetime5
    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')
示例#5
0
    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')
示例#6
0
文件: game.py 项目: zhaozw/freetime5
    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')
示例#7
0
    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')
示例#8
0
 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()