public override IEnumerator UpdateView(FightStatus fightStatus) { int fightId = fightStatus.fightId; if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithBoardPresence entity)) { IsoObject isoObject = entity.view; if (null != isoObject) { switch (movementType) { case 1: { IObjectWithMovement objectWithMovement6; if ((objectWithMovement6 = (isoObject as IObjectWithMovement)) != null) { yield return(objectWithMovement6.Move(GetPath())); } else { Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithMovement>(entity), 71, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntityAreaMovedEvent.cs"); } break; } case 3: { IMovableObject movableObject; IMovableObject objectWithMovement3 = movableObject = (isoObject as IMovableObject); if (movableObject != null) { FightContext fightContext = fightStatus.context; yield return(FightSpellEffectFactory.PlayGenericEffect(SpellEffectKey.TeleportationStart, fightId, parentEventId, isoObject, fightContext)); objectWithMovement3.Teleport(GetDestination()); yield return(FightSpellEffectFactory.PlayGenericEffect(SpellEffectKey.TeleportationEnd, fightId, parentEventId, isoObject, fightContext)); } else { Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithMovement>(entity), 88, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntityAreaMovedEvent.cs"); } break; } case 6: { IMovableObject movableObject; IMovableObject objectWithMovement3 = movableObject = (isoObject as IMovableObject); if (movableObject != null) { Vector2Int[] path2 = GetPath(); Quaternion pathRotation2 = GetPathRotation(path2); Transform transform2 = isoObject.cellObject.get_transform(); ITimelineContextProvider contextProvider2 = isoObject as ITimelineContextProvider; yield return(FightSpellEffectFactory.PlayGenericEffect(SpellEffectKey.Push, fightId, parentEventId, transform2, pathRotation2, Vector3.get_one(), fightStatus.context, contextProvider2)); yield return(objectWithMovement3.Push(path2)); } else { Log.Error(FightEventErrors.EntityHasIncompatibleView <IMovableObject>(entity), 108, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntityAreaMovedEvent.cs"); } break; } case 7: { IMovableObject movableObject; IMovableObject objectWithMovement3 = movableObject = (isoObject as IMovableObject); if (movableObject != null) { Vector2Int[] path2 = GetPath(); Quaternion pathRotation = GetPathRotation(path2); Transform transform = isoObject.cellObject.get_transform(); ITimelineContextProvider contextProvider = isoObject as ITimelineContextProvider; yield return(FightSpellEffectFactory.PlayGenericEffect(SpellEffectKey.Pull, fightId, parentEventId, transform, pathRotation, Vector3.get_one(), fightStatus.context, contextProvider)); yield return(objectWithMovement3.Pull(path2)); } else { Log.Error(FightEventErrors.EntityHasIncompatibleView <IMovableObject>(entity), 128, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntityAreaMovedEvent.cs"); } break; } case 2: case 4: { IObjectWithMovement objectWithMovement5; if ((objectWithMovement5 = (isoObject as IObjectWithMovement)) != null) { Direction direction2 = (Direction)this.direction; yield return(objectWithMovement5.MoveToAction(GetPath(), direction2)); } else { Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithMovement>(entity), 143, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntityAreaMovedEvent.cs"); } break; } case 8: { IObjectWithMovement objectWithMovement4; if ((objectWithMovement4 = (isoObject as IObjectWithMovement)) != null) { Direction direction = (Direction)this.direction; yield return(objectWithMovement4.MoveToAction(GetPath(), direction, hasFollowUpAnimation: false)); } else { Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithMovement>(entity), 157, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntityAreaMovedEvent.cs"); } break; } default: throw new ArgumentOutOfRangeException(); } if (IsMovementAction()) { IObjectWithAction objectWithAction; if ((objectWithAction = (isoObject as IObjectWithAction)) != null) { objectWithAction.SetActionUsed(actionUsed: true, turnEnded: false); } else { Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithAction>(entity), 174, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntityAreaMovedEvent.cs"); } } ICharacterObject characterObject; if ((characterObject = (isoObject as ICharacterObject)) != null) { characterObject.CheckParentCellIndicator(); } } else { Log.Error(FightEventErrors.EntityHasNoView(entity), 185, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntityAreaMovedEvent.cs"); } } else { Log.Error(FightEventErrors.EntityNotFound <IEntityWithBoardPresence>(concernedEntity), 190, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntityAreaMovedEvent.cs"); } FightLogicExecutor.FireUpdateView(fightId, EventCategory.EntityMoved); }