@@ -105,51 +105,52 @@ public class ProductEntry
105105
106106 public class ShopEntryHelper
107107 {
108- public ushort CommandArgument { get ; set ; }
109- public ushort UnlockMenuFlag { get ; set ; }
110- public ushort NameID { get ; set ; }
111- public ushort ShopKeeperEntityID { get ; set ; }
112- public short PosX { get ; set ; }
113- public short PosY { get ; set ; }
114- public short PosZ { get ; set ; }
115- public byte ExtraInventoryBitMask { get ; set ; }
116- public byte SoundID { get ; set ; }
117- public ushort InventoryCount { get ; set ; }
108+ public ushort ? CommandArgument { get ; set ; }
109+ public ushort ? UnlockMenuFlag { get ; set ; }
110+ public ushort ? NameID { get ; set ; }
111+ public ushort ? ShopKeeperEntityID { get ; set ; }
112+ public short ? PosX { get ; set ; }
113+ public short ? PosY { get ; set ; }
114+ public short ? PosZ { get ; set ; }
115+ public byte ? ExtraInventoryBitMask { get ; set ; }
116+ public byte ? SoundID { get ; set ; }
117+ public ushort ? InventoryCount { get ; set ; }
118118 public byte ShopID { get ; set ; }
119- public byte Unk19 { get ; set ; }
120- public uint InventoryStartIndex { get ; set ; }
119+ public byte ? Unk19 { get ; set ; }
120+ public uint ? InventoryStartIndex { get ; set ; }
121121
122122 public ShopEntryHelper ( ) { }
123- public ShopEntryHelper ( ushort commandArgument , ushort unlockMenuFlag , ushort nameID , ushort shopKeeperEntityID , short posX , short posY , short posZ , byte extraInventoryBitMask , byte soundID , ushort inventoryCount , byte shopID , byte unk19 , uint inventoryStartIndex )
124- {
125- CommandArgument = commandArgument ;
126- UnlockMenuFlag = unlockMenuFlag ;
127- NameID = nameID ;
128- ShopKeeperEntityID = shopKeeperEntityID ;
129- PosX = posX ;
130- PosY = posY ;
131- PosZ = posZ ;
132- ExtraInventoryBitMask = extraInventoryBitMask ;
133- SoundID = soundID ;
134- InventoryCount = inventoryCount ;
135- ShopID = shopID ;
136- Unk19 = unk19 ;
137- InventoryStartIndex = inventoryStartIndex ;
138- }
139123 public ShopEntry ToShopEntry ( ushort InventoriesBaseOffset ) => new ShopEntry ( ) {
140- CommandArgument = CommandArgument ,
141- UnlockMenuFlag = UnlockMenuFlag ,
142- NameID = NameID ,
143- ShopKeeperEntityID = ShopKeeperEntityID ,
144- PosX = PosX ,
145- PosY = PosY ,
146- PosZ = PosZ ,
147- ExtraInventoryBitMask = ExtraInventoryBitMask ,
148- SoundID = SoundID ,
149- InventoryCount = InventoryCount ,
124+ CommandArgument = CommandArgument . Value ,
125+ UnlockMenuFlag = UnlockMenuFlag . Value ,
126+ NameID = NameID . Value ,
127+ ShopKeeperEntityID = ShopKeeperEntityID . Value ,
128+ PosX = PosX . Value ,
129+ PosY = PosY . Value ,
130+ PosZ = PosZ . Value ,
131+ ExtraInventoryBitMask = ExtraInventoryBitMask . Value ,
132+ SoundID = SoundID . Value ,
133+ InventoryCount = InventoryCount . Value ,
150134 ShopID = ShopID ,
151- Unk19 = Unk19 ,
152- InventoryOffset = ( ushort ) ( InventoriesBaseOffset + InventoryStartIndex * InventoryEntrySize ) ,
135+ Unk19 = Unk19 . Value ,
136+ InventoryOffset = ( ushort ) ( InventoriesBaseOffset + InventoryStartIndex . Value * InventoryEntrySize ) ,
137+ Reserved = 0
138+ } ;
139+ public ShopEntry ToShopEntry ( ShopEntry template , ushort InventoriesBaseOffset ) => new ShopEntry ( )
140+ {
141+ CommandArgument = CommandArgument ?? template . CommandArgument ,
142+ UnlockMenuFlag = UnlockMenuFlag ?? template . UnlockMenuFlag ,
143+ NameID = NameID ?? template . UnlockMenuFlag ,
144+ ShopKeeperEntityID = ShopKeeperEntityID ?? template . ShopKeeperEntityID ,
145+ PosX = PosX ?? template . PosX ,
146+ PosY = PosY ?? template . PosY ,
147+ PosZ = PosZ ?? template . PosZ ,
148+ ExtraInventoryBitMask = ExtraInventoryBitMask ?? template . ExtraInventoryBitMask ,
149+ SoundID = SoundID ?? template . SoundID ,
150+ InventoryCount = InventoryCount ?? template . InventoryCount ,
151+ ShopID = ShopID ,
152+ Unk19 = Unk19 ?? template . Unk19 ,
153+ InventoryOffset = InventoryStartIndex . HasValue ? ( ushort ) ( InventoriesBaseOffset + InventoryStartIndex . Value * InventoryEntrySize ) : template . InventoryOffset ,
153154 Reserved = 0
154155 } ;
155156 }
0 commit comments