Skip to content

Commit

Permalink
Refs #96, no observers and AIs in ladder games.
Browse files Browse the repository at this point in the history
  • Loading branch information
GraylinKim committed Mar 15, 2013
1 parent dbc79d8 commit 91dc822
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sc2reader/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,12 @@ def createPlayer(pid, pdata, attributes):
hash_input = self.gateway+":"+','.join(player_names)
self.people_hash = hashlib.sha256(hash_input).hexdigest()

# The presence of observers and/or computer players makes this not actually ladder
# This became an issue in HotS where Training, vs AI, Unranked, and Ranked
# were all marked with "amm" => Ladder
if len(self.observers) > 0 or len(self.humans) != len(self.players):
replay.is_ladder = False

def load_messages(self):
if 'replay.message.events' in self.raw_data:
self.messages = self.raw_data['replay.message.events'].messages
Expand Down

0 comments on commit 91dc822

Please sign in to comment.