Skip to content

Commit

Permalink
Fixed null value in CreateClassRelation
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias Glorieux committed Aug 4, 2021
1 parent 6584e10 commit dd7e688
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions WizardParser/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ public static List<ClassRelation> CreateClassRelation(JObject classRelation, Lis
var tempDic = new Dictionary<int, int>();
foreach (var secondClass in usableClassNames)
{
var t = (JObject)classRelation[secondClass];

var t = (JObject)classRelation[firstClass];
tempDic.Add(
classId[secondClass],
t.ContainsKey(firstClass) ? (int)classRelation[firstClass][secondClass] : 1000
t.ContainsKey(secondClass) ? (int)classRelation[firstClass][secondClass] : 1000
);
}
tempList.Add(new ClassRelation(classId[firstClass], tempDic, attack[firstClass]));
Expand Down

0 comments on commit dd7e688

Please sign in to comment.