Table of Contents

Class TradeExchange.Applied

Namespace
FishMMO.Server.Implementation.World.SceneServer
Assembly
FishMMO.Server.dll

An exchange that has been applied to memory and can still be taken back.

public sealed class TradeExchange.Applied
Inheritance
TradeExchange.Applied
Inherited Members

Remarks

Exists because the trade commits to the database BEFORE it is final: memory is mutated while both characters' row locks are held, the rows are written, and only then is the transaction committed. If the write is refused the memory mutation has to be undone exactly, and this holds what that takes. It is only exact while every slot in TouchedSlots stays locked, which the caller guarantees.

Properties

IsUndone

True once Undo() has run.

public bool IsUndone { get; }

Property Value

bool

Methods

Undo()

Puts both inventories back exactly as they were before the exchange. Idempotent.

public void Undo()