update item table offsets

This commit is contained in:
Fabian Dill 2021-01-30 23:40:01 +01:00
parent 24e8fb54ad
commit c988ec24b6
2 changed files with 7 additions and 7 deletions

View File

@ -186,7 +186,7 @@ item_table = {'Bow': (True, None, 0x0B, 'You have\nchosen the\narcher class.', '
'Open Floodgate': (True, 'Event', None, None, None, None, None, None, None, None),
}
lookup_id_to_name = {data[3]: name for name, data in item_table.items()}
lookup_id_to_name = {data[2]: name for name, data in item_table.items()}
hint_blacklist = {"Triforce"}
@ -228,8 +228,8 @@ for basename, substring in _simple_groups:
del (_simple_groups)
progression_items = {name for name, data in item_table.items() if type(data[3]) == int and data[0]}
item_name_groups['Everything'] = {name for name, data in item_table.items() if type(data[3]) == int}
progression_items = {name for name, data in item_table.items() if type(data[2]) == int and data[0]}
item_name_groups['Everything'] = {name for name, data in item_table.items() if type(data[2]) == int}
item_name_groups['Progression Items'] = progression_items
item_name_groups['Non Progression Items'] = item_name_groups['Everything'] - progression_items

View File

@ -539,7 +539,7 @@ def notify_team(ctx: Context, team: int, text: str):
def collect_hints(ctx: Context, team: int, slot: int, item: str) -> typing.List[Utils.Hint]:
hints = []
seeked_item_id = Items.item_table[item][3]
seeked_item_id = Items.item_table[item][2]
for check, result in ctx.locations.items():
item_id, receiving_player = result
if receiving_player == slot and item_id == seeked_item_id:
@ -875,7 +875,7 @@ class ClientMessageProcessor(CommonCommandProcessor):
if self.ctx.item_cheat:
item_name, usable, response = get_intended_text(item_name, Items.item_table.keys())
if usable:
new_item = ReceivedItem(Items.item_table[item_name][3], -1, self.client.slot)
new_item = ReceivedItem(Items.item_table[item_name][2], -1, self.client.slot)
get_received_items(self.ctx, self.client.team, self.client.slot).append(new_item)
self.ctx.notify_all('Cheat console: sending "' + item_name + '" to ' + self.ctx.get_aliased_name(self.client.team, self.client.slot))
send_new_items(self.ctx)
@ -1075,7 +1075,7 @@ async def process_client_cmd(ctx: Context, client: Client, cmd, args):
target_item, target_player = ctx.locations[(Regions.location_table[loc_name][0], client.slot)]
replacements = {'SmallKey': 0xA2, 'BigKey': 0x9D, 'Compass': 0x8D, 'Map': 0x7D}
item_type = [i[2] for i in Items.item_table.values() if type(i[3]) is int and i[3] == target_item]
item_type = [i[1] for i in Items.item_table.values() if type(i[2]) is int and i[2] == target_item]
if item_type:
target_item = replacements.get(item_type[0], target_item)
@ -1228,7 +1228,7 @@ class ServerCommandProcessor(CommonCommandProcessor):
if usable:
for client in self.ctx.endpoints:
if client.name == seeked_player:
new_item = ReceivedItem(Items.item_table[item][3], -1, client.slot)
new_item = ReceivedItem(Items.item_table[item][2], -1, client.slot)
get_received_items(self.ctx, client.team, client.slot).append(new_item)
self.ctx.notify_all('Cheat console: sending "' + item + '" to ' + self.ctx.get_aliased_name(client.team, client.slot))
send_new_items(self.ctx)