Skip to content

Commit

Permalink
Merge branch develop v10.2.5-221215.1637
Browse files Browse the repository at this point in the history
  • Loading branch information
anoyetta committed Dec 15, 2022
2 parents 62ace72 + 380815d commit c560e1b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 26 deletions.
2 changes: 1 addition & 1 deletion source/@MasterVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v10.2.4
v10.2.5
4 changes: 2 additions & 2 deletions source/ACT.Hojoring.Common/Version.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Reflection;

[assembly: AssemblyVersion("10.2.0.4")]
[assembly: AssemblyFileVersion("10.2.0.4")]
[assembly: AssemblyVersion("10.2.0.5")]
[assembly: AssemblyFileVersion("10.2.0.5")]
46 changes: 23 additions & 23 deletions source/ACT.XIVLog/VideoCapture.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
using Advanced_Combat_Tracker;
using FFXIV.Framework.Common;
using FFXIV.Framework.XIVHelper;
using NLog;
using OBS.WebSockets.Core;
using SLOBSharp.Client;
using SLOBSharp.Client.Requests;
using System;
using System.Diagnostics;
using System.IO;
Expand All @@ -6,13 +13,6 @@
using System.Runtime.CompilerServices;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Advanced_Combat_Tracker;
using FFXIV.Framework.Common;
using FFXIV.Framework.XIVHelper;
using NLog;
using OBS.WebSockets.Core;
using SLOBSharp.Client;
using SLOBSharp.Client.Requests;
using WindowsInput;

namespace ACT.XIVLog
Expand Down Expand Up @@ -40,27 +40,27 @@ private VideoCapture()
private readonly InputSimulator Input = new InputSimulator();

private static readonly Regex StartCountdownRegex = new Regex(
@" 00:...9::戦闘開始まで.+)$",
@"^00:...9::戦闘開始まで.+)$",
RegexOptions.Compiled);

private static readonly Regex ContentStartLogRegex = new Regex(
@" 00:0839::「(?<content>.+)」の攻略を開始した。",
@"^00:0839::「(?<content>.+)」の攻略を開始した。",
RegexOptions.Compiled);

private static readonly Regex ContentEndLogRegex = new Regex(
@" 00:0839::.+を終了した。$",
@"^00:0839::.+を終了した。$",
RegexOptions.Compiled);

private static readonly Regex PlayerChangedLogRegex = new Regex(
@" 02:[0-9a-fA-F]{8}:(?<player>.+)",
@"^02:[0-9a-fA-F]{8}:(?<player>.+)",
RegexOptions.Compiled);

private static readonly Regex FeastStartRegex = new Regex(
@" 21:[0-9a-fA-F]{8}:40000001:168",
@"^21:[0-9a-fA-F]{8}:40000001:168",
RegexOptions.Compiled);

private static readonly Regex FeastEndRegex = new Regex(
@" 21:[0-9a-fA-F]{8}:80000004:257",
@"^21:[0-9a-fA-F]{8}:80000004:257",
RegexOptions.Compiled);

private static readonly string[] StopVideoKeywords = new string[]
Expand All @@ -70,20 +70,22 @@ private VideoCapture()
"End-of-Timeline has been detected.",
};

private Regex defeatedLogRegex = new Regex(
@" 19:[0-9a-fA-F]{8}:Naoki Yoshida:",
private static Regex CreateDefeatedLogRegex(string playerName) => new Regex(
$@"^19:[0-9a-fA-F]{8}:{playerName}:",
RegexOptions.Compiled);

private Regex defeatedLogRegex = CreateDefeatedLogRegex("Naoki Yoshida");

private bool inFeast;

public void DetectCapture(
XIVLog xivlog)
{
if (!xivlog.Log.Contains(" 00:") &&
!xivlog.Log.Contains(" 01:") &&
!xivlog.Log.Contains(" 02:") &&
!xivlog.Log.Contains(" 19:") &&
!xivlog.Log.Contains(" 21:"))
if (!xivlog.Log.StartsWith("00:") &&
!xivlog.Log.StartsWith("01:") &&
!xivlog.Log.StartsWith("02:") &&
!xivlog.Log.StartsWith("19:") &&
!xivlog.Log.StartsWith("21:"))
{
return;
}
Expand Down Expand Up @@ -166,9 +168,7 @@ public void DetectCapture(
match = PlayerChangedLogRegex.Match(xivlog.Log);
if (match.Success)
{
this.defeatedLogRegex = new Regex(
$@" 19:[0-9a-fA-F]{8}:{this.playerName}:",
RegexOptions.Compiled);
this.defeatedLogRegex = CreateDefeatedLogRegex(this.playerName);
return;
}

Expand Down
1 change: 1 addition & 0 deletions source/ACT.XIVLog/XIVLogPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public void DeInitPlugin()
WipeoutKeywords.WipeoutLog,
WipeoutKeywords.WipeoutLogEcho,
"の攻略を終了した。",
"クロスワールドパーティが解散されました。",
"End-of-Timeline has been detected.",
};

Expand Down

0 comments on commit c560e1b

Please sign in to comment.