Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
inventory.c File Reference

Go to the source code of this file.

Data Structures

class  InventoryValidation
 
class  GameInventory
 script counterpart to engine's class Inventory More...
 

Enumerations

enum  InventoryCommandType {
  MOVE, SYNC_MOVE, HAND_EVENT, SWAP,
  FORCESWAP, DESTROY, REPLACE, USER_RESERVATION_CANCEL
}
 
enum  InventoryJunctureType { TAKE, SWAP }
 
enum  InventoryMode { PREDICTIVE, LOCAL, JUNCTURE, SERVER }
 NOTE: PREDICTIVE is not to be used at all in multiplayer. More...
 
enum  InventoryValidationResult { FAILED, JUNCTURE, SUCCESS }
 
enum  InventoryValidationReason { UNKNOWN, JUNCTURE_DENIED, DROP_PREVENTED }
 
enum  InventoryCheckContext { DEFAULT, SYNC_CHECK }
 

Variables

enum InventoryCheckContext LEGACY
 The original logic, finds anything depending on the parameters, item or dst required. More...
 
enum InventoryCheckContext ITEM
 Find a reservation for the item EXCLUDING the dst, item and dst required. More...
 
enum InventoryCheckContext DST
 Find a reservation for the dst EXCLUDING the item, item and dst required. More...
 
enum InventoryCheckContext EQUAL
 Find an exact reservation for item and dst, item and dst required. More...
 

Enumeration Type Documentation

◆ InventoryCheckContext

Enumerator
DEFAULT 
SYNC_CHECK 

Definition at line 57 of file inventory.c.

◆ InventoryCommandType

Enumerator
MOVE 

generic move, may involve animations

SYNC_MOVE 

synchronous move. action is finished immeadiately, no animations involved

HAND_EVENT 

event for hands

SWAP 

swap two entities (simple swap of compatible objects)

swapping from ground

FORCESWAP 

Forced swap two entities. First goes to second's place, second goes "somewhere else".

DESTROY 

destroy of entity right in inventory

REPLACE 

replace of entity in inventory (@NOTE: hands goes through HAND_EVENT)

USER_RESERVATION_CANCEL 

Clear user reserved inventory space.

Definition at line 2 of file inventory.c.

◆ InventoryJunctureType

Enumerator
TAKE 

taking from ground

SWAP 

swap two entities (simple swap of compatible objects)

swapping from ground

Definition at line 13 of file inventory.c.

◆ InventoryMode

NOTE: PREDICTIVE is not to be used at all in multiplayer.

Enumerator
PREDICTIVE 

'Predictive' means that the operation uses Client-Side Prediction, i.e. the action runs the same code on both, client AND server

LOCAL 

'Local' operation executes from where it is run

JUNCTURE 

'Juncture' operation is used whenever there is possibility of race condition, i.e. two players picking same item from ground

SERVER 

'Server' mode operation is required if and only if the operation runs only on server (creates and/or destroys objects)

Definition at line 21 of file inventory.c.

◆ InventoryValidationReason

Enumerator
UNKNOWN 
JUNCTURE_DENIED 
DROP_PREVENTED 

Definition at line 36 of file inventory.c.

◆ InventoryValidationResult

Enumerator
FAILED 
JUNCTURE 

'Juncture' operation is used whenever there is possibility of race condition, i.e. two players picking same item from ground

SUCCESS 

Definition at line 29 of file inventory.c.

Variable Documentation

◆ DST

Find a reservation for the dst EXCLUDING the item, item and dst required.

◆ EQUAL

Find an exact reservation for item and dst, item and dst required.

◆ ITEM

Find a reservation for the item EXCLUDING the dst, item and dst required.

◆ LEGACY

enum InventoryCheckContext LEGACY

The original logic, finds anything depending on the parameters, item or dst required.