diff --git a/MultiServer.py b/MultiServer.py index 4a6acaa7..9a811a3a 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -728,11 +728,11 @@ def get_remaining(ctx: Context, team: int, slot: int) -> typing.List[int]: return sorted(items) -def send_items_to(ctx: Context, team: int, slot: int, *items: NetworkItem): - targets = ctx.groups.get(slot, [slot]) +def send_items_to(ctx: Context, team: int, target_slot: int, *items: NetworkItem): + targets = ctx.groups.get(target_slot, [target_slot]) for target in targets: for item in items: - if target != item.player: + if item.player != target_slot: get_received_items(ctx, team, target, False).append(item) get_received_items(ctx, team, target, True).append(item) diff --git a/worlds/alttp/Rom.py b/worlds/alttp/Rom.py index 6a9d872f..938261e1 100644 --- a/worlds/alttp/Rom.py +++ b/worlds/alttp/Rom.py @@ -755,7 +755,6 @@ def patch_rom(world, rom, player, enemized): local_random = world.slot_seeds[player] # patch items - targets_pointing_to_here = world.get_player_groups(player) | {player} for location in world.get_locations(): if location.player != player or location.address is None or location.shop_slot is not None: @@ -786,7 +785,7 @@ def patch_rom(world, rom, player, enemized): itemid = list(location_table.keys()).index(location.name) + 1 assert itemid < 0x100 rom.write_byte(location.player_address, 0xFF) - elif location.item.player not in targets_pointing_to_here: + elif location.item.player != player: if location.player_address is not None: rom.write_byte(location.player_address, min(location.item.player, ROM_PLAYER_LIMIT)) else: