Exemplo n.º 1
0
        private static IEnumerable <Vector2Int> EnumerateOtherObjectsInAssemblagePositions(FightStatus fightStatus, int concernedEntity, IReadOnlyList <int> entitiesInAssemblage)
        {
            int entityCountInAssemblage = entitiesInAssemblage.Count;
            int num2;

            for (int i = 0; i < entityCountInAssemblage; i = num2)
            {
                int num = entitiesInAssemblage[i];
                if (num != concernedEntity)
                {
                    if (fightStatus.TryGetEntity(num, out IEntityWithAssemblage entityStatus))
                    {
                        IObjectWithAssemblage objectWithAssemblage;
                        if ((objectWithAssemblage = (entityStatus.view as IObjectWithAssemblage)) != null)
                        {
                            yield return(objectWithAssemblage.cellObject.coords);
                        }
                        else
                        {
                            Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithAssemblage>(entityStatus), 65, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\AssemblageChangedEvent.cs");
                        }
                    }
                    else
                    {
                        Log.Error(FightEventErrors.EntityNotFound <IEntityWithAssemblage>(num), 70, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\AssemblageChangedEvent.cs");
                    }
                }
                num2 = i + 1;
            }
        }
Exemplo n.º 2
0
        public override IEnumerator UpdateView(FightStatus fightStatus)
        {
            if (fightStatus.TryGetEntity(concernedEntity, out HeroStatus heroStatus))
            {
                if (fightStatus.TryGetEntity(ownerId, out PlayerStatus ownerStatus))
                {
                    WeaponDefinition weaponDefinition = (WeaponDefinition)heroStatus.definition;
                    if (null != weaponDefinition)
                    {
                        HeroCharacterObject heroCharacterObject = FightObjectFactory.CreateHeroCharacterObject(weaponDefinition, refCoord.X, refCoord.Y, (Direction)direction);
                        if (null != heroCharacterObject)
                        {
                            heroStatus.view = heroCharacterObject;
                            yield return(heroCharacterObject.LoadAnimationDefinitions(skinId, (Gender)gender));

                            heroCharacterObject.Initialize(fightStatus, ownerStatus, heroStatus);
                            UpdateAudioContext(ownerStatus, heroStatus.baseLife);
                            yield return(heroCharacterObject.Spawn());
                        }
                    }
                }
                else
                {
                    Log.Error(FightEventErrors.PlayerNotFound(ownerId), 98, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\HeroAddedEvent.cs");
                }
            }
            else
            {
                Log.Error(FightEventErrors.EntityNotFound <HeroStatus>(concernedEntity), 103, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\HeroAddedEvent.cs");
            }
            FightLogicExecutor.FireUpdateView(fightStatus.fightId, EventCategory.EntityAddedOrRemoved);
        }
Exemplo n.º 3
0
 public override void UpdateStatus(FightStatus fightStatus)
 {
     //IL_002f: 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_004f: Unknown result type (might be due to invalid IL or missing references)
     if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithBoardPresence entityStatus))
     {
         Area       area         = entityStatus.area;
         int        count        = cells.Count;
         Vector2Int val          = (Vector2Int)cells[0];
         Vector2Int newRefCoords = (Vector2Int)cells[count - 1];
         entityStatus.area.MoveTo(newRefCoords);
         fightStatus.NotifyEntityAreaMoved();
         CharacterStatus characterStatus;
         if (IsMovementAction() && (characterStatus = (entityStatus as CharacterStatus)) != null)
         {
             characterStatus.actionUsed = true;
             fightStatus.NotifyEntityPlayableStateChanged();
         }
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <IEntityWithBoardPresence>(concernedEntity), 46, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntityAreaMovedEvent.cs");
     }
     FightLogicExecutor.FireUpdateStatus(fightStatus.fightId, EventCategory.EntityMoved);
 }
Exemplo n.º 4
0
 public override IEnumerator UpdateView(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out CompanionStatus companionStatus))
     {
         if (fightStatus.TryGetEntity(ownerId, out PlayerStatus ownerStatus))
         {
             if (!ownerStatus.isLocalPlayer)
             {
                 FightMap current = FightMap.current;
                 if (null != current)
                 {
                     if (current.TryGetCellObject(refCoord.X, refCoord.Y, out CellObject cellObject))
                     {
                         ReserveCompanionStatus reserveCompanion = new ReserveCompanionStatus(ownerStatus, (CompanionDefinition)companionStatus.definition, level);
                         yield return(FightUIRework.ShowPlayingCompanion(reserveCompanion, cellObject));
                     }
                     else
                     {
                         Log.Error(FightEventErrors.InvalidPosition(refCoord), 59, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\CompanionAddedEvent.cs");
                     }
                 }
             }
             yield return(CreateCompanionCharacterObject(fightStatus, companionStatus, ownerStatus, refCoord.X, refCoord.Y, (Direction)direction));
         }
         else
         {
             Log.Error(FightEventErrors.PlayerNotFound(ownerId), 70, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\CompanionAddedEvent.cs");
         }
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <CompanionStatus>(concernedEntity), 75, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\CompanionAddedEvent.cs");
     }
     FightLogicExecutor.FireUpdateView(fightStatus.fightId, EventCategory.EntityAddedOrRemoved);
 }
Exemplo n.º 5
0
 public override void UpdateStatus(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithAssemblage entityStatus))
     {
         entityStatus.assemblingIds = allEntities;
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <IEntityWithAssemblage>(concernedEntity), 20, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\AssemblageChangedEvent.cs");
     }
 }
Exemplo n.º 6
0
 public override void UpdateStatus(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithBoardPresence entityStatus))
     {
         entityStatus.SetCarac(CaracId.PhysicalHealModifier, valueAfter);
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <IEntityWithBoardPresence>(concernedEntity), 19, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\PhysicalHealModifierChangedEvent.cs");
     }
 }
 public override void UpdateStatus(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out CharacterStatus entityStatus))
     {
         entityStatus.actionUsed = false;
         fightStatus.NotifyEntityPlayableStateChanged();
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <CharacterStatus>(concernedEntity), 20, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntityActionResetEvent.cs");
     }
 }
 public override void UpdateStatus(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out IEntity entityStatus))
     {
         entityStatus.SetCarac(CaracId.MagicalDamageModifier, valueAfter);
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <IEntity>(concernedEntity), 18, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\MagicalDamageModifierChangedEvent.cs");
     }
     FightLogicExecutor.FireUpdateStatus(fightStatus.fightId, EventCategory.DamageModifierChanged);
 }
Exemplo n.º 9
0
 public override void UpdateStatus(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithElementaryState entityStatus))
     {
         entityStatus.ChangeElementaryState((ElementaryStates)elementaryState);
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <IEntityWithElementaryState>(concernedEntity), 19, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\ElementaryChangedEvent.cs");
     }
     FightLogicExecutor.FireUpdateStatus(fightStatus.fightId, EventCategory.ElementaryStateChanged);
 }
Exemplo n.º 10
0
 public override void UpdateStatus(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithLife entityStatus))
     {
         entityStatus.SetCarac(CaracId.LifeMax, maxLifeAfter);
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <IEntityWithLife>(concernedEntity), 21, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\MaxLifeChangedEvent.cs");
     }
     FightLogicExecutor.FireUpdateStatus(fightStatus.fightId, EventCategory.LifeArmorChanged);
 }
Exemplo n.º 11
0
 public override IEnumerator UpdateView(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithBoardPresence entityStatus))
     {
         IObjectWithCounterEffects objectWithCounterEffects;
         IObjectWithCounterEffects isoObject = objectWithCounterEffects = (entityStatus.view as IObjectWithCounterEffects);
         if (objectWithCounterEffects != null)
         {
             if (counterReplaced.HasValue)
             {
                 yield return(isoObject.RemoveFloatingCounterEffect());
             }
             CaracId floatingCounterType = (CaracId)this.floatingCounterType;
             if (!FightSpellEffectFactory.TryGetFloatingCounterEffect(floatingCounterType, (PropertyId?)sightProperty, out FloatingCounterEffect effect))
             {
                 yield break;
             }
             if (null != effect)
             {
                 if (valueBefore == 0 || counterReplaced.HasValue)
                 {
                     yield return(isoObject.InitializeFloatingCounterEffect(effect, valueAfter));
                 }
                 else
                 {
                     FloatingCounterFeedback currentFloatingCounterFeedback = isoObject.GetCurrentFloatingCounterFeedback();
                     currentFloatingCounterFeedback.ChangeVisual(effect);
                     yield return(currentFloatingCounterFeedback.SetCount(valueAfter));
                 }
                 if (parentEventId.HasValue)
                 {
                     FightSpellEffectFactory.SetupSpellEffectOverrides(effect, fightStatus.fightId, parentEventId.Value);
                 }
             }
             else
             {
                 Log.Error(string.Format("No prefab defined for {0} {1}.", "FloatingCounterEffect", floatingCounterType), 68, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\FloatingCounterValueChangedEvent.cs");
             }
         }
         else
         {
             Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithCounterEffects>(entityStatus), 74, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\FloatingCounterValueChangedEvent.cs");
         }
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <IEntityWithBoardPresence>(concernedEntity), 79, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\FloatingCounterValueChangedEvent.cs");
     }
 }
Exemplo n.º 12
0
 public override void UpdateStatus(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithMovement entityStatus))
     {
         if (entityStatus.GetCarac(CaracId.MovementPoints) != valueBefore)
         {
             Log.Warning($"The previous movement points value ({entityStatus.GetCarac(CaracId.MovementPoints)}) for entity with id {concernedEntity} doesn't match the value in the event ({valueBefore}).", 18, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\MovementPointsChangedEvent.cs");
         }
         entityStatus.SetCarac(CaracId.MovementPoints, valueAfter);
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <IEntityWithMovement>(concernedEntity), 25, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\MovementPointsChangedEvent.cs");
     }
     FightLogicExecutor.FireUpdateStatus(fightStatus.fightId, EventCategory.MovementPointsChanged);
 }
Exemplo n.º 13
0
 public override void UpdateStatus(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out IEntity entityStatus))
     {
         if (counterReplaced.HasValue)
         {
             entityStatus.SetCarac((CaracId)counterReplaced.Value, 0);
         }
         CaracId floatingCounterType = (CaracId)this.floatingCounterType;
         entityStatus.SetCarac(floatingCounterType, valueAfter);
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <IEntity>(concernedEntity), 27, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\FloatingCounterValueChangedEvent.cs");
     }
 }
        public override IEnumerator UpdateView(FightStatus fightStatus)
        {
            if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithBoardPresence entityStatus))
            {
                IsoObject view = entityStatus.view;
                if (null != view)
                {
                    IObjectWithAction objectWithAction;
                    if ((objectWithAction = (view as IObjectWithAction)) != null)
                    {
                        objectWithAction.SetPhysicalDamageBoost(valueAfter);
                    }
                    else
                    {
                        Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithAction>(entityStatus), 37, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\PhysicalDamageModifierChangedEvent.cs");
                    }
                    CellObject cellObject = view.cellObject;
                    if (null != cellObject)
                    {
                        if (valueAfter > valueBefore)
                        {
                            yield return(FightSpellEffectFactory.PlayGenericEffect(SpellEffectKey.PhysicalDamageGain, fightStatus.fightId, parentEventId, view, fightStatus.context));

                            ValueChangedFeedback.Launch(valueAfter - valueBefore, ValueChangedFeedback.Type.Action, cellObject.get_transform());
                        }
                        else
                        {
                            yield return(FightSpellEffectFactory.PlayGenericEffect(SpellEffectKey.PhysicalDamageLoss, fightStatus.fightId, parentEventId, view, fightStatus.context));

                            ValueChangedFeedback.Launch(valueAfter - valueBefore, ValueChangedFeedback.Type.Action, cellObject.get_transform());
                        }
                    }
                    else
                    {
                        Log.Warning("Tried to apply a damage modifier on target named " + view.get_name() + " (" + ((object)view).GetType().Name + ") but the target is no longer on the board.", 56, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\PhysicalDamageModifierChangedEvent.cs");
                    }
                }
                else
                {
                    Log.Error(FightEventErrors.EntityHasNoView(entityStatus), 61, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\PhysicalDamageModifierChangedEvent.cs");
                }
            }
            else
            {
                Log.Error(FightEventErrors.EntityNotFound <IEntityWithBoardPresence>(concernedEntity), 66, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\PhysicalDamageModifierChangedEvent.cs");
            }
        }
Exemplo n.º 15
0
 public override IEnumerator UpdateView(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithBoardPresence entityStatus))
     {
         IObjectWithArmoredLife objectWithArmoredLife;
         if ((objectWithArmoredLife = (entityStatus.view as IObjectWithArmoredLife)) != null)
         {
             objectWithArmoredLife.SetBaseLife(maxLifeAfter);
         }
         else
         {
             Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithArmoredLife>(entityStatus), 37, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\MaxLifeChangedEvent.cs");
         }
         if (entityStatus.type == EntityType.Hero)
         {
             HeroStatus heroStatus = (HeroStatus)entityStatus;
             if (heroStatus.ownerId == fightStatus.localPlayerId)
             {
                 FightMap current = FightMap.current;
                 if (null != current)
                 {
                     current.SetLocalPlayerHeroLife(heroStatus.life, maxLifeAfter);
                 }
             }
             if (fightStatus.TryGetEntity(heroStatus.ownerId, out PlayerStatus entityStatus2))
             {
                 AbstractPlayerUIRework view = entityStatus2.view;
                 if (null != view)
                 {
                     view.ChangeHeroBaseLifePoints(maxLifeAfter);
                 }
             }
             else
             {
                 Log.Error(FightEventErrors.PlayerNotFound(heroStatus.ownerId), 62, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\MaxLifeChangedEvent.cs");
             }
         }
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <IEntityWithBoardPresence>(concernedEntity), 68, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\MaxLifeChangedEvent.cs");
     }
     FightLogicExecutor.FireUpdateView(fightStatus.fightId, EventCategory.LifeArmorChanged);
     yield break;
 }
Exemplo n.º 16
0
        private IEnumerator DoActivation(FightStatus fightStatus)
        {
            IObjectWithActivationAnimation objectWithActivationAnimation;

            if (!fightStatus.TryGetEntity(concernedEntity, out IEntityWithBoardPresence entityStatus))
            {
                Log.Error(FightEventErrors.EntityNotFound <IEntityWithBoardPresence>(concernedEntity), 85, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntityAnimationEvent.cs");
            }
            else if ((objectWithActivationAnimation = (entityStatus.view as IObjectWithActivationAnimation)) != null)
            {
                Vector2Int coords = objectWithActivationAnimation.cellObject.coords;
                yield return(objectWithActivationAnimation.AnimateActivation(coords));
            }
            else
            {
                Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithActivationAnimation>(entityStatus), 96, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntityAnimationEvent.cs");
            }
        }
Exemplo n.º 17
0
 public override IEnumerator UpdateView(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithBoardPresence entityStatus))
     {
         CharacterObject characterObject = entityStatus.view as CharacterObject;
         if (null != characterObject)
         {
             yield return(characterObject.ChangeAnimatedCharacterData(characterSkinId, (Gender)gender));
         }
         else
         {
             Log.Error(FightEventErrors.EntityHasIncompatibleView <IEntityWithBoardPresence>(entityStatus), 22, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntitySkinChangedEvent.cs");
         }
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <IEntityWithBoardPresence>(concernedEntity), 27, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntitySkinChangedEvent.cs");
     }
 }
 public override IEnumerator UpdateView(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out FloorMechanismStatus entityStatus))
     {
         if (fightStatus.TryGetEntity(ownerId, out PlayerStatus entityStatus2))
         {
             yield return(CreateFloorMechanismObject(fightStatus, entityStatus, entityStatus2, refCoord.X, refCoord.Y));
         }
         else
         {
             Log.Error(FightEventErrors.PlayerNotFound(ownerId), 43, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\FloorMechanismAddedEvent.cs");
         }
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <FloorMechanismStatus>(concernedEntity), 48, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\FloorMechanismAddedEvent.cs");
     }
     FightLogicExecutor.FireUpdateView(fightStatus.fightId, EventCategory.EntityAddedOrRemoved);
 }
Exemplo n.º 19
0
        public override IEnumerator UpdateView(FightStatus fightStatus)
        {
            int fightId = fightStatus.fightId;

            if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithMovement entityStatus))
            {
                IsoObject isoObject = entityStatus.view;
                if (null != isoObject)
                {
                    IObjectWithMovement objectWithMovement;
                    if ((objectWithMovement = (isoObject as IObjectWithMovement)) != null)
                    {
                        objectWithMovement.SetMovementPoints(valueAfter);
                    }
                    else
                    {
                        Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithMovement>(entityStatus), 46, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\MovementPointsChangedEvent.cs");
                    }
                    if (valueAfter > valueBefore)
                    {
                        yield return(FightSpellEffectFactory.PlayGenericEffect(SpellEffectKey.MovementPointGain, fightId, parentEventId, isoObject, fightStatus.context));

                        ValueChangedFeedback.Launch(valueAfter - valueBefore, ValueChangedFeedback.Type.Movement, isoObject.cellObject.get_transform());
                    }
                    else
                    {
                        yield return(FightSpellEffectFactory.PlayGenericEffect(SpellEffectKey.MovementPointLoss, fightId, parentEventId, isoObject, fightStatus.context));

                        ValueChangedFeedback.Launch(valueAfter - valueBefore, ValueChangedFeedback.Type.Movement, isoObject.cellObject.get_transform());
                    }
                }
                else
                {
                    Log.Error(FightEventErrors.EntityHasNoView(entityStatus), 62, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\MovementPointsChangedEvent.cs");
                }
            }
            else
            {
                Log.Error(FightEventErrors.EntityNotFound <IEntityWithMovement>(concernedEntity), 67, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\MovementPointsChangedEvent.cs");
            }
            FightLogicExecutor.FireUpdateView(fightId, EventCategory.MovementPointsChanged);
        }
Exemplo n.º 20
0
 public override IEnumerator UpdateView(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithBoardPresence entityStatus))
     {
         IObjectWithAction objectWithAction;
         if ((objectWithAction = (entityStatus.view as IObjectWithAction)) != null)
         {
             objectWithAction.SetPhysicalHealBoost(valueAfter);
         }
         else
         {
             Log.Error(FightEventErrors.EntityHasIncompatibleView <IEntityWithBoardPresence>(entityStatus), 33, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\PhysicalHealModifierChangedEvent.cs");
         }
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <IEntityWithBoardPresence>(concernedEntity), 38, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\PhysicalHealModifierChangedEvent.cs");
     }
     yield break;
 }
 public override IEnumerator UpdateView(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithBoardPresence entityStatus))
     {
         IObjectWithAction objectWithAction;
         if ((objectWithAction = (entityStatus.view as IObjectWithAction)) != null)
         {
             objectWithAction.SetActionUsed(actionUsed: false, turnEnded: false);
         }
         else
         {
             Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithAction>(entityStatus), 34, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntityActionResetEvent.cs");
         }
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <IEntityWithBoardPresence>(concernedEntity), 39, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntityActionResetEvent.cs");
     }
     yield break;
 }
Exemplo n.º 22
0
 public override IEnumerator UpdateView(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithAssemblage entityStatus))
     {
         IObjectWithAssemblage objectWithAssemblage;
         if ((objectWithAssemblage = (entityStatus.view as IObjectWithAssemblage)) != null)
         {
             IEnumerable <Vector2Int> otherObjectInAssemblagePositions = EnumerateOtherObjectsInAssemblagePositions(fightStatus, concernedEntity, allEntities);
             objectWithAssemblage.RefreshAssemblage(otherObjectInAssemblagePositions);
         }
         else
         {
             Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithAssemblage>(entityStatus), 35, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\AssemblageChangedEvent.cs");
         }
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <IEntityWithAssemblage>(concernedEntity), 40, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\AssemblageChangedEvent.cs");
     }
     yield break;
 }
Exemplo n.º 23
0
 public override IEnumerator UpdateView(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithBoardPresence entityStatus))
     {
         IObjectWithElementaryState objectWithElementaryState;
         if ((objectWithElementaryState = (entityStatus.view as IObjectWithElementaryState)) != null)
         {
             objectWithElementaryState.SetElementaryState((ElementaryStates)elementaryState);
         }
         else
         {
             Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithElementaryState>(entityStatus), 35, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\ElementaryChangedEvent.cs");
         }
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <IEntityWithBoardPresence>(concernedEntity), 40, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\ElementaryChangedEvent.cs");
     }
     FightLogicExecutor.FireUpdateView(fightStatus.fightId, EventCategory.ElementaryStateChanged);
     yield break;
 }
Exemplo n.º 24
0
 public override IEnumerator UpdateView(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out CharacterStatus entityStatus))
     {
         IObjectWithAction objectWithAction;
         if ((objectWithAction = (entityStatus.view as IObjectWithAction)) != null)
         {
             Vector2Int position = (Vector2Int)attackerCoord;
             Vector2Int target   = (Vector2Int)targetCoord;
             yield return(objectWithAction.DoAction(position, target));
         }
         else
         {
             Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithAction>(entityStatus), 27, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\AttackEvent.cs");
         }
     }
     else
     {
         Log.Error(FightEventErrors.EntityNotFound <CharacterStatus>(concernedEntity), 32, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\AttackEvent.cs");
     }
 }
Exemplo n.º 25
0
        private IEnumerator DoRangedAction(FightStatus fightStatus)
        {
            IEntityWithBoardPresence entityStatus;
            IObjectWithAction        objectWithAction;

            if (additionalCoords.Count < 1)
            {
                Log.Error(string.Format("{0} with key {1} has not supplied an additional coordinate.", "EntityAnimationEvent", EntityAnimationKey.Attack), 60, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntityAnimationEvent.cs");
            }
            else if (!fightStatus.TryGetEntity(concernedEntity, out entityStatus))
            {
                Log.Error(FightEventErrors.EntityNotFound <IEntityWithBoardPresence>(concernedEntity), 66, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntityAnimationEvent.cs");
            }
            else if ((objectWithAction = (entityStatus.view as IObjectWithAction)) != null)
            {
                Vector2Int coords = objectWithAction.cellObject.coords;
                yield return(objectWithAction.DoRangedAction(coords, (Vector2Int)additionalCoords[0]));
            }
            else
            {
                Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithAction>(entityStatus), 77, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\EntityAnimationEvent.cs");
            }
        }
Exemplo n.º 26
0
        public override void UpdateStatus(FightStatus fightStatus)
        {
            PropertyId propertyId = (PropertyId)this.propertyId;

            if (fightStatus.TryGetEntity(concernedEntity, out EntityStatus entityStatus))
            {
                if (propertyReplaced.HasValue)
                {
                    PropertyId value = (PropertyId)propertyReplaced.Value;
                    if (value != propertyId)
                    {
                        entityStatus.RemoveProperty(value);
                        PropertyStatusChanged(fightStatus, value);
                        entityStatus.AddProperty(propertyId);
                        PropertyStatusChanged(fightStatus, propertyId);
                    }
                }
                else
                {
                    if (active)
                    {
                        entityStatus.AddProperty(propertyId);
                    }
                    else
                    {
                        entityStatus.RemoveProperty(propertyId);
                    }
                    PropertyStatusChanged(fightStatus, propertyId);
                }
            }
            else
            {
                Log.Error(FightEventErrors.EntityNotFound <EntityStatus>(concernedEntity), 49, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\PropertyChangedEvent.cs");
            }
            FightLogicExecutor.FireUpdateStatus(fightStatus.fightId, EventCategory.PropertyChanged);
        }
Exemplo n.º 27
0
        public override IEnumerator UpdateView(FightStatus fightStatus)
        {
            PropertyId property = (PropertyId)propertyId;

            if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithBoardPresence entityStatus))
            {
                ICharacterObject characterObject2;
                ICharacterObject characterObject = characterObject2 = (entityStatus.view as ICharacterObject);
                if (characterObject2 != null)
                {
                    if (propertyReplaced.HasValue)
                    {
                        PropertyId removedProperty = (PropertyId)propertyReplaced.Value;
                        if (removedProperty != property)
                        {
                            if (PropertiesUtility.IsSightProperty(property))
                            {
                                yield return(TryChangeSightVisual(characterObject, property));
                            }
                            else
                            {
                                yield return(RemovePropertyFromView(characterObject, removedProperty));

                                yield return(PropertyViewChanged(fightStatus, removedProperty));

                                yield return(AddPropertyToView(characterObject, property));

                                yield return(PropertyViewChanged(fightStatus, property));
                            }
                        }
                    }
                    else
                    {
                        if (active)
                        {
                            if (PropertiesUtility.IsSightProperty(property))
                            {
                                yield return(TryChangeSightVisual(characterObject, property));
                            }
                            else
                            {
                                yield return(AddPropertyToView(characterObject, property));
                            }
                        }
                        else if (PropertiesUtility.IsSightProperty(property))
                        {
                            yield return(TryChangeSightVisual(characterObject, null));
                        }
                        else
                        {
                            yield return(RemovePropertyFromView(characterObject, property));
                        }
                        yield return(PropertyViewChanged(fightStatus, property));
                    }
                }
            }
            else
            {
                Log.Error(FightEventErrors.EntityNotFound <IEntityWithBoardPresence>(concernedEntity), 113, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\PropertyChangedEvent.cs");
            }
            FightLogicExecutor.FireUpdateView(fightStatus.fightId, EventCategory.PropertyChanged);
        }
Exemplo n.º 28
0
        public override IEnumerator UpdateView(FightStatus fightStatus)
        {
            Direction direction = Direction.SouthEast;

            if (fightStatus.TryGetEntity(concernedEntity, out IEntityWithBoardPresence entityStatus))
            {
                IsoObject view = entityStatus.view;
                if (null != view)
                {
                    ICharacterObject characterObject;
                    if ((characterObject = (view as ICharacterObject)) != null)
                    {
                        direction = characterObject.direction;
                    }
                    view.DetachFromCell();
                    view.Destroy();
                }
                else
                {
                    Log.Error(FightEventErrors.EntityHasNoView(entityStatus), 97, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\TransformationEvent.cs");
                }
            }
            else
            {
                Log.Error(FightEventErrors.EntityNotFound <IEntityWithBoardPresence>(concernedEntity), 102, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\TransformationEvent.cs");
            }
            if (fightStatus.TryGetEntity(newEntityId, out IEntityWithBoardPresence entityStatus2))
            {
                if (fightStatus.TryGetEntity(ownerId, out PlayerStatus entityStatus3))
                {
                    EntityType newEntityType = (EntityType)this.newEntityType;
                    switch (newEntityType)
                    {
                    case EntityType.Hero:
                        throw new Exception("[TransformationEvent] Heroes cannot be transformed.");

                    case EntityType.Companion:
                        yield return(CompanionAddedEvent.CreateCompanionCharacterObject(fightStatus, (CompanionStatus)entityStatus2, entityStatus3, refCoord.X, refCoord.Y, direction));

                        break;

                    case EntityType.Summoning:
                        yield return(SummoningAddedEvent.CreateSummoningCharacterObject(fightStatus, (SummoningStatus)entityStatus2, entityStatus3, refCoord.X, refCoord.Y, direction));

                        break;

                    case EntityType.FloorMechanism:
                        yield return(FloorMechanismAddedEvent.CreateFloorMechanismObject(fightStatus, (FloorMechanismStatus)entityStatus2, entityStatus3, refCoord.X, refCoord.Y));

                        break;

                    case EntityType.ObjectMechanism:
                        yield return(ObjectMechanismAddedEvent.CreateObjectMechanismObject(fightStatus, (ObjectMechanismStatus)entityStatus2, entityStatus3, refCoord.X, refCoord.Y));

                        break;

                    case EntityType.Global:
                    case EntityType.Player:
                    case EntityType.Team:
                        Log.Error($"Transformation not handled for type {newEntityType}.", 134, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\TransformationEvent.cs");
                        break;

                    default:
                        throw new ArgumentOutOfRangeException();
                    }
                }
                else
                {
                    Log.Error(FightEventErrors.PlayerNotFound(ownerId), 143, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\TransformationEvent.cs");
                }
            }
            else
            {
                Log.Error(FightEventErrors.EntityNotFound <IEntityWithBoardPresence>(newEntityId), 148, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\TransformationEvent.cs");
            }
            FightLogicExecutor.FireUpdateView(fightStatus.fightId, EventCategory.EntityAddedOrRemoved);
        }
Exemplo n.º 29
0
 public override IEnumerator UpdateView(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out FloorMechanismStatus entityStatus))
     {
         if (fightStatus.TryGetEntity(activator, out IEntityWithTeam entityStatus2))
         {
             if (entityStatus2.teamId == entityStatus.teamId)
             {
                 IObjectWithActivation objectWithActivation;
                 if ((objectWithActivation = (entityStatus.view as IObjectWithActivation)) != null)
                 {
                     yield return(objectWithActivation.ActivatedByAlly());
                 }
                 else
                 {
                     Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithActivation>(entityStatus), 26, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\FloorMechanismActivationEvent.cs");
                 }
                 yield break;
             }
             IReadOnlyList <int> entitiesInAssemblage = this.entitiesInAssemblage;
             int count = entitiesInAssemblage.Count;
             if (count == 1)
             {
                 IObjectWithActivation objectWithActivation2;
                 if ((objectWithActivation2 = (entityStatus.view as IObjectWithActivation)) != null)
                 {
                     yield return(objectWithActivation2.ActivatedByOpponent());
                 }
                 else
                 {
                     Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithActivation>(entityStatus), 41, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\FloorMechanismActivationEvent.cs");
                 }
                 yield break;
             }
             IEnumerator[] array = new IEnumerator[count];
             for (int i = 0; i < count; i++)
             {
                 if (fightStatus.TryGetEntity(entitiesInAssemblage[i], out FloorMechanismStatus entityStatus3))
                 {
                     IObjectWithActivation objectWithActivation3;
                     if ((objectWithActivation3 = (entityStatus3.view as IObjectWithActivation)) != null)
                     {
                         array[i] = objectWithActivation3.ActivatedByOpponent();
                     }
                     else
                     {
                         Log.Error(FightEventErrors.EntityHasIncompatibleView <IObjectWithActivation>(entityStatus3), 57, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\FloorMechanismActivationEvent.cs");
                     }
                 }
                 else
                 {
                     Log.Error(FightEventErrors.EntityNotFound <FloorMechanismStatus>(entitiesInAssemblage[i]), 62, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\FloorMechanismActivationEvent.cs");
                 }
             }
             yield return(EnumeratorUtility.ParallelRecursiveImmediateSafeExecution(array));
         }
         else
         {
             Log.Error(FightEventErrors.EntityNotFound <IEntityWithTeam>(activator), 72, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\FloorMechanismActivationEvent.cs");
         }
     }
     else
     {
         Log.Error($"Could not find entity with id {concernedEntity}.", 77, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\FloorMechanismActivationEvent.cs");
     }
 }
Exemplo n.º 30
0
        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);
        }