Doloro GDK 22 .1.0 Beta
by Tauri Interactive
|
A service that manages entire operation with Storage
content, both for isolated storages and in cross-storages operation.
The service prevents operation from popular bugs like references forge or items dupe, by encapsulated tracking process of entire content during in-game actions.
Read also: Storage
The service implemented as a static API class that always available to access. You may reach it via TransactionService
class call. More details about usage practices you may find in How to ... category at the Transaction Service section.
Explore API: Doloro.InvetorySystem.TransactionService
Reservation is the one of main core operation of the services that guaranties that the items can't be used by not authorized requesters. It allows to proof that the operating items exists from the transaction beginning to its end and never appears / disappears from nowhere.
As soon as Storage
can be extended with Features implementations it also may require custom reservation operations to embed the features to the transaction service logic.
Explore API: Doloro.InvetorySystem.IReservationAgent
At the moment reservation agents can be connect to the service via AStorageFeature
with implemented IReservationAgent
interface added to a Storage
game object.
During transaction operations the service looking for agents over the order participating Storage
instances. According with order stage it calls related agent handlers to perform they internal logic.
To create a new feature with reservation operation you need to follow next template:
A common practice you may require a way to decline order placement in case if reservation isn't possible.
For that instead of deriving the AStorageFeature
class, derive you class from AMaskStorageFeature
where you may implement a custom OnTrasactionMask
logic.
The package has several implementations of reservation agent features. We recommend exploring the source of following components to ramp up with implementation practices.
Feature | Reservation practice |
---|---|
StorageWeightLimiter | Reserves weight of storage along with entire incomplete operations, preventing from placing new order that will lead to storage overflow. |
StorageSlotsLimiter | Reserves item slots in Storage for entire incomplete operations preventing from usage of extra over the defined limit. |
StorageVolume | Reserves volumetric space required from transaction items placement. |
Explore API: