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

◆ PredictiveForceSwapEntities()

override bool ManBase::PredictiveForceSwapEntities ( notnull EntityAI item1,
notnull EntityAI item2,
notnull InventoryLocation item2_dst )
inlineprotected

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

8484 {
8485 InventoryLocation il = new InventoryLocation;
8486 if (item1.IsHeavyBehaviour() && item1.GetInventory().GetCurrentInventoryLocation(il) && il.GetType() == InventoryLocationType.GROUND && !m_ActionManager.GetRunningAction())
8487 {
8488 //Print("override bool PredictiveForceSwapEntities (notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)");
8489 ActionManagerClient mngr_client;
8490 CastTo(mngr_client,m_ActionManager);
8491
8492 ActionTarget atrg = new ActionTarget(item1,null,-1,vector.Zero,-1.0);
8493 if (mngr_client.GetAction(ActionSwapItemToHands).Can(this,atrg,ItemBase.Cast(item2)))
8494 {
8495 mngr_client.PerformActionStart(mngr_client.GetAction(ActionSwapItemToHands),atrg,ItemBase.Cast(item2));
8496 }
8497 return true;
8498 }
8499 else
8500 return super.PredictiveForceSwapEntities(item1, item2, item2_dst);
8501 }
class ActionTargets ActionTarget
class GP5GasMask extends MaskBase ItemBase
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
void PerformActionStart(ActionBase action, ActionTarget target, ItemBase item, Param extra_data=NULL)
Определения ActionManagerClient.c:762
proto native int GetType()
returns type of InventoryLocation
ActionManagerBase m_ActionManager
Определения PlayerBase.c:43

Перекрестные ссылки ActionTarget, InventoryLocation::GetType(), m_ActionManager, ActionManagerClient::PerformActionStart() и vector::Zero.

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