DayZ 1.30
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 строка 1057

1058 {
1059 bool ret;
1060 switch (mode)
1061 {
1062 case InventoryMode.SERVER:
1063 ret = LocationSyncMoveEntity(src, dst);
1064 if (ret && dst.IsValid())
1065 InventoryInputUserData.SendServerMove(null, InventoryCommandType.SYNC_MOVE, src, dst);
1066 return ret;
1067 case InventoryMode.LOCAL:
1068 ret = LocationSyncMoveEntity(src, dst);
1069 return ret;
1070 default:
1071 return false;
1072 }
1073 return false;
1074 }
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().