Ejemplo n.º 1
0
    def initGameAfter(self):
        serverType = gdata.serverType()
        if ftlog.is_debug():
            ftlog.debug("<< |gameId, serverType:", self.gameId(), serverType)

        if serverType in (gdata.SRV_TYPE_HTTP,
                          gdata.SRV_TYPE_UTIL,
                          gdata.SRV_TYPE_ROOM,
                          gdata.SRV_TYPE_TABLE,
                          gdata.SRV_TYPE_CENTER):
            TYPluginCenter.reload(self.GAME_ID)

        if serverType == gdata.SRV_TYPE_TABLE:
            for room in gdata.rooms().values():
                if room.gameId != self.gameId():
                    continue

                if ftlog.is_debug():
                    ftlog.debug("init tables"
                                "|gameId, serverType, roomId:",
                                self.gameId(), serverType, room.roomId)

                for table in room.maptable.values():
                    TYPluginCenter.evmsg(table.gameId,
                                         PluginEvent.EV_AFTER_TABLE_CHILD_INIT,
                                         {'table': table,
                                          'tableType': table.tableType})
Ejemplo n.º 2
0
from poker.entity.game.plugin import TYPluginCenter

TYPluginCenter.reload(155, "table_viewer")
TYPluginCenter.reload(153, "table_viewer")