SM: getitem cheat fix (#3102)

This commit is contained in:
lordlou 2024-04-18 12:54:46 -04:00 committed by GitHub
parent 5ec342abf4
commit 3c70621f1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -139,7 +139,7 @@ class SMSNIClient(SNIClient):
if item_out_ptr < len(ctx.items_received): if item_out_ptr < len(ctx.items_received):
item = ctx.items_received[item_out_ptr] item = ctx.items_received[item_out_ptr]
item_id = item.item - items_start_id item_id = item.item - items_start_id
if bool(ctx.items_handling & 0b010): if bool(ctx.items_handling & 0b010) or item.location < 0: # item.location < 0 for !getitem to work
location_id = (item.location - locations_start_id) if (item.location >= 0 and item.player == ctx.slot) else 0xFF location_id = (item.location - locations_start_id) if (item.location >= 0 and item.player == ctx.slot) else 0xFF
else: else:
location_id = 0x00 #backward compat location_id = 0x00 #backward compat