private IEnumerator PropertyViewChanged(FightStatus fightStatus, PropertyId property)
 {
     if (property == PropertyId.PlaySpellForbidden && fightStatus.TryGetEntity(concernedEntity, out PlayerStatus entityStatus))
     {
         AbstractPlayerUIRework view = entityStatus.view;
         if (null != view)
         {
             yield return(view.UpdateAvailableActions(recomputeSpellCosts: false));
         }
     }
 }
Esempio n. 2
0
 public override IEnumerator UpdateView(FightStatus fightStatus)
 {
     if (fightStatus.TryGetEntity(concernedEntity, out PlayerStatus entityStatus))
     {
         AbstractPlayerUIRework view = entityStatus.view;
         if (null != view)
         {
             view.ChangeActionPoints(valueAfter);
             yield return(view.UpdateAvailableActions(recomputeSpellCosts: false));
         }
     }
     else
     {
         Log.Error(FightEventErrors.PlayerNotFound(concernedEntity), 50, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\ActionPointsChangedEvent.cs");
     }
     FightLogicExecutor.FireUpdateView(fightStatus.fightId, EventCategory.ActionPointsChanged);
 }
        public override IEnumerator UpdateView(FightStatus fightStatus)
        {
            if (fightStatus.TryGetEntity(concernedEntity, out PlayerStatus entityStatus))
            {
                AbstractPlayerUIRework playerUI = entityStatus.view;
                if (null != playerUI)
                {
                    yield return(playerUI.RemoveSpellCostModifier(stoppedModifierId));

                    yield return(playerUI.UpdateAvailableActions(recomputeSpellCosts: true));
                }
            }
            else
            {
                Log.Error(FightEventErrors.PlayerNotFound(concernedEntity), 45, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\SpellCostModifierRemovedEvent.cs");
            }
            FightLogicExecutor.FireUpdateView(fightStatus.fightId, EventCategory.SpellCostModification);
        }