Table of Contents

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 MobileParty
ownerCharacter CharacterObject
merchantParty PartyBase

InventoryLogic(PartyBase)

public InventoryLogic(PartyBase merchantParty)

Parameters

merchantParty PartyBase

Fields

IsPreviewingItem

public bool IsPreviewingItem

Field Value

bool

MerchantItemType

public InventoryManager.InventoryCategoryType MerchantItemType

Field Value

InventoryManager.InventoryCategoryType

Properties

CurrentMobileParty

public MobileParty CurrentMobileParty { get; }

Property Value

MobileParty

CurrentSettlementComponent

public SettlementComponent CurrentSettlementComponent { get; }

Property Value

SettlementComponent

DisableNetwork

public bool DisableNetwork { get; set; }

Property Value

bool

DonationXpChange

public Action DonationXpChange { get; set; }

Property Value

Action

InitialEquipmentCharacter

public CharacterObject InitialEquipmentCharacter { get; }

Property Value

CharacterObject

InventoryListener

public InventoryListener InventoryListener { get; }

Property Value

InventoryListener

IsDiscardDonating

public bool IsDiscardDonating { get; }

Property Value

bool

IsOtherPartyFromPlayerClan

public bool IsOtherPartyFromPlayerClan { get; }

Property Value

bool

IsSpecialActionsPermitted

public bool IsSpecialActionsPermitted { get; }

Property Value

bool

IsTrading

public bool IsTrading { get; }

Property Value

bool

LeftMemberRoster

public TroopRoster LeftMemberRoster { get; }

Property Value

TroopRoster

LeftRosterName

public TextObject LeftRosterName { get; }

Property Value

TextObject

MarketData

public IMarketData MarketData { get; }

Property Value

IMarketData

OppositePartyFromListener

public PartyBase OppositePartyFromListener { get; }

Property Value

PartyBase

OtherParty

public PartyBase OtherParty { get; }

Property Value

PartyBase

OtherSideCapacityData

public InventoryLogic.CapacityData OtherSideCapacityData { get; }

Property Value

InventoryLogic.CapacityData

OwnerCharacter

public CharacterObject OwnerCharacter { get; }

Property Value

CharacterObject

OwnerParty

public MobileParty OwnerParty { get; }

Property Value

MobileParty

RightMemberRoster

public TroopRoster RightMemberRoster { get; }

Property Value

TroopRoster

TotalAmount

public int TotalAmount { get; }

Property Value

int

TotalAmountChange

public Action<int> TotalAmountChange { get; set; }

Property Value

Action<int>

TransactionDebt

public int TransactionDebt { get; }

Property Value

int

XpGainFromDonations

public float XpGainFromDonations { get; }

Property Value

float

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 ItemRosterElement
sideOfItem InventoryLogic.InventorySide

Returns

bool

CanInventoryCapacityIncrease(InventorySide)

public bool CanInventoryCapacityIncrease(InventoryLogic.InventorySide side)

Parameters

side InventoryLogic.InventorySide

Returns

bool

CanPlayerCompleteTransaction()

public bool CanPlayerCompleteTransaction()

Returns

bool

CanSlaughterItem(ItemRosterElement, InventorySide)

public bool CanSlaughterItem(ItemRosterElement element, InventoryLogic.InventorySide sideOfItem)

Parameters

element ItemRosterElement
sideOfItem InventoryLogic.InventorySide

Returns

bool

CheckItemRosterHasElement(InventorySide, ItemRosterElement, int)

public bool CheckItemRosterHasElement(InventoryLogic.InventorySide side, ItemRosterElement rosterElement, int number)

Parameters

side InventoryLogic.InventorySide
rosterElement ItemRosterElement
number int

Returns

bool

DonateItem(ItemRosterElement)

public void DonateItem(ItemRosterElement itemRosterElement)

Parameters

itemRosterElement ItemRosterElement

DoneLogic()

public bool DoneLogic()

Returns

bool

FindItemFromSide(InventorySide, EquipmentElement)

public ItemRosterElement? FindItemFromSide(InventoryLogic.InventorySide side, EquipmentElement item)

Parameters

side InventoryLogic.InventorySide
item EquipmentElement

Returns

ItemRosterElement?

GetAveragePriceFactorItemCategory(ItemCategory)

public float GetAveragePriceFactorItemCategory(ItemCategory category)

Parameters

category ItemCategory

Returns

float

GetBoughtItems()

public List<(ItemRosterElement, int)> GetBoughtItems()

Returns

List<(ItemRosterElement, int)>

GetCanItemIncreaseInventoryCapacity(ItemObject)

public bool GetCanItemIncreaseInventoryCapacity(ItemObject item)

Parameters

item ItemObject

Returns

bool

GetCostOfItemRosterElement(ItemRosterElement, InventorySide)

public int GetCostOfItemRosterElement(ItemRosterElement itemRosterElement, InventoryLogic.InventorySide side)

Parameters

itemRosterElement ItemRosterElement
side InventoryLogic.InventorySide

Returns

int

GetElementCountOnSide(InventorySide)

public int GetElementCountOnSide(InventoryLogic.InventorySide side)

Parameters

side InventoryLogic.InventorySide

Returns

int

GetElementsInInitialRoster(InventorySide)

public IEnumerable<ItemRosterElement> GetElementsInInitialRoster(InventoryLogic.InventorySide side)

Parameters

side InventoryLogic.InventorySide

Returns

IEnumerable<ItemRosterElement>

GetElementsInRoster(InventorySide)

public IEnumerable<ItemRosterElement> GetElementsInRoster(InventoryLogic.InventorySide side)

Parameters

side InventoryLogic.InventorySide

Returns

IEnumerable<ItemRosterElement>

GetItemPrice(EquipmentElement, bool)

public int GetItemPrice(EquipmentElement equipmentElement, bool isBuying = false)

Parameters

equipmentElement EquipmentElement
isBuying bool

Returns

int

GetItemTotalPrice(ItemRosterElement, int, out int, bool)

public int GetItemTotalPrice(ItemRosterElement itemRosterElement, int absStockChange, out int lastPrice, bool isBuying)

Parameters

itemRosterElement ItemRosterElement
absStockChange int
lastPrice int
isBuying bool

Returns

int

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 ItemRoster
party MobileParty
isTrading bool
isSpecialActionsPermitted bool
initialCharacterOfRightRoster CharacterObject
merchantItemType InventoryManager.InventoryCategoryType
marketData IMarketData
useBasePrices bool
leftRosterName TextObject
leftMemberRoster TroopRoster
otherSideCapacityData 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 ItemRoster
rightItemRoster ItemRoster
rightMemberRoster TroopRoster
isTrading bool
isSpecialActionsPermitted bool
initialCharacterOfRightRoster CharacterObject
merchantItemType InventoryManager.InventoryCategoryType
marketData IMarketData
useBasePrices bool
leftRosterName TextObject
leftMemberRoster TroopRoster
otherSideCapacityData InventoryLogic.CapacityData

IsDonatable(ItemObject)

public bool IsDonatable(ItemObject item)

Parameters

item ItemObject

Returns

bool

IsSlaughterable(ItemObject)

public bool IsSlaughterable(ItemObject item)

Parameters

item ItemObject

Returns

bool

IsThereAnyChanges()

public bool IsThereAnyChanges()

Returns

bool

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

InventoryLogic.AfterResetDelegate

AfterTransfer

public event InventoryLogic.ProcessResultListDelegate AfterTransfer

Event Type

InventoryLogic.ProcessResultListDelegate

This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).