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

1150 {
1151 if (dst1 == null)
1152 dst1 = new InventoryLocation();
1153
1154 dst1.Copy(src1);
1155 dst1.CopyLocationFrom(src2, false);
1156 dst1.SetFlip(src1.GetItem().GetInventory().GetFlipCargo()); // update flip flag from inventory item
1157
1158 if (dst2 == null)
1159 dst2 = new InventoryLocation();
1160
1161 dst2.Copy(src2);
1162 dst2.CopyLocationFrom(src1, false);
1163 dst2.SetFlip(src2.GetItem().GetInventory().GetFlipCargo()); // update flip flag from inventory item
1164 return true;
1165 }

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