Skip to content

Commit a2c9ece

Browse files
committed
Updates AbilityEvent parser, new atype == 0x08 is definitely a right click location event. Format unknown, but definitely starts with the X coordinate.
1 parent 709df53 commit a2c9ece

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sc2reader/parsers.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,12 @@ def parse_ability_event(self, buffer, frames, type, code, pid):
8484
return TargetAbilityEvent(frames, pid, type, code, ability, target)
8585

8686
elif atype < 0x10: #new to patch 1.3.3
87-
buffer.skip(10)
88-
return UnknownAbilityEvent(frames, pid, type, code, None)
87+
#10 bytes total, coordinates have a different format?
88+
#X coordinate definitely is the first byte, with (hopefully) y next
89+
event = UnknownAbilityEvent(frames, pid, type, code, None)
90+
event.location1 = buffer.read_coordinate()
91+
buffer.skip(5)
92+
return event
8993

9094
else:
9195
print hex(buffer.cursor)

0 commit comments

Comments
 (0)