Beispiel #1
0
 public Quaternion GetOrientation(Vector2Int origin, [NotNull] CastTargetContext castTargetContext)
 {
     //IL_0023: Unknown result type (might be due to invalid IL or missing references)
     //IL_0028: Unknown result type (might be due to invalid IL or missing references)
     //IL_0029: Unknown result type (might be due to invalid IL or missing references)
     //IL_002a: Unknown result type (might be due to invalid IL or missing references)
     //IL_0030: Unknown result type (might be due to invalid IL or missing references)
     //IL_005c: Unknown result type (might be due to invalid IL or missing references)
     //IL_0061: Unknown result type (might be due to invalid IL or missing references)
     //IL_0063: Unknown result type (might be due to invalid IL or missing references)
     //IL_0064: Unknown result type (might be due to invalid IL or missing references)
     //IL_006b: Unknown result type (might be due to invalid IL or missing references)
     //IL_0092: Unknown result type (might be due to invalid IL or missing references)
     if (m_orientation != null)
     {
         ISingleCoordSelector singleCoordSelector = m_orientation as ISingleCoordSelector;
         if (singleCoordSelector != null && singleCoordSelector.TryGetCoord(castTargetContext, out Coord coord))
         {
             Vector2Int to = (Vector2Int)coord;
             return(origin.GetDirectionTo(to).GetRotation());
         }
         ISingleEntitySelector singleEntitySelector = m_orientation as ISingleEntitySelector;
         if (singleEntitySelector != null && singleEntitySelector.TryGetEntity(castTargetContext, out IEntityWithBoardPresence entity))
         {
             Vector2Int coords = entity.view.cellObject.coords;
             return(origin.GetDirectionTo(coords).GetRotation());
         }
     }
     else
     {
         Log.Warning($"Requested orientation but not orientation target is set (spell definition id: {castTargetContext.spellDefinitionId}).", 78, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Data\\Spells\\SpellEffectInstantiationData.cs");
     }
     return(Quaternion.get_identity());
 }
Beispiel #2
0
        public void PreComputeDelayOverDistance([NotNull] DynamicValueContext castTargetContext)
        {
            //IL_002c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0031: Unknown result type (might be due to invalid IL or missing references)
            //IL_0059: Unknown result type (might be due to invalid IL or missing references)
            //IL_005e: Unknown result type (might be due to invalid IL or missing references)
            if (m_delayOverDistance == null)
            {
                return;
            }
            ISingleTargetSelector origin = m_delayOverDistance.origin;
            ISingleCoordSelector  singleCoordSelector = origin as ISingleCoordSelector;

            if (singleCoordSelector != null && singleCoordSelector.TryGetCoord(castTargetContext, out Coord coord))
            {
                m_delayOverDistanceOrigin = (Vector2Int)coord;
                return;
            }
            ISingleEntitySelector singleEntitySelector = origin as ISingleEntitySelector;

            if (singleEntitySelector != null && singleEntitySelector.TryGetEntity(castTargetContext, out IEntityWithBoardPresence entity))
            {
                m_delayOverDistanceOrigin = entity.view.cellObject.coords;
            }
            else
            {
                Log.Warning("Could not find the origin for the delay over distance.", 115, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Data\\Spells\\SpellEffectInstantiationData.cs");
            }
        }
Beispiel #3
0
        private Coord?TryGetCoord(ISingleTargetSelector selector, DynamicValueContext context)
        {
            //IL_001b: Unknown result type (might be due to invalid IL or missing references)
            ISingleEntitySelector singleEntitySelector = selector as ISingleEntitySelector;

            if (singleEntitySelector != null)
            {
                if (singleEntitySelector.TryGetEntity(context, out IEntityWithBoardPresence entity))
                {
                    return(new Coord(entity.area.refCoord));
                }
                return(null);
            }
            ISingleCoordSelector singleCoordSelector = selector as ISingleCoordSelector;

            if (singleCoordSelector != null)
            {
                if (singleCoordSelector.TryGetCoord(context, out Coord coord))
                {
                    return(coord);
                }
                return(null);
            }
            return(null);
        }
        public static bool SingleTargetToCompareArea(ISingleTargetSelector targetToCompare, DynamicValueContext context, out Area area)
        {
            //IL_0036: Unknown result type (might be due to invalid IL or missing references)
            ISingleEntitySelector singleEntitySelector = targetToCompare as ISingleEntitySelector;

            if (singleEntitySelector != null && singleEntitySelector.TryGetEntity(context, out IEntityWithBoardPresence entity))
            {
                area = entity.area;
                return(true);
            }
            ISingleCoordSelector singleCoordSelector = targetToCompare as ISingleCoordSelector;

            if (singleCoordSelector != null && singleCoordSelector.TryGetCoord(context, out Coord coord))
            {
                area = new PointArea((Vector2Int)coord);
                return(true);
            }
            area = null;
            return(false);
        }
Beispiel #5
0
        private bool TryGetSrcEntityCoords(DynamicValueContext context, out Coord coords)
        {
            //IL_0021: Unknown result type (might be due to invalid IL or missing references)
            ISingleEntitySelector singleEntitySelector = m_startCoords as ISingleEntitySelector;

            if (singleEntitySelector != null)
            {
                if (singleEntitySelector.TryGetEntity(context, out IEntityWithBoardPresence entity))
                {
                    coords = new Coord(entity.area.refCoord);
                    return(true);
                }
                coords = default(Coord);
                return(false);
            }
            ISingleCoordSelector singleCoordSelector = m_startCoords as ISingleCoordSelector;

            if (singleCoordSelector != null)
            {
                return(singleCoordSelector.TryGetCoord(context, out coords));
            }
            coords = default(Coord);
            return(false);
        }