Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoSimC crashes importing from SimC Addon 1.10.7 if no offhand #38

Open
redi-tormeyd opened this issue Oct 3, 2018 · 1 comment
Open

Comments

@redi-tormeyd
Copy link

SimC Addon will not provide an offhand= line when exporting a profile for a user with a two-handed item equipped leading to an AutoSimC crash. The following diff will allow AutoSimC to parse a SimC Addon export where a gear slot has been left empty -- such as off_hand when a two-handed item in main_hand

diff --git a/main.py b/main.py
index 2cd0926..7ccb249 100644
--- a/main.py
+++ b/main.py
@@ -742,7 +742,7 @@ def build_profile_simc_addon(args):
                             "potion",
                             "flask",
                             "food",
-                            "augmentation"]
+                            "augmentation", "bfa.reorigination_array_stacks"]
 
     # will contain any gear in file for each slot, divided by |
     gear = {}
@@ -957,7 +957,7 @@ def permutate(args, player_profile):
 
     # concatenate gear in bags to normal gear-list
     for b in gearInBags:
-        if b in gear:
+        if b in gear and gear[b]:
             currentGear = gear[b][0]
             if b == "finger" or b == "trinket":
                 currentGear = currentGear + "|" + gear[b][1]
@@ -969,7 +969,7 @@ def permutate(args, player_profile):
         slot_base_name = gear_slot[0]  # First mentioned "correct" item name
         parsed_gear[slot_base_name] = []
         for entry in gear_slot:
-            if entry in gear:
+            if entry in gear and gear[entry]:
                 for s in gear[entry].split("|"):
                     parsed_gear[slot_base_name].append(Item(slot_base_name, s))
         if len(parsed_gear[slot_base_name]) == 0:`
@theoneandlonely
Copy link
Contributor

Thanks redi-tormeyd,

i just fixed that, unrelated to your ticket :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants