예제 #1
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);
 }
예제 #2
0
        public override IEnumerator UpdateView(FightStatus fightStatus)
        {
            FightMap current = FightMap.current;

            if (!(null != current))
            {
                yield break;
            }
            if (current.TryGetCellObject(center.X, center.Y, out CellObject cellObject))
            {
                if (FightSpellEffectFactory.TryGetSpellEffect(SpellEffectKey.Explosion, fightStatus.fightId, parentEventId, out SpellEffect spellEffect))
                {
                    CameraHandler current2 = CameraHandler.current;
                    yield return(FightSpellEffectFactory.PlaySpellEffect(rotation: (!(null != current2)) ? Quaternion.get_identity() : current2.mapRotation.GetInverseRotation(), spellEffect: spellEffect, transform: cellObject.get_transform(), scale: Vector3.get_one(), delay: 0f, fightContext: fightStatus.context, contextProvider: null));
                }
            }
            else
            {
                Log.Error(FightEventErrors.InvalidPosition(center), 38, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\ExplosionEvent.cs");
            }
        }