fix: work around lumina bug

This commit is contained in:
Anna 2020-12-08 22:26:14 -05:00
parent 7c30b0f273
commit dde4ba9b3b
1 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,4 @@
using Dalamud.Game.Chat.SeStringHandling.Payloads;
using Dalamud.Game.Internal.Network;
using Dalamud.Hooking;
using Dalamud.Plugin;
using Lumina.Excel.GeneratedSheets;
@ -26,7 +25,13 @@ namespace Globetrotter {
continue;
}
EventItem opened = rank.KeyItemName.Value;
EventItem opened;
// FIXME: remove this try/catch when lumina is fixed
try {
opened = rank.KeyItemName.Value;
} catch (NullReferenceException) {
opened = null;
}
if (opened == null) {
continue;
}
@ -131,7 +136,7 @@ namespace Globetrotter {
}
public static TreasureMapPacket ParsePacket(IntPtr dataPtr) {
uint category = (uint)Marshal.ReadByte(dataPtr);
uint category = Marshal.ReadByte(dataPtr);
if (category != TREASURE_MAPS) {
return null;
}