From c2fcaec6ad2dad6e8d6b1ae1a948cf2f834589d4 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Sun, 13 Apr 2025 20:39:31 +0200 Subject: [PATCH] MultiServer.py: Another Hint Priority + Item Links bug oh boy Basically, the hint for an item linked item gets stored in two players' hints. 1. The player whose location it is 2. **Every individual player** participating in the item link Crucially, it is *not* stored as a hint for the itemlink world. This makes `replace_hint` not act correctly when a receiving player of an itemlink item tries to change the priority. I'm not sure if this has other implications, it probably warrants some testing. --- MultiServer.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MultiServer.py b/MultiServer.py index 05e93e678d..afb3d14b43 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -792,9 +792,10 @@ class Context: return None def replace_hint(self, team: int, slot: int, old_hint: Hint, new_hint: Hint) -> None: - if old_hint in self.hints[team, slot]: - self.hints[team, slot].remove(old_hint) - self.hints[team, slot].add(new_hint) + for real_slot in self.slot_set(slot): + if old_hint in self.hints[team, real_slot]: + self.hints[team, real_slot].remove(old_hint) + self.hints[team, real_slot].add(new_hint) # "events"