DayZ 1.24
Loading...
Searching...
No Matches
Inventory.c File Reference

Go to the source code of this file.

Classes

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.
 
enum InventoryCheckContext ITEM
 Find a reservation for the item EXCLUDING the dst, item and dst required.
 
enum InventoryCheckContext DST
 Find a reservation for the dst EXCLUDING the item, item and dst required.
 
enum InventoryCheckContext EQUAL
 Find an exact reservation for item and dst, item and dst required.
 

Enumeration Type Documentation

◆ InventoryCheckContext

Enumerator
DEFAULT 
SYNC_CHECK 

Definition at line 57 of file Inventory.c.

58{
59 DEFAULT,
61}
@ SYNC_CHECK
Definition Inventory.c:60
@ DEFAULT
Definition Inventory.c:59

◆ 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.

3{
4 MOVE,
7 SWAP,
9 DESTROY,
10 REPLACE,
12};
@ SWAP
swap two entities (simple swap of compatible objects)
Definition Inventory.c:7
@ USER_RESERVATION_CANCEL
Clear user reserved inventory space.
Definition Inventory.c:11
@ FORCESWAP
Forced swap two entities. First goes to second's place, second goes "somewhere else".
Definition Inventory.c:8
@ DESTROY
destroy of entity right in inventory
Definition Inventory.c:9
@ REPLACE
replace of entity in inventory (@NOTE: hands goes through HAND_EVENT)
Definition Inventory.c:10
@ SYNC_MOVE
synchronous move. action is finished immeadiately, no animations involved
Definition Inventory.c:5
@ HAND_EVENT
event for hands
Definition Inventory.c:6
@ MOVE
generic move, may involve animations
Definition Inventory.c:4

◆ 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.

14{
15 TAKE,
16 SWAP,
17 //LOAD, ///< load mag from ground
18};
@ TAKE
taking from ground
Definition Inventory.c:15

◆ 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.

22{
24 LOCAL,
25 JUNCTURE,
26 SERVER,
27};
@ SERVER
'Server' mode operation is required if and only if the operation runs only on server (creates and/or ...
Definition Inventory.c:26
@ PREDICTIVE
'Predictive' means that the operation uses Client-Side Prediction, i.e. the action runs the same code...
Definition Inventory.c:23
@ LOCAL
'Local' operation executes from where it is run
Definition Inventory.c:24
@ JUNCTURE
'Juncture' operation is used whenever there is possibility of race condition, i.e....
Definition Inventory.c:25

◆ InventoryValidationReason

Enumerator
UNKNOWN 
JUNCTURE_DENIED 
DROP_PREVENTED 

Definition at line 36 of file Inventory.c.

37{
38 UNKNOWN,
41};
@ DROP_PREVENTED
Definition Inventory.c:40
@ UNKNOWN
Definition Inventory.c:38
@ JUNCTURE_DENIED
Definition Inventory.c:39

◆ 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.

30{
31 FAILED,
34};
@ SUCCESS
Definition Inventory.c:33
@ FAILED
Definition Inventory.c:31

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

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