Skip to content

Commit

Permalink
mods without HealthBarData would have id 10 instead of the current on…
Browse files Browse the repository at this point in the history
…e, so instead just swapped to a global variable so that doesnt happens again
  • Loading branch information
GuiSaiUwU committed Sep 21, 2024
1 parent 3071783 commit 1b2ce97
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions script.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from LtMAO.wadfile import WAD, WADChunk


HEALTHBAR_NUMBER = 11
def compute_hash(s: str):
"""
Generaters FN1a lowered hash from a string
Expand Down Expand Up @@ -48,7 +49,7 @@ def parse_bin(bin_file: BIN) -> BIN:
UnitHealthBarStyle = BINField()
UnitHealthBarStyle.hash = BIN_HASH["UnitHealthBarStyle"]
UnitHealthBarStyle.type = BINType.U8
UnitHealthBarStyle.data = 10
UnitHealthBarStyle.data = HEALTHBAR_NUMBER

HealthBarData = BINField()
HealthBarData.hash = BIN_HASH['HealthBarData']
Expand All @@ -72,8 +73,8 @@ def parse_bin(bin_file: BIN) -> BIN:
if has_unithealth_flag:
for inside_healthbar in s_property.data:
if inside_healthbar.hash == BIN_HASH["UnitHealthBarStyle"]:
print(f"Just changed the value from {inside_healthbar.data} to 11 UwU!")
inside_healthbar.data = 11 # WoW magic changed the value to 11 omfg
print(f"Just changed the value from {inside_healthbar.data} to {HEALTHBAR_NUMBER} UwU!")
inside_healthbar.data = HEALTHBAR_NUMBER # WoW magic changed the value to HEALTHBAR_NUMBER omfg
else:
# Wtf you have HealthBarData but dont have UnitHealthBarStyle?
s_property.data.append(UnitHealthBarStyle)
Expand Down

0 comments on commit 1b2ce97

Please sign in to comment.