mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-13 20:04:16 +01:00
remove empty entries
This commit is contained in:
parent
c21df6fd59
commit
f381a77e9c
1 changed files with 4 additions and 0 deletions
|
|
@ -88,6 +88,7 @@ public class MareCensus : IHostedService
|
||||||
var fields = dcsParser.ReadFields();
|
var fields = dcsParser.ReadFields();
|
||||||
var id = short.Parse(fields[0], CultureInfo.InvariantCulture);
|
var id = short.Parse(fields[0], CultureInfo.InvariantCulture);
|
||||||
var name = fields[1];
|
var name = fields[1];
|
||||||
|
if (string.IsNullOrEmpty(name) || id == 0) continue;
|
||||||
_logger.LogInformation("DC: ID: {id}, Name: {name}", id, name);
|
_logger.LogInformation("DC: ID: {id}, Name: {name}", id, name);
|
||||||
_dcs[id] = name;
|
_dcs[id] = name;
|
||||||
}
|
}
|
||||||
|
|
@ -108,6 +109,7 @@ public class MareCensus : IHostedService
|
||||||
var id = ushort.Parse(fields[0], CultureInfo.InvariantCulture);
|
var id = ushort.Parse(fields[0], CultureInfo.InvariantCulture);
|
||||||
var name = fields[1];
|
var name = fields[1];
|
||||||
var dc = short.Parse(fields[5], CultureInfo.InvariantCulture);
|
var dc = short.Parse(fields[5], CultureInfo.InvariantCulture);
|
||||||
|
if (!_dcs.ContainsKey(dc)) continue;
|
||||||
_worlds[id] = (name, dc);
|
_worlds[id] = (name, dc);
|
||||||
_logger.LogInformation("World: ID: {id}, Name: {name}, DC: {dc}", id, name, dc);
|
_logger.LogInformation("World: ID: {id}, Name: {name}, DC: {dc}", id, name, dc);
|
||||||
}
|
}
|
||||||
|
|
@ -127,6 +129,7 @@ public class MareCensus : IHostedService
|
||||||
var fields = raceParser.ReadFields();
|
var fields = raceParser.ReadFields();
|
||||||
var id = short.Parse(fields[0], CultureInfo.InvariantCulture);
|
var id = short.Parse(fields[0], CultureInfo.InvariantCulture);
|
||||||
var name = fields[1];
|
var name = fields[1];
|
||||||
|
if (string.IsNullOrEmpty(name) || id == 0) continue;
|
||||||
_races[id] = name;
|
_races[id] = name;
|
||||||
_logger.LogInformation("Race: ID: {id}, Name: {name}", id, name);
|
_logger.LogInformation("Race: ID: {id}, Name: {name}", id, name);
|
||||||
}
|
}
|
||||||
|
|
@ -146,6 +149,7 @@ public class MareCensus : IHostedService
|
||||||
var fields = tribeParser.ReadFields();
|
var fields = tribeParser.ReadFields();
|
||||||
var id = short.Parse(fields[0], CultureInfo.InvariantCulture);
|
var id = short.Parse(fields[0], CultureInfo.InvariantCulture);
|
||||||
var name = fields[1];
|
var name = fields[1];
|
||||||
|
if (string.IsNullOrEmpty(name) || id == 0) continue;
|
||||||
_tribes[id] = name;
|
_tribes[id] = name;
|
||||||
_logger.LogInformation("Tribe: ID: {id}, Name: {name}", id, name);
|
_logger.LogInformation("Tribe: ID: {id}, Name: {name}", id, name);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue