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

◆ PerformCombination()

bool Icon::PerformCombination ( EntityAI selectedEntity,
EntityAI targetEntity,
int combinationFlag,
InventoryLocation ilSwapDst = null )
inlineprotected

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

515 {
516 PlayerBase player = PlayerBase.Cast(g_Game.GetPlayer());
517 ActionManagerClient amc;
518
519 switch (combinationFlag)
520 {
521 case InventoryCombinationFlags.ADD_AS_ATTACHMENT:
522 return player.PredictiveTakeEntityToTargetAttachment(targetEntity, selectedEntity);
523 case InventoryCombinationFlags.ADD_AS_CARGO:
524 SplitItemUtils.TakeOrSplitToInventory(player, targetEntity, selectedEntity);
525 return true;
526 case InventoryCombinationFlags.COMBINE_QUANTITY2:
527 targetEntity.CombineItemsClient(selectedEntity);
528 return true;
529 case InventoryCombinationFlags.SET_ACTION:
530 Class.CastTo(amc, player.GetActionManager());
531 if (targetEntity == player.GetEntityInHands())
532 {
533 amc.SetActionFromInventory(ItemBase.Cast(targetEntity), ItemBase.Cast(selectedEntity));
534 }
535 else
536 {
537 amc.SetActionFromInventory(ItemBase.Cast(selectedEntity), ItemBase.Cast(targetEntity));
538 }
539 return true;
540 case InventoryCombinationFlags.PERFORM_ACTION:
541 Class.CastTo(amc, player.GetActionManager());
542 if (targetEntity == player.GetEntityInHands())
543 {
544 amc.PerformActionFromInventory(ItemBase.Cast(targetEntity), ItemBase.Cast(selectedEntity));
545 }
546 else
547 {
548 amc.PerformActionFromInventory(ItemBase.Cast(selectedEntity), ItemBase.Cast(targetEntity));
549 }
550 return true;
551 case InventoryCombinationFlags.SWAP_MAGAZINE:
552 return player.GetWeaponManager().SwapMagazine(Magazine.Cast(selectedEntity));
553 case InventoryCombinationFlags.SWAP:
554 return player.PredictiveSwapEntities(targetEntity, selectedEntity);
555 case InventoryCombinationFlags.FSWAP:
556 return player.PredictiveForceSwapEntities(selectedEntity, targetEntity, ilSwapDst);
557 default:
558 return false;
559 }
560
561 return false;
562 }
DayZGame g_Game
Определения DayZGame.c:4074
class GP5GasMask extends MaskBase ItemBase
void SetActionFromInventory(ItemBase mainItem, ItemBase targetItem)
Определения ActionManagerClient.c:1285
void PerformActionFromInventory(ItemBase mainItem, ItemBase targetItem)
Определения ActionManagerClient.c:1148

Перекрестные ссылки InventoryCombinationFlags::ADD_AS_ATTACHMENT, InventoryCombinationFlags::ADD_AS_CARGO, Class::CastTo(), InventoryCombinationFlags::COMBINE_QUANTITY2, InventoryCombinationFlags::FSWAP, g_Game, InventoryCombinationFlags::PERFORM_ACTION, ActionManagerClient::PerformActionFromInventory(), InventoryCombinationFlags::SET_ACTION, ActionManagerClient::SetActionFromInventory(), InventoryCombinationFlags::SWAP, InventoryCombinationFlags::SWAP_MAGAZINE и SplitItemUtils::TakeOrSplitToInventory().

Используется в Combine(), DropReceivedFromMain() и Swap().