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

◆ MakeDstForSwap()

static bool GameInventory::MakeDstForSwap ( notnull InventoryLocation src1,
notnull InventoryLocation src2,
out InventoryLocation dst1,
out InventoryLocation dst2 )
inlinestaticprotected

helper function for swap

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

1193 {
1194 if (dst1 == null)
1195 dst1 = new InventoryLocation();
1196
1197 dst1.Copy(src1);
1198 dst1.CopyLocationFrom(src2, false);
1199 dst1.SetFlip(src1.GetItem().GetInventory().GetFlipCargo()); // update flip flag from inventory item
1200
1201 if (dst2 == null)
1202 dst2 = new InventoryLocation();
1203
1204 dst2.Copy(src2);
1205 dst2.CopyLocationFrom(src1, false);
1206 dst2.SetFlip(src2.GetItem().GetInventory().GetFlipCargo()); // update flip flag from inventory item
1207 return true;
1208 }

Используется в MakeSrcAndDstForSwap().