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
ownerParty
MobilePartyownerCharacter
CharacterObjectmerchantParty
PartyBase
InventoryLogic(PartyBase)
public InventoryLogic(PartyBase merchantParty)
Parameters
merchantParty
PartyBase
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
command
TransferCommand
AddTransferCommands(IEnumerable<TransferCommand>)
public void AddTransferCommands(IEnumerable<TransferCommand> commands)
Parameters
commands
IEnumerable<TransferCommand>
CanDonateItem(ItemRosterElement, InventorySide)
public bool CanDonateItem(ItemRosterElement element, InventoryLogic.InventorySide sideOfItem)
Parameters
element
ItemRosterElementsideOfItem
InventoryLogic.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
element
ItemRosterElementsideOfItem
InventoryLogic.InventorySide
Returns
CheckItemRosterHasElement(InventorySide, ItemRosterElement, int)
public bool CheckItemRosterHasElement(InventoryLogic.InventorySide side, ItemRosterElement rosterElement, int number)
Parameters
side
InventoryLogic.InventorySiderosterElement
ItemRosterElementnumber
int
Returns
DonateItem(ItemRosterElement)
public void DonateItem(ItemRosterElement itemRosterElement)
Parameters
itemRosterElement
ItemRosterElement
DoneLogic()
public bool DoneLogic()
Returns
FindItemFromSide(InventorySide, EquipmentElement)
public ItemRosterElement? FindItemFromSide(InventoryLogic.InventorySide side, EquipmentElement item)
Parameters
side
InventoryLogic.InventorySideitem
EquipmentElement
Returns
GetAveragePriceFactorItemCategory(ItemCategory)
public float GetAveragePriceFactorItemCategory(ItemCategory category)
Parameters
category
ItemCategory
Returns
GetBoughtItems()
public List<(ItemRosterElement, int)> GetBoughtItems()
Returns
- List<(ItemRosterElement, int)>
GetCanItemIncreaseInventoryCapacity(ItemObject)
public bool GetCanItemIncreaseInventoryCapacity(ItemObject item)
Parameters
item
ItemObject
Returns
GetCostOfItemRosterElement(ItemRosterElement, InventorySide)
public int GetCostOfItemRosterElement(ItemRosterElement itemRosterElement, InventoryLogic.InventorySide side)
Parameters
itemRosterElement
ItemRosterElementside
InventoryLogic.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
equipmentElement
EquipmentElementisBuying
bool
Returns
GetItemTotalPrice(ItemRosterElement, int, out int, bool)
public int GetItemTotalPrice(ItemRosterElement itemRosterElement, int absStockChange, out int lastPrice, bool isBuying)
Parameters
itemRosterElement
ItemRosterElementabsStockChange
intlastPrice
intisBuying
bool
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
leftItemRoster
ItemRosterparty
MobilePartyisTrading
boolisSpecialActionsPermitted
boolinitialCharacterOfRightRoster
CharacterObjectmerchantItemType
InventoryManager.InventoryCategoryTypemarketData
IMarketDatauseBasePrices
boolleftRosterName
TextObjectleftMemberRoster
TroopRosterotherSideCapacityData
InventoryLogic.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
leftItemRoster
ItemRosterrightItemRoster
ItemRosterrightMemberRoster
TroopRosterisTrading
boolisSpecialActionsPermitted
boolinitialCharacterOfRightRoster
CharacterObjectmerchantItemType
InventoryManager.InventoryCategoryTypemarketData
IMarketDatauseBasePrices
boolleftRosterName
TextObjectleftMemberRoster
TroopRosterotherSideCapacityData
InventoryLogic.CapacityData
IsDonatable(ItemObject)
public bool IsDonatable(ItemObject item)
Parameters
item
ItemObject
Returns
IsSlaughterable(ItemObject)
public bool IsSlaughterable(ItemObject item)
Parameters
item
ItemObject
Returns
IsThereAnyChanges()
public bool IsThereAnyChanges()
Returns
Reset(bool)
public void Reset(bool fromCancel)
Parameters
fromCancel
bool
SetInventoryListener(InventoryListener)
public void SetInventoryListener(InventoryListener inventoryListener)
Parameters
inventoryListener
InventoryListener
SetPlayerAcceptTraderOffer()
public void SetPlayerAcceptTraderOffer()
SlaughterItem(ItemRosterElement)
public void SlaughterItem(ItemRosterElement itemRosterElement)
Parameters
itemRosterElement
ItemRosterElement
TransferOne(ItemRosterElement)
public void TransferOne(ItemRosterElement itemRosterElement)
Parameters
itemRosterElement
ItemRosterElement
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).