Show / Hide Table of Contents

Class AccountChangeSet

A class used by transfers to track requested changes for account holdings. This allows to perform several transfers within a single pack and check their final result without caring what was happening (and in which order) inbetween. Every change set is bound to not-yet-disposed game action pack.

Inheritance
System.Object
AccountChangeSet
Implements
IGameActionPackChangeSet
Namespace: Eco.Gameplay.Economy.Transfer
Assembly: Eco.Gameplay.dll
Syntax
public class AccountChangeSet : Object, IGameActionPackChangeSet

Constructors

AccountChangeSet()

Declaration
public AccountChangeSet()

Properties

NeedsDispose

Declaration
public bool NeedsDispose { get; }
Property Value
Type Description
System.Boolean

Methods

AddChange(BankAccount, BankAccount, Currency, Single, LocString)

Tries to add new change request.

Declaration
public Result AddChange(BankAccount source, BankAccount target, Currency currency, float delta, LocString transferDesc)
Parameters
Type Name Description
BankAccount source
BankAccount target
Currency currency
System.Single delta
LocString transferDesc
Returns
Type Description
Result

Apply()

Performs the changes without any checks.

Declaration
public void Apply()

GameActionPackDispose()

Declaration
public void GameActionPackDispose()

GameActionPackPostEffect()

Declaration
public LocString GameActionPackPostEffect()
Returns
Type Description
LocString

GameActionPackPretest()

Declaration
public Result GameActionPackPretest()
Returns
Type Description
Result

GetCurrentDelta(BankAccount, Currency)

Sum together the current deltas around the given account to get a total delta.

Declaration
public float GetCurrentDelta(BankAccount account, Currency currency)
Parameters
Type Name Description
BankAccount account
Currency currency
Returns
Type Description
System.Single

Verify()

Ensures that this change set will not result negative holdings.

Declaration
public Result Verify()
Returns
Type Description
Result

Implements

IGameActionPackChangeSet

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾