44using Ktisis . Data . Npc ;
55using Ktisis . Structs . Actor ;
66using Ktisis . Structs . Extensions ;
7+ using Lumina . Text . ReadOnly ;
78
89namespace Ktisis . Data . Excel {
910 [ Sheet ( "BNpcBase" , columnHash : 0xD5D82616 ) ]
10- public struct BattleNpc ( uint row ) : IExcelRow < BattleNpc > , INpcBase {
11+ public struct BattleNpc ( ExcelPage page , uint offset , uint row ) : IExcelRow < BattleNpc > , INpcBase {
1112 // Excel
12-
13+ public ExcelPage ExcelPage => page ;
14+ public uint RowOffset => offset ;
1315 public uint RowId => row ;
1416
1517 public float Scale { get ; set ; }
@@ -18,7 +20,7 @@ public struct BattleNpc(uint row) : IExcelRow<BattleNpc>, INpcBase {
1820 private RowRef < NpcEquipment > NpcEquipment { get ; set ; }
1921
2022 public static BattleNpc Create ( ExcelPage page , uint offset , uint row ) {
21- return new BattleNpc ( row ) {
23+ return new BattleNpc ( page , offset , row ) {
2224 Scale = page . ReadColumn < float > ( 4 , offset ) ,
2325 ModelChara = page . ReadRowRef < ModelChara > ( 5 , offset ) ,
2426 CustomizeSheet = page . ReadRowRef < BNpcCustomizeSheet > ( 6 , offset ) ,
@@ -48,13 +50,15 @@ public ushort GetModelId()
4850 // Customize Sheet
4951
5052 [ Sheet ( "BNpcCustomize" , columnHash : 0x18f060d4 ) ]
51- private struct BNpcCustomizeSheet ( uint row ) : IExcelRow < BNpcCustomizeSheet > {
53+ private struct BNpcCustomizeSheet ( ExcelPage page , uint offset , uint row ) : IExcelRow < BNpcCustomizeSheet > {
54+ public ExcelPage ExcelPage => page ;
55+ public uint RowOffset => offset ;
5256 public uint RowId => row ;
5357
5458 public Customize Customize { get ; set ; }
5559
5660 public static BNpcCustomizeSheet Create ( ExcelPage page , uint offset , uint row ) {
57- return new BNpcCustomizeSheet ( row ) {
61+ return new BNpcCustomizeSheet ( page , offset , row ) {
5862 Customize = page . ReadCustomize ( 0 , offset )
5963 } ;
6064 }
0 commit comments