Remove custom OptionalType and use the default c# nullable type.

This commit is contained in:
hondacrx
2022-03-01 17:27:56 -05:00
parent cc08afe269
commit c14f1eb3dc
89 changed files with 924 additions and 976 deletions
+4 -3
View File
@@ -64,8 +64,7 @@ namespace Game
tradeItem.GiftCreator = item.GetGiftCreator();
if (!item.IsWrapped())
{
tradeItem.Unwrapped.Value = new();
TradeUpdated.UnwrappedTradeItem unwrappedItem = tradeItem.Unwrapped.Value;
TradeUpdated.UnwrappedTradeItem unwrappedItem = new();
unwrappedItem.EnchantID = (int)item.GetEnchantmentId(EnchantmentSlot.Perm);
unwrappedItem.OnUseEnchantmentID = (int)item.GetEnchantmentId(EnchantmentSlot.Use);
unwrappedItem.Creator = item.GetCreator();
@@ -74,6 +73,8 @@ namespace Game
unwrappedItem.MaxDurability = item.m_itemData.MaxDurability;
unwrappedItem.Durability = item.m_itemData.Durability;
tradeItem.Unwrapped = unwrappedItem;
byte g = 0;
foreach (SocketedGem gemData in item.m_itemData.Gems)
{
@@ -82,7 +83,7 @@ namespace Game
ItemGemData gem = new();
gem.Slot = g;
gem.Item = new ItemInstance(gemData);
tradeItem.Unwrapped.Value.Gems.Add(gem);
tradeItem.Unwrapped.Gems.Add(gem);
}
++g;
}