DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ TakeToDst()

bool GameInventory::TakeToDst ( InventoryMode mode,
notnull InventoryLocation src,
notnull InventoryLocation dst )
inlineprotected

move src to dst

Аргументы
[in]modeinventory mode
[in]srcsource location of the item
[in]dstdestination location of the item

См. определение в файле 3_Game/DayZ/Systems/Inventory/Inventory.c строка 1056

1057 {
1058 bool ret;
1059 switch (mode)
1060 {
1061 case InventoryMode.SERVER:
1062 ret = LocationSyncMoveEntity(src, dst);
1063 if (ret && dst.IsValid())
1064 InventoryInputUserData.SendServerMove(null, InventoryCommandType.SYNC_MOVE, src, dst);
1065 return ret;
1066 case InventoryMode.LOCAL:
1067 ret = LocationSyncMoveEntity(src, dst);
1068 return ret;
1069 default:
1070 return false;
1071 }
1072 return false;
1073 }
InventoryCommandType
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
static proto native bool LocationSyncMoveEntity(notnull InventoryLocation src_loc, notnull InventoryLocation dst_loc)
synchronously removes item from current inventory location and adds it to destination no anims involv...

Перекрестные ссылки LocationSyncMoveEntity() и InventoryInputUserData::SendServerMove().

Используется в DropEntity(), DropEntityInBounds(), DropEntityWithTransform(), TakeEntityAsTargetAttachmentEx(), TakeEntityToCargoEx(), TakeEntityToInventory(), TakeEntityToTargetCargoEx(), TakeEntityToTargetInventory() и ThrowEntityFromInventory().