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
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
Returns
Apply()
Performs the changes without any checks.
Declaration
GameActionPackDispose()
Declaration
public void GameActionPackDispose()
GameActionPackPostEffect()
Declaration
public LocString GameActionPackPostEffect()
Returns
GameActionPackPretest()
Declaration
public Result GameActionPackPretest()
Returns
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
Returns
Type |
Description |
System.Single |
|
Verify()
Ensures that this change set will not result negative holdings.
Declaration
Returns
Implements
Extension Methods