This repository was archived by the owner on Jul 8, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -170,7 +170,9 @@ def __uncompress(self, screenshot):
170170 # ValueError: cannot reshape array of size 0 into shape (720,1280,4)
171171 raise ImageTruncated (str (e ))
172172
173- cv2 .flip (image , 0 , dst = image )
173+ # flip without `dst=image`
174+ # np.frombuffer creates a read-only memory view, we need to create a writable copy here
175+ image = cv2 .flip (image , 0 )
174176 if image is None :
175177 raise ImageTruncated ('Empty image after cv2.flip' )
176178
Original file line number Diff line number Diff line change @@ -101,7 +101,8 @@ def screenshot_scrcpy(self):
101101 if thread is None or not thread .is_alive ():
102102 raise ScrcpyError ('_scrcpy_stream_loop_thread died' )
103103 if self ._scrcpy_last_frame_time > now :
104- screenshot = self ._scrcpy_last_frame .copy ()
104+ # no copy
105+ screenshot = self ._scrcpy_last_frame
105106 return screenshot
106107
107108 @retry
Original file line number Diff line number Diff line change @@ -48,6 +48,13 @@ def handle_battle_status(self, drop=None):
4848
4949 return False
5050
51+ def handle_exp_info (self ):
52+ """
53+ META combats don't drop EXP so no handle_exp_info
54+ Random background of BATTLE_STATUS may trigger EXP_INFO_B
55+ """
56+ return False
57+
5158 def handle_battle_preparation (self ):
5259 if super ().handle_battle_preparation ():
5360 return True
You can’t perform that action at this time.
0 commit comments