848 {
849 if( ForceActionCheck(player) )
850 {
852 return;
853 }
854
856 array<ActionBase_Basic> possible_actions;
857 ActionBase action;
858 int i;
859
861 if (player)
862 {
863 CachedEquipmentStorageQuery query = new CachedEquipmentStorageQuery();
867
868 array<Entity> nvgs = player.GetCachedEquipment().GetEntitiesByCategory(query);
870 foreach (Entity nvg : nvgs)
871 {
872 nvgParent =
EntityAI.Cast(nvg).GetHierarchyParent();
873 break;
874 }
875
876 if (nvgParent)
877 {
880 }
881 else
882 ClearForcedTarget();
883 }
884
885 target = m_ForcedTarget;
887
888 if(target && target.GetObject())
889 {
890 target.GetObject().GetActions(this.
Type(), possible_actions);
891 if(possible_actions)
892 {
893 for (i = 0; i < possible_actions.Count(); i++)
894 {
895 action = ActionBase.Cast(possible_actions.Get(i));
896 if ( action.
Can(player, target,
m_MainItem, action_condition_mask) )
897 {
899 return;
900 }
901 }
902 }
903 }
904 }
class ActionTargets ActionTarget
class BaitData m_MainItem
ECachedEquipmentItemCategory
ECachedEquipmentPlacement
bool Can(PlayerBase player, ActionTarget target, ItemBase item, int condition_mask)
ECachedEquipmentItemCategory m_Category
ECachedEquipmentPlacement m_Placement