Add support for MVP packs with set team
This commit is contained in:
parent
d50595d49a
commit
78bcdc07bf
@ -696,6 +696,8 @@ class Economy(commands.Cog):
|
||||
p_group = f'Premium-Team-{pack["pack_team"]["id"]}-{pack["pack_team"]["sname"]}'
|
||||
elif pack['pack_type']['name'] == 'Team Choice':
|
||||
p_group = f'Team Choice-Team-{pack["pack_team"]["id"]}-{pack["pack_team"]["sname"]}'
|
||||
elif pack['pack_type']['name'] == 'MVP':
|
||||
p_group = f'MVP-Team-{pack["pack_team"]["id"]}-{pack["pack_team"]["sname"]}'
|
||||
|
||||
elif pack['pack_cardset'] is not None:
|
||||
if pack['pack_type']['name'] == 'Standard':
|
||||
|
||||
@ -3037,9 +3037,9 @@ async def open_choice_pack(this_pack, team: dict, context, cardset_id: Optional[
|
||||
else:
|
||||
rarity_id = 2
|
||||
|
||||
# HAX FOR SOCC TO GET HIS MVP PACK
|
||||
if (team['abbrev'] in ['KSK', 'NJY']) and (datetime.datetime.today().day == 24):
|
||||
rarity_id = 5
|
||||
# # HAX FOR SOCC TO GET HIS MVP PACK
|
||||
# if (team['abbrev'] in ['KSK', 'NJY']) and (datetime.datetime.today().day == 24):
|
||||
# rarity_id = 5
|
||||
|
||||
min_rarity = rarity_id
|
||||
while len(players) < 4 and rarity_id < 10:
|
||||
@ -3100,6 +3100,8 @@ async def open_choice_pack(this_pack, team: dict, context, cardset_id: Optional[
|
||||
params = [
|
||||
('min_rarity', min_rarity), ('max_rarity', rarity_id), ('limit', 4), ('in_packs', True)
|
||||
]
|
||||
if 'pack_team' in this_pack:
|
||||
params.append(('franchise', this_pack['pack_team']['lname']))
|
||||
if cardset_id is not None:
|
||||
params.append(('cardset_id', cardset_id))
|
||||
pl = await db_get('players/random', params=params)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user