Skip to content

Commit a1e3ef1

Browse files
committed
Properly create the unit tag.
1 parent f7bca9d commit a1e3ef1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sc2reader/events/tracker.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def __init__(self, frames, data):
196196
self.unit_id_recycle = data[1]
197197

198198
#: The unique id of the unit being born
199-
self.unit_id = self.unit_id_index << 16 | self.unit_id_recycle
199+
self.unit_id = self.unit_id_index << 18 | self.unit_id_recycle
200200

201201
#: The unit object that was born
202202
self.unit = None
@@ -269,7 +269,7 @@ def __init__(self, frames, data):
269269
self.unit_id_recycle = data[1]
270270

271271
#: The unique id of the unit being killed
272-
self.unit_id = self.unit_id_index << 16 | self.unit_id_recycle
272+
self.unit_id = self.unit_id_index << 18 | self.unit_id_recycle
273273

274274
#: The unit object that died
275275
self.unit = None
@@ -326,7 +326,7 @@ def __init__(self, frames, data):
326326
self.unit_id_recycle = data[1]
327327

328328
#: The unique id of the unit changing ownership
329-
self.unit_id = self.unit_id_index << 16 | self.unit_id_recycle
329+
self.unit_id = self.unit_id_index << 18 | self.unit_id_recycle
330330

331331
#: The unit object that is affected by this event
332332
self.unit = None
@@ -383,7 +383,7 @@ def __init__(self, frames, data):
383383
self.unit_id_recycle = data[1]
384384

385385
#: The unique id of the unit changing type
386-
self.unit_id = self.unit_id_index << 16 | self.unit_id_recycle
386+
self.unit_id = self.unit_id_index << 18 | self.unit_id_recycle
387387

388388
#: The unit object that was changed
389389
self.unit = None
@@ -445,7 +445,7 @@ def __init__(self, frames, data):
445445
self.unit_id_recycle = data[1]
446446

447447
#: The unique id of the stated unit
448-
self.unit_id = self.unit_id_index << 16 | self.unit_id_recycle
448+
self.unit_id = self.unit_id_index << 18 | self.unit_id_recycle
449449

450450
#: The unit object that was started (e.g. started to warp in)
451451
self.unit = None
@@ -521,7 +521,7 @@ def __init__(self, frames, data):
521521
self.unit_id_recycle = data[1]
522522

523523
#: The unique id of the finished unit
524-
self.unit_id = self.unit_id_index << 16 | self.unit_id_recycle
524+
self.unit_id = self.unit_id_index << 18 | self.unit_id_recycle
525525

526526
#: The unit object that was finished
527527
self.unit = None

0 commit comments

Comments
 (0)