DayZ 1.24
Loading...
Searching...
No Matches
DeferredSwapEntities Class Reference
Inheritance diagram for DeferredSwapEntities:
[legend]
Collaboration diagram for DeferredSwapEntities:
[legend]

Private Member Functions

void DeferredSwapEntities (InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation dst1, notnull InventoryLocation dst2)
 
override bool ReserveInventory (HumanInventory inventory)
 
override void ClearInventoryReservation (HumanInventory inventory)
 

Private Attributes

EntityAI m_item1
 
EntityAI m_item2
 
ref InventoryLocation m_dst1
 
ref InventoryLocation m_dst2
 

Detailed Description

Definition at line 35 of file DayZPlayerInventory.c.

Constructor & Destructor Documentation

◆ DeferredSwapEntities()

void DeferredSwapEntities::DeferredSwapEntities ( InventoryMode mode,
notnull EntityAI item1,
notnull EntityAI item2,
notnull InventoryLocation dst1,
notnull InventoryLocation dst2 )
inlineprivate

Definition at line 42 of file DayZPlayerInventory.c.

43 {
44 m_mode = mode;
45 m_item1 = item1;
46 m_item2 = item2;
47 m_dst1 = dst1;
48 m_dst2 = dst2;
49 }
InventoryMode m_mode
ref InventoryLocation m_dst1
ref InventoryLocation m_dst2

References m_dst1, m_dst2, m_item1, m_item2, and DeferredEvent::m_mode.

Member Function Documentation

◆ ClearInventoryReservation()

override void DeferredSwapEntities::ClearInventoryReservation ( HumanInventory inventory)
inlineprivate

Definition at line 63 of file DayZPlayerInventory.c.

64 {
65 inventory.ClearInventoryReservationEx(m_item1, m_dst1);
66 inventory.ClearInventoryReservationEx(m_item2, m_dst2);
67 }

References m_dst1, m_dst2, m_item1, and m_item2.

◆ ReserveInventory()

override bool DeferredSwapEntities::ReserveInventory ( HumanInventory inventory)
inlineprivate

Definition at line 51 of file DayZPlayerInventory.c.

52 {
54 return false;
56 {
57 inventory.ClearInventoryReservationEx(m_item1, m_dst1);
58 return false;
59 }
60 return true;
61 }
script counterpart to engine's class Inventory
Definition Inventory.c:79
const int c_InventoryReservationTimeoutShortMS
Definition Inventory.c:688

References GameInventory::c_InventoryReservationTimeoutShortMS, m_dst1, m_dst2, m_item1, and m_item2.

Member Data Documentation

◆ m_dst1

ref InventoryLocation DeferredSwapEntities::m_dst1
private

◆ m_dst2

ref InventoryLocation DeferredSwapEntities::m_dst2
private

◆ m_item1

EntityAI DeferredSwapEntities::m_item1
private

◆ m_item2

EntityAI DeferredSwapEntities::m_item2
private

The documentation for this class was generated from the following file: