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

◆ PlayerCheckSwapItemsRequest()

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

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

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

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

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