Skip to content

Commit f21269c

Browse files
committed
Fixes 19595 right click target parsing.
1 parent 5a9d829 commit f21269c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

sc2reader/readers.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -654,9 +654,7 @@ def location_move(self, buffer, frames, type, code, pid, flag, atype):
654654
def right_click_target(self, buffer, frames, type, code, pid, flag, atype):
655655
# ability (2), object id (4), object type (2), ?? (10)
656656
ability = buffer.read_short(endian=BIG_ENDIAN)
657-
obj_id = buffer.read_object_id()
658-
obj_type = buffer.read_object_type()
659-
target = (obj_id, obj_type,)
660-
# extra byte
661-
buffer.skip(11)
657+
buffer.shift(1) # weird shift..
658+
target = (buffer.read_int(BIG_ENDIAN), buffer.read_short(BIG_ENDIAN))
659+
buffer.skip(10)
662660
return TargetAbilityEvent(frames, pid, type, code, ability, target)

0 commit comments

Comments
 (0)