private static void ProcessDetrimental(Event e, Expressions exp)
 {
     var line = new Line(e.ChatLogEntry)
     {
         EventDirection = e.Direction,
         EventSubject = e.Subject,
         EventType = e.Type
     };
     var detrimental = Regex.Match("ph", @"^\.$");
     if (detrimental.Success)
     {
         return;
     }
     ParsingLogHelper.Log(Logger, "Detrimental", e, exp);
 }
Exemplo n.º 2
0
 public static void SetTimelineTypes(ref Line line)
 {
     switch (line.EventSubject)
     {
         case EventSubject.You:
         case EventSubject.Pet:
             line.SourceTimelineType = TimelineType.You;
             break;
         case EventSubject.Party:
         case EventSubject.PetParty:
             line.SourceTimelineType = TimelineType.Party;
             break;
         case EventSubject.Alliance:
         case EventSubject.PetAlliance:
             line.SourceTimelineType = TimelineType.Alliance;
             break;
         case EventSubject.Other:
         case EventSubject.PetOther:
             line.SourceTimelineType = TimelineType.Other;
             break;
     }
     switch (line.EventDirection)
     {
         case EventDirection.Self:
             switch (line.EventSubject)
             {
                 case EventSubject.You:
                 case EventSubject.Pet:
                     line.TargetTimelineType = TimelineType.You;
                     break;
                 case EventSubject.Party:
                 case EventSubject.PetParty:
                     line.TargetTimelineType = TimelineType.Party;
                     break;
                 case EventSubject.Alliance:
                 case EventSubject.PetAlliance:
                     line.TargetTimelineType = TimelineType.Alliance;
                     break;
                 case EventSubject.Other:
                 case EventSubject.PetOther:
                     line.TargetTimelineType = TimelineType.Other;
                     break;
             }
             break;
         case EventDirection.You:
         case EventDirection.Pet:
             line.TargetTimelineType = TimelineType.You;
             break;
         case EventDirection.Party:
         case EventDirection.PetParty:
             line.TargetTimelineType = TimelineType.Party;
             break;
         case EventDirection.Alliance:
         case EventDirection.PetAlliance:
             line.TargetTimelineType = TimelineType.Alliance;
             break;
         case EventDirection.Other:
         case EventDirection.PetOther:
             line.TargetTimelineType = TimelineType.Other;
             break;
     }
 }
Exemplo n.º 3
0
        public LineHistory(Line line)
        {
            this.TimeStamp           = DateTime.Now;
            this.Line                = line;
            this.SourceStatusEntries = new List <StatusItem>();
            this.TargetStatusEntries = new List <StatusItem>();
            uint PlayerID = 0;

            try {
                List <ActorItem> monsterEntries = XIVInfoViewModel.Instance.CurrentMonsters.Select(entity => entity.Value).ToList();
                List <ActorItem> pcEntries      = XIVInfoViewModel.Instance.CurrentPCs.Select(entity => entity.Value).ToList();

                // process you => monster
                foreach (ActorItem actorEntity in pcEntries)
                {
                    if (!string.Equals(actorEntity.Name, line.Source, Constants.InvariantComparer))
                    {
                        continue;
                    }

                    PlayerID = actorEntity.ID;
                    foreach (StatusItem statusEntry in actorEntity.StatusItems)
                    {
                        this.SourceStatusEntries.Add(statusEntry);
                    }
                }

                foreach (ActorItem actorEntity in monsterEntries)
                {
                    if (!string.Equals(actorEntity.Name, line.Target, Constants.InvariantComparer))
                    {
                        return;
                    }

                    foreach (StatusItem statusEntry in actorEntity.StatusItems)
                    {
                        if (statusEntry.CasterID == PlayerID)
                        {
                            this.TargetStatusEntries.Add(statusEntry);
                        }
                    }
                }

                // process monster => you
                foreach (ActorItem actorEntity in pcEntries)
                {
                    if (!string.Equals(actorEntity.Name, line.Target, Constants.InvariantComparer))
                    {
                        continue;
                    }

                    PlayerID = actorEntity.ID;
                    foreach (StatusItem statusEntry in actorEntity.StatusItems)
                    {
                        this.TargetStatusEntries.Add(statusEntry);
                    }
                }

                foreach (ActorItem actorEntity in monsterEntries)
                {
                    if (!string.Equals(actorEntity.Name, line.Source, Constants.InvariantComparer))
                    {
                        return;
                    }

                    foreach (StatusItem statusEntry in actorEntity.StatusItems)
                    {
                        if (statusEntry.CasterID == PlayerID)
                        {
                            this.SourceStatusEntries.Add(statusEntry);
                        }
                    }
                }
            }
            catch (Exception ex) {
                Logging.Log(Logger, new LogItem(ex, true));
            }
        }
Exemplo n.º 4
0
 public static bool IsIgnored(Line line)
 {
     return IgnoreType(line.SourceTimelineType) || IgnoreType(line.TargetTimelineType);
 }