Skip to content

Commit

Permalink
fix !getitem
Browse files Browse the repository at this point in the history
  • Loading branch information
beauxq committed Apr 9, 2024
1 parent b7de2a8 commit 0b8c1dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion worlds/subversion/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ async def game_watcher(self, ctx: "SNIContext") -> None:
# print(f"{item_out_ptr=} < {len(ctx.items_received)=}")
item = ctx.items_received[item_out_ptr]
item_id = item.item - base_id
if bool(ctx.items_handling and (ctx.items_handling & 0b010)):
# item.location < 0 for !getitem to work
if bool(ctx.items_handling and (ctx.items_handling & 0b010)) or item.location < 0:
location_id = (item.location - base_id) if (item.location >= 0 and item.player == ctx.slot) else 0xFF
else:
location_id = 0x00 # backward compat
Expand Down

0 comments on commit 0b8c1dc

Please sign in to comment.