Skip to content

Commit

Permalink
update get_commander_tag_data
Browse files Browse the repository at this point in the history
  • Loading branch information
Drevarr committed Dec 15, 2024
1 parent 7d4b4b4 commit bd60f1c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions output_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1252,19 +1252,26 @@ def build_combat_resurrection_stats_tid(top_stats: dict, skill_data: dict, buff_
def build_main_tid(datetime, tag_list, guild_name):
tag_str = ""
for tag in tag_list:
if tag == "":
continue
if tag == tag_list[-1] and len(tag_list) > 1:
tag_str += f"and {tag}"
if tag != tag_list[-1] and len(tag_list) > 1:
tag_str += f"{tag}, "
if len(tag_list) == 1:
tag_str += f"{tag} "


if tag_str == "":
tag_str = " - No Tags"
else:
tag_str = f"with {tag_str}"

main_created = f"{datetime}"
main_modified = f"{datetime}"
main_tags = f"{datetime} Logs"
main_title = f"{datetime}-Log-Summary"
main_caption = f"{datetime} - {guild_name} - Log Summary with {tag_str}"

main_caption = f"{datetime} - {guild_name} - Log Summary {tag_str}"
main_creator = f"[email protected]"

main_text = "{{"+datetime+"-Tag_Stats}}\n\n{{"+datetime+"-Menu}}"
Expand Down
2 changes: 1 addition & 1 deletion parser_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def get_commander_tag_data(fight_json):
"""Extract commander tag data from the fight JSON."""

commander_tag_positions = []
earliest_death_time = float('inf')
earliest_death_time = fight_json['durationMS']
has_died = False

for player in fight_json["players"]:
Expand Down

0 comments on commit bd60f1c

Please sign in to comment.