From fd70033496b4c599b9dd4ed14fd93deb847ddebd Mon Sep 17 00:00:00 2001 From: rsakeys Date: Mon, 4 May 2020 00:07:06 +0100 Subject: [PATCH] Modify and remove checks for amount of uses. --- houdini/handlers/redemption/code.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/houdini/handlers/redemption/code.py b/houdini/handlers/redemption/code.py index 655e415..b7a95fd 100644 --- a/houdini/handlers/redemption/code.py +++ b/houdini/handlers/redemption/code.py @@ -210,8 +210,7 @@ async def handle_golden_choice(p, redemption_code: str, choice: int): for card in cards: await p.add_card(p.server.cards[card.card_id]) - if code.uses is None: - await PenguinRedemptionCode.create(penguin_id=p.id, code_id=code.id) + await PenguinRedemptionCode.create(penguin_id=p.id, code_id=code.id) @handlers.handler(XTPacket('rscrt', ext='red'), pre_login=True) @@ -240,7 +239,7 @@ async def handle_send_cart(p, redemption_code: str, choice: str): awards.append(choice) await p.add_inventory(p.server.items[int(choice)], notify=False) - if code.uses is None: + if code.uses is not None: await PenguinRedemptionCode.create(penguin_id=p.id, code_id=code.id) await p.update(coins=p.coins + coins).apply()