From d2b8475e8136c04dc9f062b29be73f4f5b80ccf1 Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 5 Jun 2020 22:49:14 +0100 Subject: [PATCH] Workaround for buggy client dj3k track packet --- houdini/handlers/play/igloo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/houdini/handlers/play/igloo.py b/houdini/handlers/play/igloo.py index c747f6e..0b88ca6 100644 --- a/houdini/handlers/play/igloo.py +++ b/houdini/handlers/play/igloo.py @@ -565,9 +565,10 @@ async def handle_get_furniture_inventory(p): @handlers.handler(XTPacket('g', 'ggd'), client=ClientType.Vanilla) -async def handle_get_dj3k_track(p, penguin_id: int, game_index: str): +async def handle_get_dj3k_track(p, penguin_id: str, game_index: str): + pid = int(penguin_id) if penguin_id.isdigit() else p.id room_id, index = game_index.split('|') - game_data = await PenguinGameData.select('data').where((PenguinGameData.penguin_id == penguin_id) & + game_data = await PenguinGameData.select('data').where((PenguinGameData.penguin_id == pid) & (PenguinGameData.room_id == int(room_id)) & (PenguinGameData.index == int(index))).gino.scalar() await p.send_xt('ggd', game_data or '')