diff --git a/houdini/handlers/play/pet.py b/houdini/handlers/play/pet.py index 3354908..66320f1 100644 --- a/houdini/handlers/play/pet.py +++ b/houdini/handlers/play/pet.py @@ -629,7 +629,7 @@ async def handle_add_puffle_care_item(p, item_id: int): if care_item_id in p.puffle_items: penguin_care_item = p.puffle_items[care_item_id] - if care_item.play_external == "superplay": + if penguin_care_item.play_external == "superplay": return await p.send_error(408) if penguin_care_item.quantity >= 100: diff --git a/houdini/handlers/redemption/code.py b/houdini/handlers/redemption/code.py index e8abd1c..9452e5c 100644 --- a/houdini/handlers/redemption/code.py +++ b/houdini/handlers/redemption/code.py @@ -144,7 +144,7 @@ async def handle_code_legacy(p, redemption_code: str): query = RedemptionCode.distinct(RedemptionCode.id)\ .load(cards=RedemptionAwardCard.distinct(RedemptionAwardCard.card_id), items=RedemptionAwardItem.distinct(RedemptionAwardItem.item_id))\ - .query.where(RedemptionCode.code == redemption_code.upper()) + .query.where(RedemptionCode.code.upper() == redemption_code.upper()) codes = await query.gino.all() if not codes: return await p.send_error(720) @@ -200,7 +200,7 @@ async def handle_code_vanilla(p, redemption_code: str): locations=RedemptionAwardLocation.distinct(RedemptionAwardLocation.location_id), puffles=RedemptionAwardPuffle.distinct(RedemptionAwardPuffle.puffle_id), puffle_items=RedemptionAwardPuffleItem.distinct(RedemptionAwardPuffleItem.puffle_item_id))\ - .query.where(RedemptionCode.code == redemption_code.upper()) + .query.where(RedemptionCode.code.upper() == redemption_code.upper()) codes = await query.gino.all() if not codes: return await p.send_error(720) @@ -280,6 +280,7 @@ async def handle_code_vanilla(p, redemption_code: str): awards.append(f'p{award.puffle_id},{int(item_allowed)}') if code.puffle_items: for award in code.puffle_items: + item_allowed = True if award.puffle_item_id in p.puffle_items: penguin_care_item = p.puffle_items[award.puffle_item_id] if penguin_care_item.quantity >= 100: