Closed wvdvegt closed 2 years ago
Replaced around line 309 in XmlGenerator\Datafiles\Properties.cs:
// Unit
prop.UnitID = srcProp.UnitID.GetValueOrDefault();
prop.Unit = srcProp.UnitID.HasValue
? Database.EveUnitsTable.Concat(s_injectedUnits).First(
x => x.ID == srcProp.UnitID.Value).DisplayName
: string.Empty;
by
// Unit
prop.UnitID = srcProp.UnitID.GetValueOrDefault();
Database.EveUnitsTable.Concat(s_injectedUnits);
prop.Unit = srcProp.UnitID.HasValue && Database.EveUnitsTable.Any(
x => x.ID == srcProp.UnitID.Value)
? Database.EveUnitsTable.FirstOrDefault(
x => x.ID == srcProp.UnitID.Value).DisplayName
: string.Empty;
Seems a unit is missing somewhere in the new mining stuff.
Basically Database.EveUnitsTable.Concat(s_injectedUnits).First(x => x.ID == srcProp.UnitID.Value)
returns null causing issues with the DisplayName needed.
It would probably be a good idea to start pulling in the hoboleaks sde complements to prevent this from happening again. When I fixed the real percent unit, I actually thought it was a bug in the SDE until aurora stated otherwise.
Either that or we should lobby the CSM to convince CCP to include the missing data that hoboleaks datamines in the SDE.
Indeed a better solution but you might consider adding some diagnostic logging at the spot i posted to diagnose missing stuff easier next time (and prevent the app crashing on it).
Sure thing.
Closing this as main works correctly with the latest SDE.