/// <summary> /// Initializes a new instance of the <see cref="Asset" /> class. /// </summary> /// <param name="src">The source.</param> /// <exception cref="System.ArgumentNullException">src</exception> internal Asset(SerializableAssetListItem src) { src.ThrowIfNull(nameof(src)); LocationID = src.LocationID; Quantity = src.Quantity; Item = StaticItems.GetItemByID(src.TypeID); FlagID = src.EVEFlag; m_flag = EveFlag.GetFlagText(src.EVEFlag); TypeOfBlueprint = GetTypeOfBlueprint(src.RawQuantity); Container = String.Empty; Volume = GetVolume(); TotalVolume = Quantity * Volume; }
/// <summary> /// Initializes a new instance of the <see cref="Asset" /> class. /// </summary> /// <param name="src">The source.</param> /// <param name="character">The owning character.</param> /// <exception cref="System.ArgumentNullException">src</exception> internal Asset(EsiAssetListItem src, CCPCharacter character) { src.ThrowIfNull(nameof(src)); int flagID = EveFlag.GetFlagID(src.EVEFlag); LocationID = src.LocationID; Quantity = src.Quantity; Item = StaticItems.GetItemByID(src.TypeID); FlagID = (short)flagID; m_character = character; m_flag = EveFlag.GetFlagText(flagID); TypeOfBlueprint = GetTypeOfBlueprint(src.IsBPC); Container = string.Empty; Volume = GetVolume(); TotalVolume = Quantity * Volume; }