|
10 | 10 | using FFXIVClientStructs.FFXIV.Client.UI.Agent; |
11 | 11 |
|
12 | 12 | using Lumina.Excel; |
13 | | -using Lumina.Excel.GeneratedSheets; |
| 13 | +using Lumina.Excel.Sheets; |
14 | 14 |
|
15 | 15 | using MoonSharp.Interpreter; |
16 | 16 |
|
@@ -252,7 +252,6 @@ internal PlayerApi(ScriptContainer source) : base(source) { } |
252 | 252 | [LuaDoc("Provides three values consisting of the current character's X (east/west), Y (north/south), and Z (vertical) coordinates.", |
253 | 253 | "If the player isn't loaded, all three values will be nil.", |
254 | 254 | "This property is shorthand for `.Entity.MapCoords`.")] |
255 | | - [return: AsLuaType(LuaType.Number)] |
256 | 255 | public DynValue MapCoords => this.Entity.MapCoords; |
257 | 256 |
|
258 | 257 | [LuaPlayerDoc("The current character's rotation in radians, ranging from 0 to 2pi.", |
@@ -476,24 +475,24 @@ internal static void InitialiseEmotes() { |
476 | 475 |
|
477 | 476 | ExcelSheet<Emote> emotes = Service.DataManager.GameData.GetExcelSheet<Emote>()!; |
478 | 477 | try { |
479 | | - uint max = emotes.RowCount; |
| 478 | + int max = emotes.Count; |
480 | 479 | Service.Log.Information($"[{LogTag.Emotes}] Indexing {max:N0} emotes..."); |
481 | 480 | for (uint i = 0; i < max; ++i) { |
482 | | - Emote? emote = emotes.GetRow(i); |
483 | | - if (emote is not null) { |
| 481 | + Emote? emote = emotes.GetRowOrDefault(i); |
| 482 | + if (emote.HasValue) { |
484 | 483 | string[] commands = (new string?[] { |
485 | | - emote.Name.RawString, |
486 | | - emote.TextCommand.Value?.Command?.ToString(), |
487 | | - emote.TextCommand.Value?.ShortCommand?.ToString(), |
488 | | - emote.TextCommand.Value?.Alias?.ToString(), |
489 | | - emote.TextCommand.Value?.ShortAlias?.ToString(), |
| 484 | + emote.Value.Name.ToString(), |
| 485 | + emote.Value.TextCommand.ValueNullable?.Command.ToString(), |
| 486 | + emote.Value.TextCommand.ValueNullable?.ShortCommand.ToString(), |
| 487 | + emote.Value.TextCommand.ValueNullable?.Alias.ToString(), |
| 488 | + emote.Value.TextCommand.ValueNullable?.ShortAlias.ToString(), |
490 | 489 | }) |
491 | 490 | .Where(s => !string.IsNullOrWhiteSpace(s)) |
492 | 491 | .Cast<string>() |
493 | 492 | .Select(s => s.TrimStart('/')) |
494 | 493 | .ToArray(); |
495 | 494 | foreach (string command in commands) |
496 | | - emoteUnlocks[command] = emote.UnlockLink; |
| 495 | + emoteUnlocks[command] = emote.Value.UnlockLink; |
497 | 496 | } |
498 | 497 | } |
499 | 498 | Service.Log.Information($"[{LogTag.Emotes}] Cached {emoteUnlocks.Count:N0} emote names"); |
|
0 commit comments