Class InventoryLogic
- Namespace
- TaleWorlds.CampaignSystem.Inventory
- Assembly
- TaleWorlds.CampaignSystem.dll
public class InventoryLogic
- Inheritance
-
InventoryLogic
- Inherited Members
Constructors
InventoryLogic(MobileParty, CharacterObject, PartyBase)
public InventoryLogic(MobileParty ownerParty, CharacterObject ownerCharacter, PartyBase merchantParty)
Parameters
ownerPartyMobilePartyownerCharacterCharacterObjectmerchantPartyPartyBase
InventoryLogic(PartyBase)
public InventoryLogic(PartyBase merchantParty)
Parameters
merchantPartyPartyBase
Fields
IsPreviewingItem
public bool IsPreviewingItem
Field Value
MerchantItemType
public InventoryManager.InventoryCategoryType MerchantItemType
Field Value
Properties
CurrentMobileParty
public MobileParty CurrentMobileParty { get; }
Property Value
CurrentSettlementComponent
public SettlementComponent CurrentSettlementComponent { get; }
Property Value
DisableNetwork
public bool DisableNetwork { get; set; }
Property Value
DonationXpChange
public Action DonationXpChange { get; set; }
Property Value
InitialEquipmentCharacter
public CharacterObject InitialEquipmentCharacter { get; }
Property Value
InventoryListener
public InventoryListener InventoryListener { get; }
Property Value
IsDiscardDonating
public bool IsDiscardDonating { get; }
Property Value
IsOtherPartyFromPlayerClan
public bool IsOtherPartyFromPlayerClan { get; }
Property Value
IsSpecialActionsPermitted
public bool IsSpecialActionsPermitted { get; }
Property Value
IsTrading
public bool IsTrading { get; }
Property Value
LeftMemberRoster
public TroopRoster LeftMemberRoster { get; }
Property Value
LeftRosterName
public TextObject LeftRosterName { get; }
Property Value
MarketData
public IMarketData MarketData { get; }
Property Value
OppositePartyFromListener
public PartyBase OppositePartyFromListener { get; }
Property Value
OtherParty
public PartyBase OtherParty { get; }
Property Value
OtherSideCapacityData
public InventoryLogic.CapacityData OtherSideCapacityData { get; }
Property Value
OwnerCharacter
public CharacterObject OwnerCharacter { get; }
Property Value
OwnerParty
public MobileParty OwnerParty { get; }
Property Value
RightMemberRoster
public TroopRoster RightMemberRoster { get; }
Property Value
TotalAmount
public int TotalAmount { get; }
Property Value
TotalAmountChange
public Action<int> TotalAmountChange { get; set; }
Property Value
TransactionDebt
public int TransactionDebt { get; }
Property Value
XpGainFromDonations
public float XpGainFromDonations { get; }
Property Value
Methods
AddTransferCommand(TransferCommand)
public void AddTransferCommand(TransferCommand command)
Parameters
commandTransferCommand
AddTransferCommands(IEnumerable<TransferCommand>)
public void AddTransferCommands(IEnumerable<TransferCommand> commands)
Parameters
commandsIEnumerable<TransferCommand>
CanDonateItem(ItemRosterElement, InventorySide)
public bool CanDonateItem(ItemRosterElement element, InventoryLogic.InventorySide sideOfItem)
Parameters
elementItemRosterElementsideOfItemInventoryLogic.InventorySide
Returns
CanInventoryCapacityIncrease(InventorySide)
public bool CanInventoryCapacityIncrease(InventoryLogic.InventorySide side)
Parameters
Returns
CanPlayerCompleteTransaction()
public bool CanPlayerCompleteTransaction()
Returns
CanSlaughterItem(ItemRosterElement, InventorySide)
public bool CanSlaughterItem(ItemRosterElement element, InventoryLogic.InventorySide sideOfItem)
Parameters
elementItemRosterElementsideOfItemInventoryLogic.InventorySide
Returns
CheckItemRosterHasElement(InventorySide, ItemRosterElement, int)
public bool CheckItemRosterHasElement(InventoryLogic.InventorySide side, ItemRosterElement rosterElement, int number)
Parameters
sideInventoryLogic.InventorySiderosterElementItemRosterElementnumberint
Returns
DonateItem(ItemRosterElement)
public void DonateItem(ItemRosterElement itemRosterElement)
Parameters
itemRosterElementItemRosterElement
DoneLogic()
public bool DoneLogic()
Returns
FindItemFromSide(InventorySide, EquipmentElement)
public ItemRosterElement? FindItemFromSide(InventoryLogic.InventorySide side, EquipmentElement item)
Parameters
sideInventoryLogic.InventorySideitemEquipmentElement
Returns
GetAveragePriceFactorItemCategory(ItemCategory)
public float GetAveragePriceFactorItemCategory(ItemCategory category)
Parameters
categoryItemCategory
Returns
GetBoughtItems()
public List<(ItemRosterElement, int)> GetBoughtItems()
Returns
- List<(ItemRosterElement, int)>
GetCanItemIncreaseInventoryCapacity(ItemObject)
public bool GetCanItemIncreaseInventoryCapacity(ItemObject item)
Parameters
itemItemObject
Returns
GetCostOfItemRosterElement(ItemRosterElement, InventorySide)
public int GetCostOfItemRosterElement(ItemRosterElement itemRosterElement, InventoryLogic.InventorySide side)
Parameters
itemRosterElementItemRosterElementsideInventoryLogic.InventorySide
Returns
GetElementCountOnSide(InventorySide)
public int GetElementCountOnSide(InventoryLogic.InventorySide side)
Parameters
Returns
GetElementsInInitialRoster(InventorySide)
public IEnumerable<ItemRosterElement> GetElementsInInitialRoster(InventoryLogic.InventorySide side)
Parameters
Returns
GetElementsInRoster(InventorySide)
public IEnumerable<ItemRosterElement> GetElementsInRoster(InventoryLogic.InventorySide side)
Parameters
Returns
GetItemPrice(EquipmentElement, bool)
public int GetItemPrice(EquipmentElement equipmentElement, bool isBuying = false)
Parameters
equipmentElementEquipmentElementisBuyingbool
Returns
GetItemTotalPrice(ItemRosterElement, int, out int, bool)
public int GetItemTotalPrice(ItemRosterElement itemRosterElement, int absStockChange, out int lastPrice, bool isBuying)
Parameters
itemRosterElementItemRosterElementabsStockChangeintlastPriceintisBuyingbool
Returns
GetSoldItems()
public List<(ItemRosterElement, int)> GetSoldItems()
Returns
- List<(ItemRosterElement, int)>
Initialize(ItemRoster, MobileParty, bool, bool, CharacterObject, InventoryCategoryType, IMarketData, bool, TextObject, TroopRoster, CapacityData)
public void Initialize(ItemRoster leftItemRoster, MobileParty party, bool isTrading, bool isSpecialActionsPermitted, CharacterObject initialCharacterOfRightRoster, InventoryManager.InventoryCategoryType merchantItemType, IMarketData marketData, bool useBasePrices, TextObject leftRosterName = null, TroopRoster leftMemberRoster = null, InventoryLogic.CapacityData otherSideCapacityData = null)
Parameters
leftItemRosterItemRosterpartyMobilePartyisTradingboolisSpecialActionsPermittedboolinitialCharacterOfRightRosterCharacterObjectmerchantItemTypeInventoryManager.InventoryCategoryTypemarketDataIMarketDatauseBasePricesboolleftRosterNameTextObjectleftMemberRosterTroopRosterotherSideCapacityDataInventoryLogic.CapacityData
Initialize(ItemRoster, ItemRoster, TroopRoster, bool, bool, CharacterObject, InventoryCategoryType, IMarketData, bool, TextObject, TroopRoster, CapacityData)
public void Initialize(ItemRoster leftItemRoster, ItemRoster rightItemRoster, TroopRoster rightMemberRoster, bool isTrading, bool isSpecialActionsPermitted, CharacterObject initialCharacterOfRightRoster, InventoryManager.InventoryCategoryType merchantItemType, IMarketData marketData, bool useBasePrices, TextObject leftRosterName = null, TroopRoster leftMemberRoster = null, InventoryLogic.CapacityData otherSideCapacityData = null)
Parameters
leftItemRosterItemRosterrightItemRosterItemRosterrightMemberRosterTroopRosterisTradingboolisSpecialActionsPermittedboolinitialCharacterOfRightRosterCharacterObjectmerchantItemTypeInventoryManager.InventoryCategoryTypemarketDataIMarketDatauseBasePricesboolleftRosterNameTextObjectleftMemberRosterTroopRosterotherSideCapacityDataInventoryLogic.CapacityData
IsDonatable(ItemObject)
public bool IsDonatable(ItemObject item)
Parameters
itemItemObject
Returns
IsSlaughterable(ItemObject)
public bool IsSlaughterable(ItemObject item)
Parameters
itemItemObject
Returns
IsThereAnyChanges()
public bool IsThereAnyChanges()
Returns
Reset(bool)
public void Reset(bool fromCancel)
Parameters
fromCancelbool
SetInventoryListener(InventoryListener)
public void SetInventoryListener(InventoryListener inventoryListener)
Parameters
inventoryListenerInventoryListener
SetPlayerAcceptTraderOffer()
public void SetPlayerAcceptTraderOffer()
SlaughterItem(ItemRosterElement)
public void SlaughterItem(ItemRosterElement itemRosterElement)
Parameters
itemRosterElementItemRosterElement
TransferOne(ItemRosterElement)
public void TransferOne(ItemRosterElement itemRosterElement)
Parameters
itemRosterElementItemRosterElement
Events
AfterReset
public event InventoryLogic.AfterResetDelegate AfterReset
Event Type
AfterTransfer
public event InventoryLogic.ProcessResultListDelegate AfterTransfer
Event Type
This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).