DayZ 1.27
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

См. определение в файле Inventory.c строка 1190

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

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