Skip to content

Commit

Permalink
Rename active_weapon to active_weapon_slot
Browse files Browse the repository at this point in the history
  • Loading branch information
artcom-net committed Sep 2, 2020
1 parent 133edd4 commit 898e16d
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions d2lib/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def __init__(self): # noqa: D107
self.version = None
self.file_size = None
self.checksum = None
self.active_weapon = None
self.active_weapon_slot = None
self.progression = None
self.hot_keys = None
self.lm_skill = None
Expand Down Expand Up @@ -427,7 +427,7 @@ def _read_header(self):
f'Checksum mismatch: {self.checksum} != {exp_checksum}'
)

self.active_weapon = int_from_lbytes(self._reader.read(4))
self.active_weapon_slot = int_from_lbytes(self._reader.read(4))
self.char_name = self._reader.read(16).rstrip(b'\x00').decode('ASCII')

self.char_status = CharacterStatus(
Expand Down
2 changes: 1 addition & 1 deletion tests/data/test_d2s.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
232,
190
],
"active_weapon": 0,
"active_weapon_slot": 0,
"progression": 15,
"hot_keys": [
220,
Expand Down
2 changes: 1 addition & 1 deletion tests/data/test_d2s_cassic_hc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
176,
174
],
"active_weapon": 0,
"active_weapon_slot": 0,
"progression": 15,
"hot_keys": [
255,
Expand Down
2 changes: 1 addition & 1 deletion tests/data/test_d2s_classic.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
212,
105
],
"active_weapon": 0,
"active_weapon_slot": 0,
"progression": 10,
"hot_keys": [
255,
Expand Down
2 changes: 1 addition & 1 deletion tests/data/test_d2s_corpse.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
153,
204
],
"active_weapon": 0,
"active_weapon_slot": 0,
"progression": 0,
"hot_keys": [
70,
Expand Down
2 changes: 1 addition & 1 deletion tests/data/test_d2s_ear.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
14,
170
],
"active_weapon": 0,
"active_weapon_slot": 0,
"progression": 0,
"hot_keys": [
255,
Expand Down
2 changes: 1 addition & 1 deletion tests/data/test_d2s_exp_hc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
87,
125
],
"active_weapon": 0,
"active_weapon_slot": 0,
"progression": 5,
"hot_keys": [
255,
Expand Down
2 changes: 1 addition & 1 deletion tests/data/test_d2s_golem.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
157,
117
],
"active_weapon": 0,
"active_weapon_slot": 0,
"progression": 0,
"hot_keys": [
255,
Expand Down

0 comments on commit 898e16d

Please sign in to comment.