Workaround for buggy client dj3k track packet

This commit is contained in:
Ben 2020-06-05 22:49:14 +01:00
parent 11f68f1e89
commit d2b8475e81

View File

@ -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 '')