Пример #1
0
    def setUp(self):
        self.testContext.startMock()
        self.buy_send_prize_mock = mock._patch_multiple(
            'dizhu.activitynew.quweitask',
            loadStatusData=loadStatusData,
            saveStatusData=saveStatusData)
        self.buy_send_prize_mock.start()
        self.testContext.configure.setJson('poker:global',
                                           {'config.game.ids': [6, 9999]},
                                           None)
        self.testContext.configure.setJson('game:9999:map.clientid',
                                           clientIdMap, 0)
        self.testContext.configure.setJson('poker:map.clientid', clientIdMap,
                                           None)
        self.testContext.configure.setJson('game:9999:item', item_conf, 0)
        self.testContext.configure.setJson('game:9999:products', products_conf,
                                           0)
        self.testContext.configure.setJson('game:6:store:tc',
                                           store_template_conf, None)
        self.testContext.configure.setJson('game:6:store:vc', store_vc_conf,
                                           None)
        self.testContext.configure.setJson('game:6:activity.new',
                                           activity_new_conf, 0)

        self.testContext.gdataTest.setGame(TGDizhu)

        hallitem._initialize()
        hallstore._initialize()
        activitysystemnew._initialize()
Пример #2
0
 def setUp(self):
     self.testContext.startMock()
     self.testContext.configure.setJson('game:9999:map.clientid', clientIdMap, 0)
     self.testContext.configure.setJson('game:9999:item', item_conf, 0)
     self.testContext.configure.setJson('game:9999:products', products_conf, 0)
     self.testContext.configure.setJson('game:9999:store', store_template_conf, 0)
     self.testContext.configure.setJson('game:9999:store', store_default_conf, clientIdMap[self.clientId])
     hallitem._initialize()
     hallstore._initialize()
Пример #3
0
 def setUp(self):
     self.testContext.startMock()
     self.testContext.configure.setJson('poker:global', {'config.game.ids':[6,9999]}, None)
     self.testContext.configure.setJson('game:9999:map.clientid', clientIdMap, 0)
     self.testContext.configure.setJson('poker:map.clientid', clientIdMap, None)
     self.testContext.configure.setJson('game:9999:item', item_conf, 0)
     self.testContext.configure.setJson('game:9999:products', products_conf, 0)
     self.testContext.configure.setJson('game:6:store:tc', store_template_conf, None)
     self.testContext.configure.setJson('game:6:store:vc', store_vc_conf, None)
     self.testContext.configure.setJson('game:6:activity.new', activity_new_conf, 0)
     
     hallitem._initialize()
     hallstore._initialize()
     activitysystemnew._initialize()
Пример #4
0
 def setUp(self):
     self.testContext.startMock()
     self.testContext.configure.setJson('game:9999:map.clientid', clientIdMap, 0)
     self.testContext.configure.setJson('game:9999:item', item_conf, 0)
     self.testContext.configure.setJson('game:9999:popwnd', popwnd_conf, 0)
     self.testContext.configure.setJson('game:9999:products', products_conf, 0)
     self.testContext.configure.setJson('game:9999:store', store_template_conf, 0)
     self.testContext.configure.setJson('game:9999:store', store_default_conf, clientIdMap[self.clientId])
     self.testContext.configure.setJson('game:9999:vip', vip_conf, 0)
     
     hallitem._initialize()
     hallstore._initialize()
     hallpopwnd._initialize()
     hallvip._initialize()
     
     self.testContext.userDB.setAttrs(self.userId, ['createTime'], ['2016-04-03 17:18:05.985092'])
Пример #5
0
    def initGame(self):
        from hall.entity import hallaccount
        self._account = hallaccount  # 大厅的账户处理类
        serverType = gdata.serverType()

        if serverType == gdata.SRV_TYPE_CENTER:
            centers = gdata.serverTypeMap().get(gdata.SRV_TYPE_CENTER, [])[:]
            centers.sort()
            sid = gdata.serverId()
            inits = gdata.centerServerLogics().get(sid, [])
            # 轮盘开奖信息的监听
            from hall.servers.center.rpc.roulette_remote import sendReward
            globalEventBus.subscribe(EventHeartBeat, sendReward)
            if inits:
                for pkg in inits:
                    ftlog.info('init center logic of ->', pkg)
                    exec 'from %s import _initialize; _initialize(1)' % (pkg)

        if serverType == gdata.SRV_TYPE_UTIL:
            from hall.servers.util.account_handler import updateOnLineInfos
            globalEventBus.subscribe(EventHeartBeat, updateOnLineInfos)
            # 在线信息初始化, ONLIE处理必须在UTIL服务
            from hall.entity import hallonline
            hallonline._initialize()

        if serverType == gdata.SRV_TYPE_TABLE or serverType == gdata.SRV_TYPE_ROOM:
            from hall.servers.room.room import reportRoomOnlineInfos
            globalEventBus.subscribe(EventHeartBeat, reportRoomOnlineInfos)
            from hall.entity import hallchatlog
            hallchatlog._initialize()

        # 注意: 各个模块间有先后初始化的顺序
        from hall.entity import hallitem, hallstore, hallvip, hallbenefits, \
            hallranking, hallshare, hallpromote, hallfree, hallgamelist, hallgamelist2, \
            halldailycheckin, hallmenulist, hallcoupon, hallmoduletip, \
            hallrename, hallads, hallflipcardluck, hallpopwnd, hallstartchip, \
            fivestarrate, match360kp, neituiguang, hallstocklimit, \
            hall_first_recharge, hallroulette, hallled, hall_exit_remind
        from hall.entity.hallactivity import activity
        from hall.entity.halltmpact import tmp_activity
        from hall.entity.hall_red_envelope import hall_red_envelope

        # 道具初始化
        hallitem._initialize()
        # 限购初始化
        hallstocklimit._initialize()
        # 商城初始化
        hallstore._initialize()
        # VIP系统初始化
        hallvip._initialize()
        # 救济金系统初始化
        hallbenefits._initialize()
        # 用户初始基金初始化
        hallstartchip._initialize()
        halldailycheckin._initialize()
        # 排行榜
        hallranking._initialize(0)
        # 活动系统初始化
        activity._initialize()
        hallcoupon._initialize()
        hallshare._initialize()
        hallgamelist._initialize()
        hallgamelist2._initialize()
        hallmenulist._initialize()
        hallrename._initialize()
        hallmoduletip._initialize()
        hallads._initialize()
        hallflipcardluck._initialize()
        hallpopwnd._initialize()
        hallpromote._initialize()
        hallfree._initialize()
        fivestarrate._initialize()
        match360kp._initialize()
        neituiguang._initialize()

        from hall.entity import halltask
        halltask.initialize()

        # 默认配置初始化
        hallmoduledefault._initialize()
        halllocalnotification._initialize()
        # 首冲礼包配置
        hall_first_recharge._initialize()
        tmp_activity._initialize()
        # 红包模块配置初始化
        hall_red_envelope._initialize()
        # 钻石抽奖初始化
        hallroulette._initialize()
        # led配置初始化
        hallled._initializeConfig()
        # 退出提醒
        hall_exit_remind._initialize()
        # 三方控制模块开关
        hall_third_sdk_switch._initialize()
        # 域名配置初始化
        halldomains._initialize()
        # 插件升级模块初始化
        hall_game_update._initialize()
        # 登录奖励模块初始化
        hall_login_reward._initialize()
        # 道具转换模块初始化
        hall_item_exchange._initialize()
        # 自建桌房间号初始化
        hall_friend_table._initialize()
        # 小推广系统初始化
        from hall.entity import hall_simple_invite
        hall_simple_invite.initialize()
        # 房卡购买提示信息模块初始化
        from hall.entity import hall_fangka_buy_info
        hall_fangka_buy_info._initialize()
Пример #6
0
    def initGame(self):
        from hall.entity import hallaccount
        self._account = hallaccount  # 大厅的账户处理类
        serverType = gdata.serverType()

        if serverType == gdata.SRV_TYPE_CENTER:
            centers = gdata.serverTypeMap().get(gdata.SRV_TYPE_CENTER, [])[:]
            centers.sort()
            sid = gdata.serverId()
            inits = gdata.centerServerLogics().get(sid, [])
            # 轮盘开奖信息的监听
            from hall.servers.center.rpc.roulette_remote import sendReward
            globalEventBus.subscribe(EventHeartBeat, sendReward)
            if inits:
                for pkg in inits:
                    ftlog.info('init center logic of ->', pkg)
                    exec 'from %s import _initialize; _initialize(1)' % (pkg)

        if serverType == gdata.SRV_TYPE_UTIL:
            from hall.servers.util.account_handler import updateOnLineInfos
            globalEventBus.subscribe(EventHeartBeat, updateOnLineInfos)
            # 在线信息初始化, ONLIE处理必须在UTIL服务
            from hall.entity import hallonline
            hallonline._initialize()

        if serverType == gdata.SRV_TYPE_TABLE or serverType == gdata.SRV_TYPE_ROOM:
            from hall.servers.room.room import reportRoomOnlineInfos
            globalEventBus.subscribe(EventHeartBeat, reportRoomOnlineInfos)
            from hall.entity import hallchatlog
            hallchatlog._initialize()

        # 注意: 各个模块间有先后初始化的顺序
        from hall.entity import hallitem, hallstore, hallvip, hallbenefits, \
            hallranking, hallshare, hallpromote, hallfree, hallgamelist, hallgamelist2, \
            halldailycheckin, hallmenulist, hallcoupon, hallmoduletip, \
            hallrename, hallads, hallflipcardluck, hallpopwnd, hallstartchip, \
            fivestarrate, match360kp, neituiguang, hallstocklimit, \
            hall_first_recharge, hallroulette, hallled, hall_exit_remind
        from hall.entity.hallactivity import activity
        from hall.entity.halltmpact import tmp_activity
        from hall.entity.hall_red_envelope import hall_red_envelope

        # 道具初始化
        hallitem._initialize()
        # 限购初始化
        hallstocklimit._initialize()
        # 商城初始化
        hallstore._initialize()
        # VIP系统初始化
        hallvip._initialize()
        # 救济金系统初始化
        hallbenefits._initialize()
        # 用户初始基金初始化
        hallstartchip._initialize()
        halldailycheckin._initialize()
        # 排行榜
        hallranking._initialize(0)
        # 活动系统初始化
        activity._initialize()
        hallcoupon._initialize()
        hallshare._initialize()
        hallgamelist._initialize()
        hallgamelist2._initialize()
        hallmenulist._initialize()
        hallrename._initialize()
        hallmoduletip._initialize()
        hallads._initialize()
        hallflipcardluck._initialize()
        hallpopwnd._initialize()
        hallpromote._initialize()
        hallfree._initialize()
        fivestarrate._initialize()
        match360kp._initialize()
        neituiguang._initialize()

        from hall.entity import halltask
        halltask.initialize()

        # 默认配置初始化
        hallmoduledefault._initialize()
        halllocalnotification._initialize()
        # 首冲礼包配置
        hall_first_recharge._initialize()
        tmp_activity._initialize()
        # 红包模块配置初始化
        hall_red_envelope._initialize()
        # 钻石抽奖初始化
        hallroulette._initialize()
        # led配置初始化
        hallled._initializeConfig()
        # 退出提醒
        hall_exit_remind._initialize()
        # 三方控制模块开关
        hall_third_sdk_switch._initialize()
        # 域名配置初始化
        halldomains._initialize()
        # 插件升级模块初始化
        hall_game_update._initialize()
        # 登录奖励模块初始化
        hall_login_reward._initialize()
        # 道具转换模块初始化
        hall_item_exchange._initialize()
        # 自建桌房间号初始化
        hall_friend_table._initialize()
        # 小推广系统初始化
        from hall.entity import hall_simple_invite
        hall_simple_invite.initialize()
        # 房卡购买提示信息模块初始化
        from hall.entity import hall_fangka_buy_info
        hall_fangka_buy_info._initialize()