public override Component Instantiate(Transform parent, ITimelineContextProvider contextProvider) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) if (null == m_visualEffect) { Log.Warning("Tried to instantiate visual character effect named '" + this.get_name() + "' without a visual effect setup.", 95, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Data\\Animations\\VisualCharacterEffect.cs"); return(null); } Vector3 position = parent.get_position() + m_positionOffset; Quaternion rotation = Quaternion.get_identity(); Vector3 scale = Vector3.get_one(); switch (m_orientationMethod) { case OrientationMethod.None: { CameraHandler current = CameraHandler.current; if (null != current) { rotation = current.mapRotation.GetInverseRotation(); } break; } case OrientationMethod.Context: if (contextProvider != null) { (contextProvider.GetTimelineContext() as VisualEffectContext)?.GetVisualEffectTransformation(out rotation, out scale); } break; default: throw new ArgumentOutOfRangeException(); } if (m_sound.get_isValid()) { AudioManager.PlayOneShot(m_sound, parent); } VisualEffect visualEffect = VisualEffectFactory.Instantiate(m_visualEffect, position, rotation, scale, parent); visualEffect.destructionOverride = OnInstanceDestructionRequest; return(visualEffect); }
public static IEnumerator PlayGenericEffect(SpellEffectKey key, int fightId, int?parentEventId, [NotNull] IsoObject target, [CanBeNull] FightContext fightContext) { if (s_spellEffectCache == null || s_currentSpellEffectOverrideData == null) { Log.Error("PlayGenericEffect called while the factory is not ready.", 290, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\FightSpellEffectFactory.cs"); } else { if (((!parentEventId.HasValue || !s_currentSpellEffectOverrideData[fightId].TryGetSpellEffectOverride(key, parentEventId.Value, out SpellEffect value)) && !s_spellEffectCache.TryGetValue(key, out value)) || null == value) { yield break; } CellObject cellObject = target.cellObject; if (null == cellObject) { Log.Warning($"Tried to play generic effect {key} on target named {target.get_name()} ({((object)target).GetType().Name}) but the target is no longer on the board.", 313, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\FightSpellEffectFactory.cs"); yield break; } Transform transform = cellObject.get_transform(); Quaternion rotation = Quaternion.get_identity(); Vector3 scale = Vector3.get_one(); ITimelineContextProvider timelineContextProvider = target as ITimelineContextProvider; switch (value.orientationMethod) { case SpellEffect.OrientationMethod.None: { CameraHandler current = CameraHandler.current; if (null != current) { rotation = current.mapRotation.GetInverseRotation(); } break; } case SpellEffect.OrientationMethod.Context: { VisualEffectContext visualEffectContext; if (timelineContextProvider != null && (visualEffectContext = (timelineContextProvider.GetTimelineContext() as VisualEffectContext)) != null) { visualEffectContext.GetVisualEffectTransformation(out rotation, out scale); } break; } case SpellEffect.OrientationMethod.SpellEffectTarget: Log.Warning($"Spell effect named '{value.get_name()}' orientation method is {SpellEffect.OrientationMethod.SpellEffectTarget} but is not played from a spell.", 346, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\FightSpellEffectFactory.cs"); break; default: throw new ArgumentOutOfRangeException(); } yield return(PlaySpellEffect(value, transform, rotation, scale, 0f, fightContext, timelineContextProvider)); } }
public static IEnumerator PlaySpellEffect([NotNull] SpellEffect spellEffect, Vector2Int coords, [NotNull] SpellEffectInstantiationData instantiationData, [NotNull] CastTargetContext castTargetContext) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) if (!FightMap.current.TryGetCellObject(coords.get_x(), coords.get_y(), out CellObject cellObject)) { yield break; } Transform transform = cellObject.get_transform(); FightContext context = castTargetContext.fightStatus.context; ITimelineContextProvider timelineContextProvider = null; Quaternion rotation = Quaternion.get_identity(); Vector3 scale = Vector3.get_one(); switch (spellEffect.orientationMethod) { case SpellEffect.OrientationMethod.None: { CameraHandler current = CameraHandler.current; if (null != current) { rotation = current.mapRotation.GetInverseRotation(); } break; } case SpellEffect.OrientationMethod.Context: if (cellObject.TryGetIsoObject(out CharacterObject isoObject)) { timelineContextProvider = isoObject; VisualEffectContext visualEffectContext; if ((visualEffectContext = (timelineContextProvider.GetTimelineContext() as VisualEffectContext)) != null) { visualEffectContext.GetVisualEffectTransformation(out rotation, out scale); } } else { Log.Warning($"Spell effect named '{spellEffect.get_name()}' orientation method is {SpellEffect.OrientationMethod.Context} but context provider could not be found.", 426, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\FightSpellEffectFactory.cs"); } break; case SpellEffect.OrientationMethod.SpellEffectTarget: rotation = instantiationData.GetOrientation(coords, castTargetContext); break; default: throw new ArgumentOutOfRangeException(); } float delayOverDistance = instantiationData.GetDelayOverDistance(coords); yield return(PlaySpellEffect(spellEffect, transform, rotation, scale, delayOverDistance, context, timelineContextProvider)); }
public static T GetContext <T>(PlayableGraph graph) where T : class, ITimelineContext { //IL_0013: Unknown result type (might be due to invalid IL or missing references) PropertyName val = default(PropertyName); val._002Ector("context"); bool flag = default(bool); ITimelineContextProvider timelineContextProvider = graph.GetResolver().GetReferenceValue(val, ref flag) as ITimelineContextProvider; if (timelineContextProvider == null) { return(null); } return(timelineContextProvider.GetTimelineContext() as T); }
public static IEnumerator PlaySpellEffect([NotNull] SpellEffect spellEffect, [NotNull] IsoObject view, [NotNull] SpellEffectInstantiationData instantiationData, [NotNull] CastTargetContext castTargetContext) { CellObject cellObject = view.cellObject; if (null == cellObject) { Log.Warning("Tried to play spell effect " + spellEffect.get_name() + " on target named " + view.get_name() + " (" + ((object)view).GetType().Name + ") but the target is no longer on the board.", 449, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\FightSpellEffectFactory.cs"); yield break; } Transform transform = cellObject.get_transform(); FightContext context = castTargetContext.fightStatus.context; ITimelineContextProvider timelineContextProvider = view as ITimelineContextProvider; Quaternion rotation = Quaternion.get_identity(); Vector3 scale = Vector3.get_one(); switch (spellEffect.orientationMethod) { case SpellEffect.OrientationMethod.None: { CameraHandler current = CameraHandler.current; if (null != current) { rotation = current.mapRotation.GetInverseRotation(); } break; } case SpellEffect.OrientationMethod.Context: { VisualEffectContext visualEffectContext; if (timelineContextProvider != null && (visualEffectContext = (timelineContextProvider.GetTimelineContext() as VisualEffectContext)) != null) { visualEffectContext.GetVisualEffectTransformation(out rotation, out scale); } break; } case SpellEffect.OrientationMethod.SpellEffectTarget: rotation = instantiationData.GetOrientation(cellObject.coords, castTargetContext); break; default: throw new ArgumentOutOfRangeException(); } float delayOverDistance = instantiationData.GetDelayOverDistance(cellObject.coords); yield return(PlaySpellEffect(spellEffect, transform, rotation, scale, delayOverDistance, context, timelineContextProvider)); }
public override Component Instantiate(Transform parent, ITimelineContextProvider contextProvider) { //IL_00ae: Unknown result type (might be due to invalid IL or missing references) if (null == m_animatedObjectDefinition) { Log.Warning("Tried to instantiate animated object character effect named '" + this.get_name() + "' without an animated object definition setup.", 90, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Data\\Animations\\AnimatedObjectCharacterEffect.cs"); return(null); } string animationName; if (!string.IsNullOrEmpty(m_animationName)) { if (m_appendDirectionSuffix && contextProvider != null) { Direction direction = Direction.None; CharacterObjectContext characterObjectContext = contextProvider.GetTimelineContext() as CharacterObjectContext; if (characterObjectContext != null) { CharacterObject characterObject = characterObjectContext.characterObject; if (null != characterObject) { direction = characterObject.direction; } } animationName = ((direction != Direction.None) ? (m_animationName + (int)direction) : m_animationName); } else { animationName = m_animationName; } } else { animationName = string.Empty; } if (m_sound.get_isValid()) { AudioManager.PlayOneShot(m_sound, parent); } return(FightObjectFactory.CreateAnimatedObjectEffectInstance(m_animatedObjectDefinition, animationName, parent)); }
public override Component Instantiate(Transform parent, ITimelineContextProvider contextProvider) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0060: 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) if (null == m_timelineAsset) { Log.Warning("Tried to instantiate timeline asset character effect named '" + this.get_name() + "' without a timeline asset setup.", 44, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Data\\Animations\\TimelineAssetCharacterEffect.cs"); return(null); } Quaternion rotation = Quaternion.get_identity(); Vector3 scale = Vector3.get_one(); VisualEffectContext visualEffectContext; if (contextProvider != null && (visualEffectContext = (contextProvider.GetTimelineContext() as VisualEffectContext)) != null) { visualEffectContext.GetVisualEffectTransformation(out rotation, out scale); } return(FightObjectFactory.CreateTimelineAssetEffectInstance(m_timelineAsset, parent, rotation, scale, null, contextProvider)); }