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

◆ PlayerCheckSwapItemsRequest()

bool PlayerCheckSwapItemsRequest ( notnull InventoryLocation src1,
notnull InventoryLocation src2,
notnull InventoryLocation dst1,
notnull InventoryLocation dst2,
float radius )
protected

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

2539 {
2540 bool result = true;
2541
2542 EntityAI ent = dst1.GetParent();
2543 PlayerBase player;
2544 if ( ent )
2545 {
2546 player = PlayerBase.Cast(ent.GetHierarchyRootPlayer());
2547 if (player)
2548 {
2549 if ( GetDayZPlayerOwner() != player )
2550 {
2551 if (player.IsAlive())
2552 {
2553 if (!player.IsRestrained() && !player.IsUnconscious())
2554 {
2555 return false;
2556 }
2557 }
2558 }
2559 }
2560 }
2561
2562 ent = dst2.GetParent();
2563 if ( ent )
2564 {
2565 player = PlayerBase.Cast(ent.GetHierarchyRootPlayer());
2566 if (player)
2567 {
2568 if ( GetDayZPlayerOwner() != player )
2569 {
2570 if (player.IsAlive())
2571 {
2572 if (!player.IsRestrained() && !player.IsUnconscious())
2573 {
2574 return false;
2575 }
2576 }
2577 }
2578 }
2579 }
2580
2581
2582 if ( result )
2583 {
2584 result = CheckSwapItemsRequest( GetManOwner(), src1, src2, dst1, dst2, GameInventory.c_MaxItemDistanceRadius);
2585 }
2586
2587 return result;
2588
2589 }
DayZPlayer GetDayZPlayerOwner()
Определения DayZPlayerInventory.c:168
const float c_MaxItemDistanceRadius
anti-cheats
script counterpart to engine's class Inventory
Определения PlayerBaseClient.c:2

Перекрестные ссылки GameInventory::c_MaxItemDistanceRadius и GetDayZPlayerOwner().

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