forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-09-08 19:48:13 +02:00
parent 74f868ffe8
commit 3e28a1db56
1 changed files with 5 additions and 3 deletions

View File

@ -72,16 +72,18 @@ def shop(v):
award["owned_num"] = row['last_award_count']
owned.append(award)
awards = AWARDS.values()
awards1 = AWARDS.values()
awards2 = []
if v.patron:
for val in awards:
for val in awards1:
if v.patron == 1: val["price"] = int(val["price"]*0.90)
elif v.patron == 2: val["price"] = int(val["price"]*0.85)
elif v.patron == 3: val["price"] = int(val["price"]*0.80)
elif v.patron == 4: val["price"] = int(val["price"]*0.75)
else: val["price"] = int(val["price"]*0.70)
awards2.append(val)
return render_template("shop.html", owned=owned, awards=list(awards), v=v)
return render_template("shop.html", owned=owned, awards=awards2, v=v)
@app.post("/buy/<award>")
@auth_required