Esempio n. 1
0
        private void Mark(FFXIVLog log)
        {
            if (log.LogBodyReplaceTabCode.Contains("設定しました"))
            {
                var regex = new Regex(@".*?が(?<name>[A-Z][a-z']+? [A-Z][a-z']+?)に『(?<marker>.+?)』を設定しました。");
                var match = regex.Match(log.LogBodyReplaceTabCode);
                if (match.Success)
                {
                    string name   = match.Groups["name"].Value;
                    string marker = match.Groups["marker"].Value;

                    if (!FF14LogParser.IsPet(name))
                    {
                        var actorsStatusChanged = new Dictionary <string, PvPActor>();
                        foreach (string key in actors.Keys)
                        {
                            var pvpActor = FindOrCreatePvPActor(key);
                            if (!pvpActor.isPTMember)
                            {
                                if (key == name)
                                {
                                    pvpActor.marker           = PvPActor.GetMarkerEnum(marker);
                                    actorsStatusChanged[name] = pvpActor;
                                }
                                else if (pvpActor.marker.ToString() == marker)
                                {
                                    pvpActor.marker           = Marker.なし;
                                    actorsStatusChanged[name] = pvpActor;
                                }
                            }
                        }

                        foreach (string key in actorsStatusChanged.Keys)
                        {
                            actors[key] = actorsStatusChanged[key];
                        }
                    }
                }
            }
        }
Esempio n. 2
0
        private void ParseActor(FFXIVLogDataSet.AnaylzedRow row, ActorType type)
        {
            if (!row.IsFromNull())
            {
                var actorName = type == ActorType.FROM ? row.From : row.To;
                var actor     = logParser.ds.Actor.FindByName(actorName);
                if (actor != null && !FF14LogParser.IsPet(actorName))
                {
                    Regex regex = new Regex(@"(?<name>[A-Z][a-z']+? [A-Z][a-z']+?)");
                    Match match = regex.Match(actorName);
                    if (!match.Success)
                    {
                        return;
                    }
                    var pvpActor = FindOrCreatePvPActor(actorName);
                    if (pvpActor.jobList.Count == 0 && actorsLog.Keys.Contains(actorName))
                    {
                        pvpActor.jobList = actorsLog[actorName].jobList;
                    }

                    if (type == ActorType.FROM && !actor.IsClassJobNull())
                    {
                        if (!row.IsActionNameNull())
                        {
                            if (row.ActionName == "プロテス" || row.ActionName == "ストンスキン")
                            {
                                pvpActor.isHealer = true;
                                actor.ClassJob    = "白魔道士 学者";
                            }
                        }
                        pvpActor.SetJobList(PvPActor.ParseJob(actor.ClassJob));
                    }
                    actors[actorName] = pvpActor;
                }
            }
        }