Skip to content

Commit

Permalink
1 of 2 changes to support bot replays in ggtracker#149
Browse files Browse the repository at this point in the history
One of two fixes

This one corrects for the error we see here:

sc2reader/engine/plugins/context.py", line 66, in handleTargetUnitCommandEvent
    self.last_target_ability_event[event.player.pid] = event
AttributeError: 'NoneType' object has no attribute 'pid'
  • Loading branch information
craigdods authored Jul 15, 2023
1 parent 12634e1 commit e9c5f8e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sc2reader/engine/plugins/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def handleCommandEvent(self, event, replay):
self.logger.error("Other unit {0} not found".format(event.other_unit_id))

def handleTargetUnitCommandEvent(self, event, replay):
self.last_target_ability_event[event.player.pid] = event
if event.player is not None:
self.last_target_ability_event[event.player.pid] = event


if not replay.datapack:
return
Expand Down

0 comments on commit e9c5f8e

Please sign in to comment.