public bool TryGetSpellEffectOverride(SpellEffectKey key, out SpellEffect spellEffect) { if (m_spellEffectOverrides == null) { spellEffect = null; return(false); } return(((Dictionary <SpellEffectKey, SpellEffect>)m_spellEffectOverrides).TryGetValue(key, out spellEffect)); }
public bool TryGetSpellEffectOverride(SpellEffectKey key, int parentEventId, out SpellEffect spellEffect) { if (m_spellDefinition == null || parentEventId != m_eventId) { spellEffect = null; return(false); } return(m_spellDefinition.TryGetSpellEffectOverride(key, out spellEffect)); }
public bool TryGetSpellEffectOverride(SpellEffectKey key, out SpellEffect spellEffect) { if (m_spellEffectOverrides == null) { spellEffect = null; return(false); } return(m_spellEffectOverrides.TryGetValue(key, out spellEffect)); }
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 bool TryGetSpellEffect(SpellEffectKey key, int fightId, int?parentEventId, out SpellEffect spellEffect) { if (s_spellEffectCache == null || s_currentSpellEffectOverrideData == null) { Log.Error("TryGetSpellEffect called while the factory is not ready.", 270, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\FightSpellEffectFactory.cs"); spellEffect = null; return(false); } if (parentEventId.HasValue && s_currentSpellEffectOverrideData[fightId].TryGetSpellEffectOverride(key, parentEventId.Value, out spellEffect)) { return(true); } return(s_spellEffectCache.TryGetValue(key, out spellEffect)); }
public static IEnumerator PlayGenericEffect(SpellEffectKey key, int fightId, int?parentEventId, [NotNull] Transform parent, Quaternion rotation, Vector3 scale, [CanBeNull] FightContext fightContext, [CanBeNull] ITimelineContextProvider contextProvider) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) SpellEffect spellEffect; if (s_spellEffectCache == null || s_currentSpellEffectOverrideData == null) { Log.Error("PlayGenericEffect called while the factory is not ready.", 361, "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)) || s_spellEffectCache.TryGetValue(key, out spellEffect)) && !(null == spellEffect)) { yield return(PlaySpellEffect(spellEffect, parent, rotation, scale, 0f, fightContext, contextProvider)); } }