def event_dispatcher_showBattleResultsWindow(base, arenaUniqueID, cnt=0): if cnt < 5 and not swf_loaded_info.swf_loaded_get('xvm_lobby_ui.swf'): BigWorld.callback( 0, lambda: event_dispatcher_showBattleResultsWindow( base, arenaUniqueID, cnt + 1)) else: base(arenaUniqueID)
def event_dispatcher_showBattleResultsWindow(base, arenaUniqueID, cnt=0): if cnt < 5 and not 'xvm_lobby_ui.swf' in map(str.lower, xfw_mods_info.loaded_swfs): BigWorld.callback( 0, lambda: event_dispatcher_showBattleResultsWindow( base, arenaUniqueID, cnt + 1)) else: base(arenaUniqueID)
def _StatsComposer__init__(base, self, *args): try: base(self, *args) self._block._meta._meta.update({'xvm_data': {}}) self._block._meta._unregistered.add('xvm_data') self._block.addNextComponent(_XVM_DATA_STATS_BLOCK.clone()) except: err(traceback.format_exc())
def _StatsComposer__init__(base, self, *args): try: base(self, *args) self._block._meta._meta.update({'xvm_data':{}}) self._block._meta._unregistered.add('xvm_data') self._block.addNextComponent(_XVM_DATA_STATS_BLOCK.clone()) except: err(traceback.format_exc())
def BattleResultsWindow_as_setDataS(base, self, data): try: linkage = data['tabInfo'][0]['linkage'] if linkage == 'EpicStatsUI' and not config.get( 'battleResults/showStandardFrontLineInterface', True): linkage = 'CommonStats' if linkage == 'CommonStats': linkage = 'com.xvm.lobby.ui.battleresults::UI_CommonStats' if linkage == 'com.xvm.lobby.ui.battleresults::UI_CommonStats': data['tabInfo'][0]['linkage'] = linkage # Use data['common']['regionNameStr'] value to transfer XVM data. # Cannot add in data object because DAAPIDataClass is not dynamic. #log(data['xvm_data']) data['xvm_data']['regionNameStr'] = data['common']['regionNameStr'] data['xvm_data']['arenaUniqueID'] = str( self._BattleResultsWindow__arenaUniqueID) data['common']['regionNameStr'] = simplejson.dumps( data['xvm_data'], separators=(',', ':')) del data['xvm_data'] except Exception as ex: err(traceback.format_exc()) return base(self, data)
def _DynamicPremiumState_getVO(base, self): res = base(self) if self._value in [BATTLE_RESULTS_PREMIUM_STATES.PREMIUM_ADVERTISING, BATTLE_RESULTS_PREMIUM_STATES.PREMIUM_INFO]: self._value = BATTLE_RESULTS_PREMIUM_STATES.PREMIUM_EARNINGS return super(DynamicPremiumState, self).getVO() #res = self._value = BATTLE_RESULTS_PREMIUM_STATES.PREMIUM_BONUS return res
def BCBattleResult_as_setDataS(base, self, data): try: #data['xvm_data']['regionNameStr'] = data['common']['regionNameStr'] #data['common']['regionNameStr'] = simplejson.dumps(data['xvm_data']) del data['xvm_data'] except Exception as ex: err(traceback.format_exc()) return base(self, data)
def BCBattleResult_as_setDataS(base, self, data): try: #data['xvm_data']['regionNameStr'] = data['common']['regionNameStr'] #data['common']['regionNameStr'] = simplejson.dumps(data['xvm_data']) del data['xvm_data'] except Exception as ex: err(traceback.format_exc()) return base(self, data)
def BattleResultsWindow_as_setDataS(base, self, data): try: # Use data['common']['regionNameStr'] value to transfer XVM data. # Cannot add in data object because DAAPIDataClass is not dynamic. #log(data['xvm_data']) data['xvm_data']['regionNameStr'] = data['common']['regionNameStr'] data['common']['regionNameStr'] = simplejson.dumps(data['xvm_data']) del data['xvm_data'] except Exception as ex: err(traceback.format_exc()) return base(self, data)
def BattleResultsWindow_as_setDataS(base, self, data): try: data['tabInfo'][0]['linkage'] = 'com.xvm.lobby.ui.battleresults::UI_CommonStats' # Use data['common']['regionNameStr'] value to transfer XVM data. # Cannot add in data object because DAAPIDataClass is not dynamic. #log(data['xvm_data']) data['xvm_data']['regionNameStr'] = data['common']['regionNameStr'] data['common']['regionNameStr'] = simplejson.dumps(data['xvm_data']) del data['xvm_data'] except Exception as ex: err(traceback.format_exc()) return base(self, data)
def BCBattleResult_as_setDataS(base, self, data): try: del data['xvm_data'] except Exception as ex: err(traceback.format_exc()) return base(self, data)
def event_dispatcher_showBattleResultsWindow(base, arenaUniqueID, cnt=0): is_swf = 'swf_file_name' in xfw_mods_info.info.get('xvm_battleresults', {}) if cnt < 2 or (cnt < 5 and is_swf and not 'xvm_battleresults_ui.swf' in xfw_mods_info.loaded_swfs): BigWorld.callback(0, lambda:event_dispatcher_showBattleResultsWindow(base, arenaUniqueID, cnt+1)) else: base(arenaUniqueID)
def event_dispatcher_showBattleResultsWindow(base, arenaUniqueID, cnt=0): if cnt < 5 and not 'xvm_lobby_ui.swf' in map(str.lower, xfw_mods_info.loaded_swfs): BigWorld.callback(0, lambda:event_dispatcher_showBattleResultsWindow(base, arenaUniqueID, cnt+1)) else: base(arenaUniqueID)