refactor: handle new lumina return type nullity

This commit is contained in:
Anna 2021-08-23 12:49:58 -04:00
parent 97aac8be3e
commit 7194f52324
2 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ namespace Tourist {
}
internal void RemoveVfx(ushort index) {
var adventure = this.Plugin.DataManager.GetExcelSheet<Adventure>()
var adventure = this.Plugin.DataManager.GetExcelSheet<Adventure>()!
.Skip(index)
.First();
@ -54,7 +54,7 @@ namespace Tourist {
internal void SpawnVfxForCurrentZone(ushort territory) {
var row = 0;
foreach (var adventure in this.Plugin.DataManager.GetExcelSheet<Adventure>()) {
foreach (var adventure in this.Plugin.DataManager.GetExcelSheet<Adventure>()!) {
if (row >= 80) {
break;
}

View File

@ -130,7 +130,7 @@ namespace Tourist {
if (ImGui.BeginChild("tourist-adventures", new Vector2(0, 0))) {
const uint first = 2162688;
var adventures = this.Plugin.DataManager.GetExcelSheet<Adventure>()
var adventures = this.Plugin.DataManager.GetExcelSheet<Adventure>()!
.Select(adventure => (idx: adventure.RowId - first, adventure))
.OrderBy(entry => this.Plugin.Config.SortMode switch {
SortMode.Number => entry.idx,
@ -231,7 +231,7 @@ namespace Tourist {
if (Weathers.All.TryGetValue(adventure.RowId, out var weathers)) {
var weatherString = string.Join(", ", weathers
.OrderBy(id => id)
.Select(id => this.Plugin.DataManager.GetExcelSheet<Weather>().GetRow(id))
.Select(id => this.Plugin.DataManager.GetExcelSheet<Weather>()!.GetRow(id))
.Select(weather => weather.Name));
ImGui.TextUnformatted(weatherString);
} else {