Skip to content

Commit

Permalink
fuck 2: electric boogaloo
Browse files Browse the repository at this point in the history
  • Loading branch information
NotAdam committed Oct 21, 2023
1 parent bc7244b commit 48c15e2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Lumina/Excel/ExcelSheetImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,13 @@ internal void GenerateFilePages()
/// <returns>The <see cref="ExcelPage"/> if found, null otherwise</returns>
public ExcelPage? GetPageForRow( uint row )
{
// var data = DataPages.FirstOrDefault( s => s.RowData.ContainsKey( row ) );

var page = DataPages.FirstOrDefault( s => row >= s.StartId && row < s.StartId + s.RowCount );

if( page?.RowData.ContainsKey( row ) == false )
{
return null;
}

return page;
}

Expand Down

0 comments on commit 48c15e2

Please sign in to comment.