def parser(self, config_value): for row in config_value: item = CommonItem(row) item['formula'] = compile(item.get('formula'), '', 'eval') self._items[item.get('key')] = item return self._items
def parser(self, config_value): for row in config_value: item = CommonItem(row) item['formula'] = compile(item.get('formula'), '', 'eval') item['precondition'] = compile(item.get('precondition'), '', 'eval') self._items[item.get('key')] = item return self._items
def parser(self, config_value): for row in config_value: row["setting"] = parse(row.get("setting")) row["fristGift"] = parse(row.get("fristGift")) item = CommonItem(row) if item.get('platform') not in self._items: self._items[item.get('platform')] = {} self._items[item.get('platform')].update({item.goodsid: item}) self._items[item.id] = item return self._items
def parser(self, config_value): for row in config_value: item = CommonItem(row) if item.get('group') == 1: self._items[item.id] = item return self._items
def parser(self, config_value): for row in config_value: item = CommonItem(row) data = item.get('choose') if data: data = compile(data, '', 'eval') item['choose'] = data self._items[item.id] = item return self._items
def parser(self, config_value): self._items['pre1'] = [] self._items['pre2'] = [] self._items['str'] = [] for row in config_value: item = CommonItem(row) if item.get('prefix_1'): self._items['pre1'].append(item.get('prefix_1')) if item.get('prefix_2'): self._items['pre2'].append(item.get('prefix_2')) if item.get('office'): self._items['str'].append(item.get('office')) return self._items
def parser(self, config_value): for row in config_value: item = CommonItem(row) item["rewards"] = parse(item.get('rewards')) self._link[item.id] = item return self._link
def parser(self, config_value): for row in config_value: item = CommonItem(row) item["rewards"] = parse(item.get('rewards')) self._link[item.id] = item return self._link