Browse Source

fix(GeneralInvite): abort invitation when a 3-player party is already full

Taken from PR #43 (padepa), excluding the tasks/Orochi/script_task.py changes.

(cherry picked from commit 48a5978b9e80d6d83927f69f78b011aad4b5cb79)
padepa 14 hours ago
parent
commit
6d4e7b6c47
1 changed files with 6 additions and 0 deletions
  1. 6 0
      tasks/Component/GeneralInvite/general_invite.py

+ 6 - 0
tasks/Component/GeneralInvite/general_invite.py

@@ -348,6 +348,12 @@ class GeneralInvite(BaseTask, GeneralInviteAssets):
                 break
             if self.appear_then_click(self.I_ADD_2, interval=1):
                 continue
+            if self.is_in_room(False) and self.room_type == RoomType.NORMAL_3:
+                if not self.appear(self.I_ADD_1) and not self.appear(self.I_ADD_2):
+                    logger.info('Room filled while preparing another invitation')
+                    return True
+                if self.appear_then_click(self.I_ADD_1, interval=1):
+                    continue
             if self.appear_then_click(self.I_ADD_5_4, interval=1):
                 continue
             if self.appear_then_click(self.I_ADD_SEA, interval=1):