refactor: handle new lumina return type nullity
This commit is contained in:
parent
97aac8be3e
commit
7194f52324
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue