Пример #1
0
def getCatalogItemsForHoliday(holidayId):
    holidayClass = HolidayGlobals.getHolidayClass(holidayId)
    if holidayClass != HolidayGlobals.CATALOGHOLIDAY:
        return []
    holidayConfig = HolidayGlobals.getHolidayConfig(holidayId)
    if holidayConfig not in CatalogHolidayGlobals.CatalogHolidayConfigs:
        return []
    return CatalogHolidayGlobals.CatalogHolidayConfigs[holidayConfig].get(
        'items', [])
def getCatalogItemsForHoliday(holidayId):
    holidayClass = HolidayGlobals.getHolidayClass(holidayId)
    if holidayClass != HolidayGlobals.CATALOGHOLIDAY:
        return []
    
    holidayConfig = HolidayGlobals.getHolidayConfig(holidayId)
    if holidayConfig not in CatalogHolidayGlobals.CatalogHolidayConfigs:
        return []
    
    return CatalogHolidayGlobals.CatalogHolidayConfigs[holidayConfig].get('items', [])
Пример #3
0
def getCatalogTabNameForHoliday(holidayId):
    holidayClass = HolidayGlobals.getHolidayClass(holidayId)
    if holidayId in HolidayGlobals.HOLIDAYS_WITH_CATALOGS:
        holidayName = PLocalizer.HOLIDAYIDS_TO_NAMES.get(holidayClass, 'error')
        return holidayName
    if holidayClass != HolidayGlobals.CATALOGHOLIDAY:
        return 'not-catalog-holiday'
    holidayConfig = HolidayGlobals.getHolidayConfig(holidayId)
    if holidayConfig not in CatalogHolidayGlobals.CatalogHolidayConfigs:
        return 'not-catalog-config'
    return PLocalizer.CatalogHolidayNames.get(holidayConfig,
                                              {}).get('tabName', 'no-tab-name')
def getCatalogTabNameForHoliday(holidayId):
    holidayClass = HolidayGlobals.getHolidayClass(holidayId)
    if holidayId in HolidayGlobals.HOLIDAYS_WITH_CATALOGS:
        holidayName = PLocalizer.HOLIDAYIDS_TO_NAMES.get(holidayClass, 'error')
        return holidayName
    
    if holidayClass != HolidayGlobals.CATALOGHOLIDAY:
        return 'not-catalog-holiday'
    
    holidayConfig = HolidayGlobals.getHolidayConfig(holidayId)
    if holidayConfig not in CatalogHolidayGlobals.CatalogHolidayConfigs:
        return 'not-catalog-config'
    
    return PLocalizer.CatalogHolidayNames.get(holidayConfig, { }).get('tabName', 'no-tab-name')
 def setHolidayId(self, holidayId):
     self.holidayId = HolidayGlobals.getHolidayClass(holidayId)
     self.holidayName = HolidayGlobals.getHolidayName(self.holidayId)
     self.totalPhases = InvasionGlobals.getTotalPhases(self.holidayId)
     self.mainZone = InvasionGlobals.getTotalCapturePoints(self.holidayId)
Пример #6
0
 def setHolidayId(self, holidayId):
     self.holidayId = HolidayGlobals.getHolidayClass(holidayId)
     self.holidayName = HolidayGlobals.getHolidayName(self.holidayId)
     self.totalPhases = InvasionGlobals.getTotalPhases(self.holidayId)
     self.mainZone = InvasionGlobals.getTotalCapturePoints(self.holidayId)