From 238364241b5e46d4f613b8ce3e49c03549457a4f Mon Sep 17 00:00:00 2001 From: JeffTheRock <84420756+JeffTheRock@users.noreply.github.com> Date: Thu, 6 Nov 2025 03:19:48 -0500 Subject: [PATCH] make puffle items award correctly when using CATALOG type codes (#107) * misc fixes houdini.sql: fixed a bug that can cause penguins to be deleted if an item or puffle is deleted, missing pin dates, mascot item types, missing rooms, incorrect tourdude quest reward, and various minor mascot issues. houdini.data.penguin: reflect database changes houdini.handlers.play.epf: use correct error code for not enough medals houdini.handlers.play.igloo: use proper error codes for when player owns flooring/igloo/location, or max furniture quantity houdini.handlers.play.item: fixed an issue where the stampbook would display pin dates one day ahead houdini.handlers.play.pet: fixed digging not allowing multiple puffle items/furniture, cost of puffle creatures, adopting gold/rainbow puffles does not give their toys/food, and use correct error codes for puffle items * fix missed keys * fix ordering * fix walking key * fix issue with super exclusive bonus items * fix typo making puffle items not award correctly * make codes case insensitive --- houdini/handlers/play/pet.py | 2 +- houdini/handlers/redemption/code.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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: