public DetectedActionViewModel(ActionHappened actionHappened) { ActionKind = actionHappened.Kind.ToString(); Description = actionHappened.Description; MainActor = actionHappened.MainActor?.ToWowParserString(); AdditionalActors = actionHappened.AdditionalActors?.Select(s => s.ToWowParserString()).ToList(); if (actionHappened.EventLocation != null) { Location = $"X: {actionHappened.EventLocation.X} Y: {actionHappened.EventLocation.Y} Z: {actionHappened.EventLocation.Z}"; } }
public PossibleActionViewModel(PacketBase @event, double probability, string explain, ActionHappened action) { PacketNumber = action.PacketNumber; Description = action.Description; Chance = (int)(probability * 100); Explain = explain; Diff = (int)(action.Time - @event.Time.ToDateTime()).TotalMilliseconds; }