mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-08-27 06:46:36 -07:00
KH2: Prevent the client from crashing if the player duplicated items (#6210)
This commit is contained in:
@@ -314,7 +314,7 @@ async def verifyItems(self):
|
||||
amount_found_in_slots += 1
|
||||
if item_name in self.kh2_seed_save["SoldEquipment"]:
|
||||
amount_found_in_slots += self.kh2_seed_save["SoldEquipment"][item_name]
|
||||
inInventory = self.kh2_seed_save_cache["AmountInvo"]["Equipment"][item_name] - amount_found_in_slots
|
||||
inInventory = max(self.kh2_seed_save_cache["AmountInvo"]["Equipment"][item_name] - amount_found_in_slots, 0)
|
||||
if inInventory != self.kh2_read_byte(self.Save + item_data.memaddr):
|
||||
self.kh2_write_byte(self.Save + item_data.memaddr, inInventory)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user