From 97b101e1db62930d342098966ab5eb85e0a05077 Mon Sep 17 00:00:00 2001 From: NumberPigeon Date: Wed, 30 Aug 2023 18:45:15 +0800 Subject: [PATCH] feat: add region_id attr to Entity --- sc2reader/objects.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sc2reader/objects.py b/sc2reader/objects.py index d6c9491..1922ccb 100644 --- a/sc2reader/objects.py +++ b/sc2reader/objects.py @@ -135,6 +135,9 @@ def __init__(self, sid, slot_data): toon_handle = self.toon_handle or "0-S2-0-0" parts = toon_handle.split("-") + #: The Battle.net region id the entity is registered to + self.region_id = int(parts[0]) + #: The Battle.net region the entity is registered to self.region = GATEWAY_LOOKUP[int(parts[0])]