private void PropertyStatusChanged(FightStatus fightStatus, PropertyId property) { if (property == PropertyId.PlaySpellForbidden && fightStatus.TryGetEntity(concernedEntity, out PlayerStatus entityStatus)) { AbstractPlayerUIRework view = entityStatus.view; if (null != view) { view.RefreshAvailableActions(recomputeSpellCosts: false); } } if (PropertiesUtility.PreventsAction(property)) { fightStatus.NotifyEntityPlayableStateChanged(); } }
public override void UpdateStatus(FightStatus fightStatus) { if (fightStatus.TryGetEntity(concernedEntity, out PlayerStatus entityStatus)) { entityStatus.RemoveSpellCostModifier(stoppedModifierId); AbstractPlayerUIRework view = entityStatus.view; if (null != view) { view.RefreshAvailableActions(recomputeSpellCosts: true); } } else { Log.Error(FightEventErrors.PlayerNotFound(concernedEntity), 25, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\SpellCostModifierRemovedEvent.cs"); } FightLogicExecutor.FireUpdateStatus(fightStatus.fightId, EventCategory.SpellCostModification); }
public override void UpdateStatus(FightStatus fightStatus) { if (fightStatus.TryGetEntity(concernedEntity, out PlayerStatus entityStatus)) { if (entityStatus.actionPoints != valueBefore) { Log.Warning($"The previous action points value ({entityStatus.actionPoints}) for player with id {concernedEntity} doesn't match the value in the event ({valueBefore}).", 17, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\ActionPointsChangedEvent.cs"); } entityStatus.SetCarac(CaracId.ActionPoints, valueAfter); AbstractPlayerUIRework view = entityStatus.view; if (null != view) { view.RefreshAvailableActions(recomputeSpellCosts: false); } } else { Log.Error(FightEventErrors.PlayerNotFound(concernedEntity), 30, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\ActionPointsChangedEvent.cs"); } FightLogicExecutor.FireUpdateStatus(fightStatus.fightId, EventCategory.ActionPointsChanged); }