Finalise AS2 & AS3 buddy find handlers

This commit is contained in:
Ben 2019-10-09 01:18:46 +01:00
parent d8c680e197
commit 23a071dbe8
2 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ async def handle_get_buddies_legacy(p):
async def handle_find_buddy(p, buddy_id: int):
if buddy_id in p.data.buddies and buddy_id in p.server.penguins_by_id:
buddy = p.server.penguins_by_id[buddy_id]
await p.send_xt('bf', buddy.room.id)
await p.send_xt('bf', buddy.room.external_id if buddy.room.igloo else buddy.room.id)
@handlers.handler(XTPacket('b', 'br'))

View File

@ -141,7 +141,7 @@ async def handle_find_player(p, player_id: int):
if player_id in p.server.penguins_by_id:
player = p.server.penguins_by_id[player_id]
room_id = player.room.id
room_type = 'igloo' if player.room.igloo else 'invalid'
room_type = 'backyard' if player.room.backyard else 'igloo' if player.room.igloo else 'invalid'
room_owner = player.room.penguin_id if player.room.igloo else -1
else:
room_id, room_type, room_owner = -1, 'invalid', -1