Exemplo n.º 1
0
 public override void PopulateFromJson(JObject jsonObject)
 {
     base.PopulateFromJson(jsonObject);
     m_invocationOwner          = ISingleEntitySelectorUtils.FromJsonProperty(jsonObject, "invocationOwner");
     m_destination              = ISingleCoordSelectorUtils.FromJsonProperty(jsonObject, "destination");
     m_copyNonHealableLifeValue = Serialization.JsonTokenValue <bool?>(jsonObject, "copyNonHealableLifeValue", (bool?)null);
 }
Exemplo n.º 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");
            }
        }
Exemplo n.º 3
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());
 }
Exemplo n.º 4
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 override void PopulateFromJson(JObject jsonObject)
 {
     base.PopulateFromJson(jsonObject);
     m_destination  = ISingleCoordSelectorUtils.FromJsonProperty(jsonObject, "destination");
     m_movementType = (MovementType)Serialization.JsonTokenValue <int>(jsonObject, "movementType", 3);
     m_allowTeleportOnTargetEntity = Serialization.JsonTokenValue <bool>(jsonObject, "allowTeleportOnTargetEntity", false);
 }
        public void PopulateFromJson(JObject jsonObject)
        {
            m_from = ISingleCoordSelectorUtils.FromJsonProperty(jsonObject, "from");
            JArray val = Serialization.JsonArray(jsonObject, "onlyIf");

            m_onlyIf = new List <ICoordFilter>((val != null) ? val.get_Count() : 0);
            if (val != null)
            {
                foreach (JToken item in val)
                {
                    m_onlyIf.Add(ICoordFilterUtils.FromJsonToken(item));
                }
            }
        }
        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);
        }
Exemplo n.º 8
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);
        }
Exemplo n.º 9
0
 public override void PopulateFromJson(JObject jsonObject)
 {
     base.PopulateFromJson(jsonObject);
     m_from = ISingleCoordSelectorUtils.FromJsonProperty(jsonObject, "from");
 }
        public static ISingleCoordSelector FromJsonProperty(JObject jsonObject, string propertyName, ISingleCoordSelector defaultValue = null)
        {
            //IL_0011: Unknown result type (might be due to invalid IL or missing references)
            //IL_0018: Invalid comparison between Unknown and I4
            JProperty val = jsonObject.Property(propertyName);

            if (val == null || (int)val.get_Value().get_Type() == 10)
            {
                return(defaultValue);
            }
            return(FromJsonToken(val.get_Value()));
        }